Ask Your Question
0

Detect white droplets height on surface

asked 2016-08-18 13:59:35 -0600

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

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-08-18 19:49:51 -0600

Tetragramm gravatar image

updated 2016-08-18 19:50:33 -0600

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.

edit flag offensive delete link more

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 ( 2016-08-23 08:50:25 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2016-08-18 13:59:35 -0600

Seen: 579 times

Last updated: Aug 18 '16