Measurements of curved spores

I am working in an automatical fungi spores measurements program. I detect the spores contours with instance segmentation and calculate length and width with opencv functions. But some spores are curved and I have no idea of what to do with them. An idea please ?
Thank you !
Best regards
Example of curved spore :

I couldn’t see the photo. Can you paste it here?

If you have contours, you can classify them through moments and Hu invariants.

yes but with the moments I can’t measure the length and width of the spore, the length is the maximum length along the middle of the spore and the width is the minimum length of the spore

you can use moments to estimate the angle of the major axis, then calculate the length along that axis (either project onto axis, or rotate)


You can classify contours with their moments.

You can also get the contour center, orientation and eccentricity.

About width, length and middle of the spore, I don’t think there is a function to measure that, but you can measure them over a contour providing you can come with a geometric definition of those elements.

Let’s say you can define and calculate the so called middle point of a spore: you can traverse all contour points and get the closest and farthest ones, those with min or max distance to that point.

thank you but I suck at mathematics and don’t understand concepts of moments, orientation and eccentricity.

OK, don’t worry about them.

You can try using thinning on each spore, so it produce a curved line representing the length of a curved spore.

The following post is about thinning:

1 Like

Ok thank you, question resolved

1 Like