Threshold of blurry image - part 2

前端 未结 6 1713
死守一世寂寞
死守一世寂寞 2021-02-03 11:40

How can I threshold this blurry image to make the digits as clear as possible?

In a previous post, I tried adaptively thresholding a blurry image (left)

6条回答
  •  北海茫月
    2021-02-03 11:48

    Some hints that you might try out:

    • Apply the morphological opening in your original thresholded image (the one which is noisy at the right of the first picture). You should get rid of most of the background noise and be able to reconnect the digits.

    • Use a different preprocessing of your original image instead of morpho closing, such as median filter (tends to blur the edges) or bilateral filtering which will preserve better the edges but is slower to compute.

    • As far as threshold is concerned, you can use CV_OTSU flag in the cv::threshold to determine an optimal value for a global threshold. Local thresholding might still be better, but should work better with the bilateral or median filter

提交回复
热议问题