This is my first question here so I'll try to be as relevant as possible. I am interested in using Cloud Vision to process some documents, as I need OCR capabilities. I also happen to need bar code reading, which I currently have implemented using ZXing.
I stumbled upon the BARCODE blocktype in the OCR ( https://cloud.google.com/vision/docs/reference/rest/v1/images/annotate#BlockType ) but I did not manage to produce such a block, even with an image containing only a bar code.
Hence the question: is the feature implemented, and if so, how can we get it to work ? Thank you for your time !
Note:
I have seen those related questions:
- Does google cloud vision OCR support bar code reading?
- How can I call or emulate Google Mobile Vision API in Google Cloud?
But they do not satify me as I need both the barcode reading and the OCR, and I am doing work on backend only, no user involved.
Edit:
I have tried for example with this image :
~/Pictures
» gcloud ml vision detect-text barcode.jpg | grep -i "blocktype"
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
~/Pictures
» gcloud ml vision detect-document barcode.jpg | grep -i "blocktype"
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
"blockType": "TEXT",
I also tried with this one
~/Pictures
»gcloud ml vision detect-text barcode.png
{
"responses": [
{}
]
}
~/Pictures
» gcloud ml vision detect-document barcode.png
{
"responses": [
{}
]
}