仅在我的iOS应用程序中将tesseract字符限制为a-z和数字 [英] Limit tesseract character to a-z and number only in my iOS app

查看:142
本文介绍了仅在我的iOS应用程序中将tesseract字符限制为a-z和数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用tesseract来识别我的iOS项目之一中的字符.现在正在读取所有字符,包括字母数字字符.但是我只想读取字符a-z和数字0-9.我遵循了> tesseract正在寻找的限制字符,但无法弄清楚我可以在我的iOS应用中实现此功能.

I am using tesseract for recognizing character in one of my iOS project. It is now reading all characters including alpha numeric character. But I want to read only character a-z and numbers 0-9. I followed Limit characters tesseract is looking for, but can't figure out how can I implement this in my iOS app.

任何人都可以建议我如何在我的iOS项目中实现这一目标.

Can anyone suggest me how can I implement this in my iOS project.

推荐答案

您可以在提取之前使用TessBaseAPI.SetVariable指定白名单(允许的字符)

You can specify the white list (allowed characters) using TessBaseAPI.SetVariable prior to extraction

 tesseract->SetVariable("tessedit_char_whitelist", "abcdefghijklmnopqrstuvwxyz012345789");

这篇关于仅在我的iOS应用程序中将tesseract字符限制为a-z和数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆