This forum is disabled, please visit https://forum.opencv.org

1 | initial version |

I have a suggestion.

- Isolate the large blob. Connected components should work, but there are other ways.
- Find the left-most pixel in every row (use the bounding box to make the search faster).
- Push the x position of the left pixels into an std::vector and use std::nth_median to find the median value.
- That's your line edge. Then the very left-most pixel is the top of the droplet, and you have the height of the droplet in pixels.

2 | No.2 Revision |

I have a suggestion.

- Isolate the large blob. Connected components should work, but there are other ways.
- Find the left-most pixel in every row (use the bounding box to make the search faster).
- Push the x position of the left pixels into an std::vector and use std::nth_median to find the median value.
- That's your line edge. Then the very left-most pixel is the top of the droplet, and you have the height of the droplet in pixels.

This should work so long as your laster is vertical. If there's a rotation, it won't work properly.

Copyright OpenCV foundation, 2012-2018. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.