OpenCV - Removal of noise in image

后端 未结 9 1722
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-04 01:01

I have an image here with a table.. In the column on the right the background is filled with noise

How to detect the areas with noise? I only want to apply some kind of

9条回答
  •  不要未来只要你来
    2021-02-04 01:42

    Try thresholding the image like this. Make sure your src is in grayscale. This method will only retain the pixels which are between 150 and 255 intensity.

    threshold(src, output, 150, 255, CV_THRESH_BINARY | CV_THRESH_OTSU);
    

    You might want to invert the image as you are trying to negate the gray pixels. After the operation, invert it again to get your desired result.

提交回复
热议问题