OpenCV - Removal of noise in image

后端 未结 9 1615
爱一瞬间的悲伤
爱一瞬间的悲伤 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:35

    I had already faced the same issue and got the best solution. Convert source image to grayscale image and apply fastNlMeanDenoising function and then apply threshold.

    Like this -

    fastNlMeansDenoising(gray,dst,3.0,21,7);
    threshold(dst,finaldst,150,255,THRESH_BINARY);
    

    ALSO use can adjust threshold accorsing to your background noise image. eg- threshold(dst,finaldst,200,255,THRESH_BINARY);

    NOTE - If your column lines got removed...You can take a mask of column lines from source image and can apply to the denoised resulted image using BITWISE operations like AND,OR,XOR.

提交回复
热议问题