Closed fritzfr closed 5 years ago
I think if you add: .v1 to this line of code 'const vision = require('@google-cloud/vision').v1;' it works:
and it will also solve many other problem.
I think you need also use this 'client.documentTextDetection(gs://${bucketName}/${filename}
)' instead of '.textDetection(gs://${bucketName}/${filename}
)'
hope it goes well.
Hm, doesn't look like this changed much for me.
@felix-voicehub looks like in the Node.js sample you're referencing it uses the textAnnotations
field of the response, but it would appear that the vision demo is using fullTextAnnotations
field instead.
@callmehiphop how do I use the fullTextAnnotations. When attempting to the method I get a typeError TypeError: client.fullTextAnnotations is not a function
@Louis345 interesting, would you be willing to open a new issue that contained some code to reproduce the issue you are seeing?
@callmehiphop I figured it out. FullTextAnnotation is a response, not a method.
Sounds like everything is working out. Let us know if there's more we can help with!
Hi,
I am trying to understand why the response I am getting from the API using this library is different form the JSON result on the demo (https://cloud.google.com/vision/). Lets take this image for example:
link
With the example code (https://cloud.google.com/vision/docs/ocr#detect_text_in_a_local_image) I am getting for every
text
result aconfidence
of 0, also thelocale
is empty for every single element.With the demo however, there are values for each of these if you open the JSON dropdown below the demo. Why is there a difference here?
Environment details
@google-cloud/vision
version: 1.1.3Steps to reproduce