Google Vision OCR [CLOSED]

MODERN TALKING

Active Member
Licensed User
Longtime User
Hi guys,

Google Vision OCR used to work on an App with the API Key - but they have changed things, so the Code does not work any more

Maybe needs changes in the Manifest - don't know at all

Please can someone help me and I can pay USD 50 UP-FRONT - before you start

The mission is just to give me working Google Vision OCR code - where I take a picture of any text with the Native Phone Camera - and it gives me all the text from the picture

That's it

Thank you if you can help
 
 
I post the Code which USED TO WORK - tomorrow, along with the Manifest

But something has changed with the API - don't know how to get it working again
 
But I need it to be NON-DEPENDENT on any third-party Library

Please understand
You DID NOT mention this with a single word in #1!
Away from that a additional library is nothing bad. AND Google Vision IS AN ADDITIONAL Library too which must be included. It is part of google-Services?
 
You DID NOT mention this with a single word in #1!
Away from that a additional library is nothing bad. AND Google Vision IS AN ADDITIONAL Library too which must be included. It is part of google-Services?
Yeah Manfred, but it was a simple snippet of Code which used to work

You is da man - can you make it happen?

Das Mission ist: You wanna get all Text from a Picture using ONLY Google Vision OCR API

Eins, Zwei, Drei - YOU CAN DO IT
 
This is the Code which used to work years ago - needs an update me thinks, but I'm not smart enough ?

Can anyone help?

[CODE lang="b4x" title="Google Vision OCR API"]Dim Data As List
Data.Initialize
Dim map1,requests,image,features As Map
map1.Initialize
requests.Initialize
image.Initialize
features.Initialize
features.Put("type", "TEXT_DETECTION")
features.Put("maxResults", 100)
image.Put("content",base64.EncodeFromImage(File.DirRootExternal,E))
requests.Put("image",image)
requests.Put("features",Array As Map(features))
map1.Put("requests",Array As Map(requests))
Data.Add(map1)
Dim JSONGenerator As JSONGenerator
JSONGenerator.Initialize2(Data)
Dim job As HttpJob
job.Initialize("Google",Me)
job.PostBytes("https://vision.googleapis.com/v1/images:annotate?key=x", _
JSONGenerator.ToString.Replace("[","").Replace("]","").GetBytes("UTF8"))
job.GetRequest.SetHeader("Content-Type", "application/json")
job.GetRequest.SetContentType("application/json")
job.GetRequest.Timeout=60000[/CODE]
 
Back
Top