How remove 'bubble' contours from image

asked 2017-08-23 11:56:31 -0600

procton gravatar image

I am trying to remove a kind of "bubble" contours from my images. I can draw them scrolling the list of PointOfMat retrieved with Imgproc.findContours, but I am not able to detect them between others. I tried working on number of vertices, but no way. A sample is here or here (high definition). I prefer Java, but any help in any coding language would be much appreciated.

edit retag flag offensive close merge delete

Comments

Basically you want to separate shapes. This can be done with the shape module and with the moments of the blob.

StevenPuttemans gravatar imageStevenPuttemans ( 2017-08-24 07:36:05 -0600 )edit

Thank you Steven, do you have a sample code as direction ?

procton gravatar imageprocton ( 2017-08-24 19:58:20 -0600 )edit

If the bubble has a regular shape, you might try to detect the arcs of circle (forming the bubble) using a circular Hough with a predefined radius. Then, erase the contour of the detected circles and regenerate the image using inpainting.

kbarni gravatar imagekbarni ( 2017-08-25 08:12:53 -0600 )edit

unfortunatelly bubbles are not regular as you cam see from images

procton gravatar imageprocton ( 2017-08-29 17:57:38 -0600 )edit