使用Pytesseract在另一行中获取OCR文本

时间:2018-07-24 11:23:19

标签: python image python-tesseract

当我在Pytesseract中尝试image_to_string时,图像的同一行中包含文本,但是输出的不同行中具有相同的文本。

我需要在OCR之前进行任何图像处理吗?

This Is the image I am using for OCR

This is the Output

1 个答案:

答案 0 :(得分:0)

您必须使用额外的配置参数psm。将该值设置为6。

pytesseract.image_to_string(image, lang="eng", config="--psm 6")

希望这会有所帮助!