繁体   English   中英

如何通过使用OCR的可识别文本从名片上的字体大小获取识别文本的字体大小以识别名称:iPhone

[英]How to get font sizes of recognized text to Recognize Name using font size on the Business Card form the Recognized text using OCR: iPhone

我已经使用OCR通过iPhone实现了Business Card Reader App。

Tesseract库是一个开源库。 API

主要议程是何时从名片中识别文本。 我需要将名称和电子邮件地址以及电话号码传递到相应的字段。

用他们的表达式格式来做电子邮件地址和电话号码。

但如果是NAME,则其他一些文本具有相同的格式 ,因此我们可以使用字体大小来选择它

How to get font sizes of recognized text to Recognize Name using font size on the Business Card form the Recognized text using OCR...?

试试这个-

UIFont *font = totalLabel.font;
CGFloat maxHeight = font.lineHeight * totalLabel.numberOfLines;
CGFloat maxWidth = totalLabel.frame.size.width;
CGSize size = [totalLabel.text sizeWithFont:font constrainedToSize:(CGSize){maxWidth, maxHeight} lineBreakMode:totalLabel.lineBreakMode];

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM