How remove 'bubble' contours from 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.
Basically you want to separate shapes. This can be done with the shape module and with the moments of the blob.
Thank you Steven, do you have a sample code as direction ?
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.
unfortunatelly bubbles are not regular as you cam see from images