Description: First, edge detection, and then filled. Then open computing can make some minor attached rice grains to separate. Then traverse the pictures, label each grain of rice, start from a small to a big label. Each pixel of each rice grain is the same value, each pixel value of the i th groats are i. Which uses a queue array simulation. The total number of the largest grain of rice label is a grain of rice. Finally, traverse again the image array, you can find the area of each grain of rice.
To Search:
File list (Check if you may need any files):
rice.doc