Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cognitive-vision-ocr

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cognitive-vision-ocr

OCR using Microsoft Cognitive Vision

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Microsoft Cognitive Services Vision OCR Client

Install

npm i cognitive-vision-ocr

Usage

In the example below image is sent for recognition as a buffer and response is returned in gcloud vision format(if you don't need to convert a response to gcloud format just remove gcloud option from request as well as imageSize because it is used only for converting)

var ocr = require("./index");
var fs = require("fs");

var image = fs.readFileSync("./test.jpg");

ocr({
  key: "PUT YOUR API KEY HERE",
  image: image,
  gcloud: true,
  imageSize: {
    width: 728,
    height: 546
  }
}).then((data) => {
  console.log(JSON.stringify(data[1].responses[0].textAnnotations));
}).catch((err) => {
  console.log(err);
});

Keywords

FAQs

Package last updated on 25 Dec 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc