How to remove this type of pixels
Examples :
CodePudding user response:
You can try morphological transformations such as Opening or Erosion.
This is the documentation of OpenCV where you can find more information. https://docs.opencv.org/4.x/d9/d61/tutorial_py_morphological_ops.html
It's hard to tell which method would give better results without knowing anything more specific.