简体   繁体   中英

How can I recognize handwritten numbers within an image in an iOS app?

I'm trying to develop an iOS app that allows the user to take a photograph of a handwritten phone number. Is there any library available that will allow me to extract the numerical values from the handwriting in this picture?

First you need to use OCR to recognize the text from the image. One of the most popular open0source libraries used for iOS OCR is a Google-sponsored open source project called tesseract .

Here's how to compile OCR for iOS:

http://robertcarlsen.net/2010/09/24/compiling-tesseract-v3-for-iphone-1299

After you get the text, do this to call the number:

NSString *phoneURLString = [NSString stringWithFormat:@"tel:%@", phoneNumberFromOCR];
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:phoneURLString]]];

I would put the above code in an IBAction connected to a button maybe called "Call", so when the user presses the "Call" button, this code is called and the number recognized from the image is called.

Hope this helps!

Try OpenCV and tesseract-ocr. Good luck, you've got your work cut out for you.

http://opencv.org/
https://code.google.com/p/tesseract-ocr/

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