Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Google Vision OCR randomly not detecting negative signs

Dan72
New Member

Hi All,

I am trying to extract values from a financial document using Google Vision OCR and for an unknown reason the negative sign is randomly not recognized by Google Vision OCR. 

I've tried changing boundary boxes, contrasting, gray scaling and light touch gaussian blurs to make it stand out but I don't seem to make any progress.

Can anybody please help with some advice or fixes for this etc.

Dan72_0-1739526006125.png

Thanks

Kind Regards

0 1 101
1 REPLY 1

Hi @Dan72,

Welcome to Google Cloud Community!

It looks like you are encountering inconsistent recognition of negative signs by your Google Vision OCR in financial documents. The OCR engine often misses the "-" symbol, causing errors in data extraction.

Here are the potential ways that might help with your use case:

  • Bounding Box Adjustment: Make sure that your bounding boxes are tightly encompassing the numbers, including the negative sign.
  • Language Hints: You may provide language hints to the OCR engine if you know the expected language. It may help to improve the accuracy of your OCR process.
  • Post-Processing: You may use regular expressions to specifically look for patterns like "[space]" or "[newline]" followed by a number, this ensures the negative sign is correctly included.
  • Image Resolution and DPI: Ensure your input image has a sufficiently high resolution. A higher DPI (dots per inch) means more detail for the OCR engine to work with. Aim for at least 300 DPI, if possible. Additionally, If your original image is very low-resolution, simply upscaling it without any preprocessing can sometimes worsen results by amplifying noise.

For more detailed information, you can refer to the following documentation on Google Cloud's Document AI and Cloud Vision API:

Was this helpful? If so, please accept this answer as “Solution”. If you need additional assistance, reply here within 2 business days and I’ll be happy to help.