I'm using google cloud vision API trying to detect text from maps. The image size I'm processing is less than 20MB and it is stored in cloud storage. When I run the document_text_detection API, some of the images lead to the following error (some were processed successfully)
Something went wrong with the Vision API:code: 3 message: "Bad image data"
I wonder what could be the reason? I tried convert the jpeg file to png format and then convert back. The image that is problematic is here.
Any suggestions would be appreciated.
Seems like converting jpg files to png format could do the trick. The only problem is that the png file might be too big for the API to accept. In this case, I managed to reduced the image size by either lowering the image quality or shrink the image to smaller width and height.