Introduction - If you have any usage issues, please Google them yourself
This code is a major grayscale rice.jpg some processing, the brightness of the image to eliminate inconsistencies rice.jpg the background, and use the modified threshold segmentation of the image is converted to binary image, use back image contour detection the number of objects in the target and statistical properties.