-
Notifications
You must be signed in to change notification settings - Fork 649
Closed
Labels
api: visionIssues related to the Cloud Vision API.Issues related to the Cloud Vision API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Environment details
- OS: MacOS
- Node.js version: 8.1.4
- npm version: 5.0.3
- @google-cloud/vision version: 0.11.4
Steps to reproduce
As it is pretty clear, you'd expect it to return the capital letter "M" in the text detection field.
- Fire up a text editor and run the below node snippet in a env that already has GCloud authentification setup. You will also need the Vision API enabled
'use strict';
const vision = require('@google-cloud/vision')();
const options = {
imagePath: __dirname + '/sample.png'
}
vision.detectText(options.imagePath).then((result) => {
console.log('this is the result', JSON.stringify(result));
});Now the result looks like this:
[
[
],
{
"responses":[
{
"faceAnnotations":[],
"landmarkAnnotations":[],
"logoAnnotations":[],
"labelAnnotations":[],
"textAnnotations":[],
"fullTextAnnotation":null,
"safeSearchAnnotation":null,
"imagePropertiesAnnotation":null,
"cropHintsAnnotation":null,
"webDetection":null,
"error":null
}
]
}
]If i test the same sample image on GCloud Vision landing page demo, the result is correct: the letter M

https://cloud.google.com/vision/
Since this is a pretty clear image and 1 single character, I'm having trouble understanding why does the accuracy differ.
I noticed this issue also on other sample images - they work in the demo but not using the Node SDK.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
api: visionIssues related to the Cloud Vision API.Issues related to the Cloud Vision API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
