how to detect waterdroplet in given images

asked 2019-06-13 06:24:52 -0500

Hi, I am using python programming to detect water droplet its size and position in these images in real time image processing scenario. I used opencv version 4 in python. I already used canny edge detection, thresholding approach but it didn't work. So I used the haar cascade approach which worked on the previous image but not on new images. Can you please suggest me any other approach for this.image description image descriptionimage description

edit retag flag offensive close merge delete

Comments

I think the fast radial symmetry transform (Roy&Zelinsky 2003) is worth trying: article

kbarni gravatar imagekbarni ( 2019-06-14 05:26:50 -0500 )edit

thank you for your response. Can you please tell me how can I implement this algorithm in python. I tried https://pypi.org/project/frst/ and https://github.com/ChristianGutowski/... but the documentation doesn't show how to implement their program.

langtang1123 gravatar imagelangtang1123 ( 2019-06-17 03:51:50 -0500 )edit

Use an accumulator image.

Get the gradients (gx,gy), calculate its magnitude and directions (cartToPolar), then for each pixel add a +1 and a -1 to the accumulator image in the positive and negative gradient direction at a given distance D from the current pixel.

For example for a gradient direction 0° (horizontal) in the pixel (100,100) and D=10, you add +1 to (110,100) and -1 to (90,100).

kbarni gravatar imagekbarni ( 2019-06-17 07:19:12 -0500 )edit