First is the image segmentation that separates the kernels from the image background. Then the kernels themselves are separated so that the number of kernels can be calculated. Good image segmentation is the foundation of the counting accuracy. There are many segmentation algorithms such as ...