The images I am working on are like this one
The image above is a thresholded shrimp image. How can I calculate the length of a shrimp? I tried using the ximproc.thinning() function but it still didn’t work.
Thanks for your help!
The images I am working on are like this one
The image above is a thresholded shrimp image. How can I calculate the length of a shrimp? I tried using the ximproc.thinning() function but it still didn’t work.
Thanks for your help!
I don’t know what is shrimp length .
May be you can find contour and use approxPolyDP() to get some length
such questions show up occasionally.
last time, someone wanted to measure snakes, fish, or microscopic worms.
the usual approach:
I would not recommend working with contours here. no need for approxpolyDP at all. even if you have a contour of a thin thing, you’d have to figure out how to calculate a midline in this contour. that would require you to match every contour point to another contour point “half a circumference” away but spatially closest. that could be made to work but I haven’t explored that, so I would not pick that approach first.
I can’t make the shape thinner but still keep its original shape. Can you show me the thinning method and how to calculate the length through code? I’m new to this field so it’s difficult to apply the in-depth things. Thank you very much for your reply!
This is image input
thank you so much about your reply