locked
Poor quality OCR RRS feed

  • Question

  • Hi, 

    I'm just beginning to try out the OCR functionality in the Cognitive Services API. 

    Using the sample code in Python, I was able to get the program running, but the quality of the recognition is very poor.

    In contrast, the same image gives excellent results on the demo page, https://azure.microsoft.com/en-in/services/cognitive-services/computer-vision/

    How can I get similar quality of results as achieved by the demo?

    Thanks

    Friday, May 10, 2019 6:06 AM

Answers

  • Hello,

    You can use the API and check if the results are satisfactory. 

    For response code 202 you receive the operation location header. Client side should further query the read operation status using the URL specified in this header. The operation ID will expire in 48 hours. 

    This operation id can be queried using the read operation result API to get the response. 

    You can checkout the sample code for .NET and Python where .NET code actually uses recognizeprintedtextasync to read the information of an image which contains nutritional information.

    -Rohit

    • Marked as answer by PrashanthBhat Monday, May 13, 2019 10:12 AM
    Monday, May 13, 2019 9:04 AM

All replies

  • Hi, Can you please point to the sample code to verify.
    Friday, May 10, 2019 9:18 AM
  • Hello,

    I think you are using the OCR API to test. Could you please try to use the Read API? You can use both 'Printed' and 'Handwritten' modes to extract text. You can use the sample code for reference or use the API portal to test the same.


    -----------------------------------------------------------------------------------------------------------
    If you found this post helpful, please give it a "Helpful" vote. 
    Please remember to mark the replies as answers if they help.

    Friday, May 10, 2019 9:54 AM
  • Thank you for the suggestion.

    It looks like the Read API is more targeted towards text heavy scenarios, like pages out of a book. I'm dealing with images of products (for example, the image of a box of cereal).

    Would this still be handled well by the Read API?

    Also, for the Read API, I'm getting a response code of 202, not a success code.

    Thanks.

    Saturday, May 11, 2019 11:01 AM
  • Hello,

    You can use the API and check if the results are satisfactory. 

    For response code 202 you receive the operation location header. Client side should further query the read operation status using the URL specified in this header. The operation ID will expire in 48 hours. 

    This operation id can be queried using the read operation result API to get the response. 

    You can checkout the sample code for .NET and Python where .NET code actually uses recognizeprintedtextasync to read the information of an image which contains nutritional information.

    -Rohit

    • Marked as answer by PrashanthBhat Monday, May 13, 2019 10:12 AM
    Monday, May 13, 2019 9:04 AM
  • Thanks for the informative response.
    Monday, May 13, 2019 10:13 AM