我在Windows 10上,我尝试从这张图像中提取数字
使用pytesseract
语言库lets
(参见https://github.com/adrianlazaro8/Tesseract_sevenSegmentsLetsGoDigital或LetsGoDigital,参见https://github.com/arturaugusto/display_ocr)
我对我的图像进行了预处理(灰度、阈值和腐蚀),以获得:
但是
pytesseract.image_to_string(img, lang='lets')
是空的
您没有设置任何特定的page segmentation method。我会在这里选择
psm 6
:因此,即使没有进一步的预处理,我也能得到正确的结果:
相关问题 更多 >
编程相关推荐