Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I have a suggestion.

  1. Isolate the large blob. Connected components should work, but there are other ways.
  2. Find the left-most pixel in every row (use the bounding box to make the search faster).
  3. Push the x position of the left pixels into an std::vector and use std::nth_median to find the median value.
  4. 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.

I have a suggestion.

  1. Isolate the large blob. Connected components should work, but there are other ways.
  2. Find the left-most pixel in every row (use the bounding box to make the search faster).
  3. Push the x position of the left pixels into an std::vector and use std::nth_median to find the median value.
  4. 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.