It facilitates to calculate length, width and area of rice kernel to preprocess the color image of rice kernel by gray processing of image, binarization and contour extraction, and the matching degree obtained by the method of template matching can evaluate the ...