![](/img/trans.png)
[英]How to set different Font sizes for different iPhone screen size using storyboard?
[英]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.