Ask Your Question

counting grains in cereal plants

asked 2019-10-08 14:20:56 -0600

Neikonice gravatar image

updated 2019-10-10 07:31:50 -0600

kbarni gravatar image


i want to count grains of and in cereal plant with the help of a camera. I already tried methods like watershed or edge detection to seperate the grains but without success. Maybe someone of you has ideas or advice on how to better solve this problem?

image description

image description

edit retag flag offensive close merge delete


Can you upload images again?

supra56 gravatar imagesupra56 ( 2019-10-08 22:02:48 -0600 )edit

I hope the pictures are working now

Neikonice gravatar imageNeikonice ( 2019-10-09 11:32:24 -0600 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2019-10-10 03:59:57 -0600

kbarni gravatar image

Interesting problem. Did you check some articles in this field for ideas?

Anyway, counting individual grains (image 1) will probably give better results, as in kernels (image 2) you can't see all the grains (half of them are masked.

Based on my experience, it's better to work on the image acquisition conditions (especially lighting), it will make further work much easier.

For example you could put the grains on an opaque glass and provide a back light; expose for the background light, so the grains remain black over a white background in the image.

Then threshold the image and count the local maxima of the distance transform.

edit flag offensive delete link more


So instead of trying to train a perfect object detector - its sometimes easier to have "easy" training /detection conditions? This makes me think a bit - thank you!

holger gravatar imageholger ( 2019-10-10 19:42:28 -0600 )edit

This is especially true for agriculture-related applications - and it's even worse for images acquired in the field (outside).

The objects to detect are very diverse, the environment is complicated and the lighting conditions are catastrophic... you rather think first how to take images that will be easier to process.

Generally a well thought lighting can really help a lot!

kbarni gravatar imagekbarni ( 2019-10-11 06:02:37 -0600 )edit

Question Tools

1 follower


Asked: 2019-10-08 14:20:56 -0600

Seen: 432 times

Last updated: Oct 10 '19