'python cv2 remove black noise inside the white color

what i need what i have

I tried many ways but it didn't remove the black dot inside the white. How do I get it off white?



Solution 1:[1]

Since I'm not sure what you've tried already, I would recommend looking into contiguous thresholding or open contours as in this answer.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 BbJug