- Haven OnDemand Developer Community
- >
- Wiki
- >
- How to optimize results from the OCR API when extr...
- Article History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Email to a Friend
- Printer Friendly Page
- Report Content
How to optimize results from the OCR API when extracting text from an image?
Question
How to optimize results from the OCR API when extracting text from an image?
Answer
Please note that HP IDOL OnDemand is now HPE Haven OnDemand. The API endpoints have changed to Haven OnDemand. Please see the API documentation for more details.
---
Using the OCR api, there are a few tricks you can use to improve the results for your request.
A clean image with sharp, dark type font on a white background will greatly effect the capacity of OCR to identify your text. So make sure, your lighting is optimal and you don't shake when you snap a picture with your mobile camera.
The larger the image the more detail, and the OCR engine can take background distortions as possible text. So instead of making your results clearer, in this case a larger picture with a lot of miniscule details may actually not give you the best result. On the other hand, when the image is too small, you obviously start to loose sharpness of your font and the image starts to pixelize. Depending on the quality of the camera you take photo's with, the quality of the photo's can become too distorting. So it might take you some testing to find the best results settings.
Notice the 'mode' parameter in the OCR api. When you use photo's from your mobile camera, try using the 'scene_photo' mode, instead of the default 'document_photo', which can be used to process professional images, automated images, screenshots and scans for instance. The IDOL OnDemand engine treats different types of images differently, in order to get the best results.