Detailed documentaion on computerVisionClient.read() (In JavaScript)

ethan hubbartt 1 Reputation point
2021-08-16T14:47:35.467+00:00

I am working on a project where I need to take a picture with a camera and then use that image to call the computerVision API for OCR. In the documentation, it mentions that you can use an image URL or an absolute path to a file. Are there other param options for "computerVisionClient.read(URL)." One option that I would like to do is pass the image as a base64 string but I do not see documentation about how to do this.

edit: i can only really find examples of using the URL passed through the the API. In the documentation is says to use

// To recognize text in a local image, replace client.read() with readTextInStream() as shown:

but when i try taht it just says that readTextInStream() is not a function

i am trying to convert a base64 string to binary then pass it to the API since the documentations says that you can do that but for some reason there are no examples and no documentaion that i can find that works for this use case.

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
371 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. YutongTie-MSFT 51,696 Reputation points
    2021-08-16T22:20:18.147+00:00

    Hello,

    I think this is the document you are looking for: https://video2.skills-academy.com/en-us/dotnet/api/microsoft.azure.cognitiveservices.vision.computervision.computervisionclient.readwithhttpmessagesasync?view=azure-dotnet

    You can find more methods on the left bar.

    Hope it helps.

    Regards,
    Yutong


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.