简体   繁体   中英

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%. How to fix that ? Before tesseract is called, CPU usage is ~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%.

OCR is expected to be a CPU intensive task.

How to fix that?

You can try to reduce the number of pixels fed to 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. Most are commercial but offer increased quality in some situations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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