The invention discloses a solar
silicon wafer and battery piece counting method based on
image processing and belongs to the technical field of
image processing. The method comprises the following steps that 101, side images of stacked
silicon wafers or stacked battery pieces are preprocessed; 102, a measured object is positioned, and a
mask is used for
processing and limiting an operation region; 103, the images covered with the
mask are replicated and subjected to different kinds of threshold
processing respectively to obtain a denoised and binarized image; 104, the obtained denoised and binarized image is subjected to post-
processing; 105, differential statistical counting and positioning are conducted to obtain the number of the measured stacked
silicon wafers or the measured stacked battery pieces. According to the method, the side images of the stacked silicon wafers or the stacked battery pieces are collected, the
binary image highlights gaps and filters out other interference
noise, and finally a differential
statistical algorithm is adopted to obtain the accurate number. By means of the method, the problem of inaccurate counting due to
poor quality of the obtained image and high
noise is solved, and the counting accuracy and efficiency are improved.