栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 面试经验 > 面试问答

Pytesseract OCR多个配置选项

面试问答 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

Pytesseract OCR多个配置选项

tesseract-4.0.0a
支持下面
psm
。如果要具有单个字符识别,请设置
psm =10
。并且如果您的文本仅包含数字,则可以设置
tessedit_char_whitelist=0123456789

Page segmentation modes:  0    Orientation and script detection (OSD) only.  1    Automatic page segmentation with OSD.  2    Automatic page segmentation, but no OSD, or OCR.  3    Fully automatic page segmentation, but no OSD. (Default)  4    Assume a single column of text of variable sizes.  5    Assume a single uniform block of vertically aligned text.  6    Assume a single uniform block of text.  7    Treat the image as a single text line.  8    Treat the image as a single word.  9    Treat the image as a single word in a circle. 10    Treat the image as a single character. 11    Sparse text. Find as much text as possible in no particular order. 12    Sparse text with OSD. 13    Raw line. Treat the image as a single text line,  bypassing hacks that are Tesseract-specific.

这是

image_to_string
带有多个参数的示例用法。

target = pytesseract.image_to_string(image, lang='eng', boxes=False,         config='--psm 10 --oem 3 -c tessedit_char_whitelist=0123456789')

希望这可以帮助。



转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/637770.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号