Ask Your Question
0

Detect white droplets height on surface

asked Aug 18 '16

Miela gravatar image

I want to get a height profile of white water droplets on a surface. My plan is to project a line laser perpendicular on the surface and observing it from a 45 degree angle.

As seen in the image below I've manage to isolate only the red line and one can clearly see the bump in the line which represents the water droplet. My plan is now to determine the height of the droplet but I can't find a way to remove the noise on the line in a fast manner. I'm still new to OpenCV and any suggestions will be greatly appreciated.image description

Preview: (hide)

1 answer

Sort by » oldest newest most voted
0

answered Aug 19 '16

Tetragramm gravatar image

updated Aug 19 '16

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.

Preview: (hide)

Comments

Also take a look at thinning, which is awaiting integration into OpenCV! Combine that with erosion and dilation (morphology) and it will suit your exact needs!

StevenPuttemans gravatar imageStevenPuttemans (Aug 23 '16)edit

Question Tools

1 follower

Stats

Asked: Aug 18 '16

Seen: 620 times

Last updated: Aug 18 '16