Computer Vision OCR can only be used with URL

Eche 21 Reputation points

Can i use the Computer Vision cognitive services with javascript but instead of using an URL attached to an image, using an image that i upload from my pc.

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
332 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,522 questions
0 comments No comments
{count} votes

Accepted answer
  1. GiftA-MSFT 11,161 Reputation points

    Hi, thanks for reaching out. It seems you want to read using local image instead of image url. Yes, this can be done by specifying content-type as 'application/octet-stream' in the request header. For example:

    var request = require('request');  
    var options = {  
      'method': 'POST',  
      'url': '',  
      'headers': {  
        'Ocp-Apim-Subscription-Key': 'enter-key-here',  
        'Content-Type': 'application/octet-stream'  
      body: "<file contents here>"  
    request(options, function (error, response) {  
      if (error) throw new Error(error);  

    You may also find this thread helpful.


    --please don't forget to Accept Answer if the reply is helpful. Thanks.--

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful