OpenCV for OCR: How to compute thresholding levels for gray image OCR

后端 未结 3 1833
無奈伤痛
無奈伤痛 2020-12-10 00:03

I\'m trying to prepare images for OCR, and so far here is what I\'ve done using info from Extracting text OpenCV

From the resulting image I use the contours that hav

3条回答
  •  庸人自扰
    2020-12-10 00:51

    You could try to erase all the text with an erosion and then subtract the result from the grayscale image or use a tophat transform instead to uniform your background for global thresholding! Here you can find an example code! And why not use the existing adaptiveThreshold function ?

提交回复
热议问题