Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not detects images 100% #419

Open
hazhayder opened this issue Jan 19, 2020 · 0 comments
Open

Does not detects images 100% #419

hazhayder opened this issue Jan 19, 2020 · 0 comments

Comments

@hazhayder
Copy link

Hello, I am using a very short code preview to detect text from a bill which is in german language. I have placed deu.traineddate file but yet It stuck after reading the text Datum. I though this might be the problem with my image so I uploaded the image into an online OCR ocronline.net and it worked like a charm.
I am sharing the code and the image your help is really appreciated
`import UIKit
import TesseractOCR
class ViewController: UIViewController, G8TesseractDelegate {

@IBOutlet weak var textView: UITextView!
override func viewDidLoad() {
    super.viewDidLoad()
    let myImage = UIImage(named: "demoText")
    
    if let tesseract = G8Tesseract(language: "deu") {
        tesseract.pageSegmentationMode = .singleChar
        tesseract.biner
        tesseract.delegate = self
        tesseract.image = UIImage(named: "demoText")
        tesseract.engineMode = .lstmOnly
        print(tesseract.recognizedText)
        print(tesseract.recognizedHOCR(forPageNumber: 1))
        textView.text = tesseract.recognizedText
        
    }
    
    
}

func progressImageRecognition(for tesseract: G8Tesseract!) {
    print("Recognition Progress \(tesseract.progress) %")
}

override func didReceiveMemoryWarning() {
    super.didReceiveMemoryWarning()
    // Dispose of any resources that can be recreated.
}

}
`

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant