I am using Opencv and python to detect shapes and then crop them. I have succeeded to do that, however now I am trying to take the cropped images and remove their backgrounds.
The image has a circle inside and surrounded by gray color. (It can be gray or can be even more than one color).
How can I remove the colors surrounding the circle border (which is black) - we can convert the gray color to black - as the border color or even remove it at all and make that transparent.
The result image should contain only the circle.