Find a grid and analyze it



Hi guys,

I have that kind of images

I’m trying to extract the grid and automatically count how many squares there is.

With some processing I manage to have some kind of result :

I’d like to know how to have a full grid from those results (or with another method) because I’m unable to think of a way to count the squares with that. Any ideas ?


Germination count on trays
Multiple data point on image

Good day!

Your image isn’t taken in an optimum fashion. It shows geometric distortions.

If you could acquire the image without distortion it would be much easier to analyze.
The tray should be really rectangular.



Here are the projections (vertical and horizontal) of a central selection of your gray-scale image:


If you count the local maxima (after some smoothing of the curves) or the local minima plus one, then you get the desired number by multiplying the number of maxima in each plot, i.e. for the sample image 16x11 = 176.


Sadly I won’t be able to have better picutres.

But thanks you so much with your answer, it is so really smart, I’ll try to do something with that !

J. Ben