[英]Tesseract CPU Usage 100%
I'm trying to read business card using Tesseract but when I do that Phone's CPU usage goes to 100%. 我正在尝试使用Tesseract读取名片,但是当我这样做时,Phone的CPU使用率将达到100%。 How to fix that ? 如何解决? Before tesseract is called, CPU usage is ~1%. 在调用tesseract之前,CPU使用率约为1%。 Also I'm getting poor result in reading. 另外,我的阅读结果也越来越差。 How to increase that accuracy? 如何提高精度?
let tesseract:G8Tesseract = G8Tesseract(language:"eng");
tesseract.delegate = self;
tesseract.image = image
tesseract.recognize();
NSLog("%@", tesseract.recognizedText);
if let recognizedText = tesseract.recognizedText{
print(recognizedText)
}
[...] using Tesseract but when I do that Phone's CPU usage goes to 100%. [...]使用Tesseract,但是当我这样做时,Phone的CPU使用率达到100%。
OCR is expected to be a CPU intensive task. 预计OCR是一项CPU密集型任务。
How to fix that? 如何解决?
You can try to reduce the number of pixels fed to Tesseract. 您可以尝试减少送入Tesseract的像素数量。 That means reducing the image's resolution or use a tighter crop. 这意味着降低图像的分辨率或使用较紧的裁切。
Also I'm getting poor result in reading. 另外,我的阅读结果也越来越差。
One possibility would be to use image preprocessing to enhance detection quality. 一种可能性是使用图像预处理来提高检测质量。 Another option is to use a different OCR library. 另一种选择是使用其他OCR库。 Most are commercial but offer increased quality in some situations. 大多数都是商业性的,但在某些情况下会提高质量。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.