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

baidu-ocr-api

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

baidu-ocr-api

OCR for baidu api

  • 1.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-85.71%
Maintainers
1
Weekly downloads
 
Created
Source

Baidu-OCR-API for nodejs

NPM version Build Status Coveralls Status

Downloads

Install

npm install baidu-ocr-api --save

Usage

登陆 百度bcs控制台中心 申请access key

参看 examples

var ak = 'your ak';
var sk = 'your sk';
var ocr = require('baidu-ocr-api').create(ak,sk);
var opt= {
  //  url can be a cdn url, or a local url like : __dirname+'/test.jpg'  
  url:'http://7xod3k.com1.z0.glb.clouddn.com/fbuguhlemsgeilpkxykeluenbjkozzne',
  // type: line,text,character default:line
  type:'line',
  language:'CHN_ENG'
}
ocr.scan(opt,function (err,result) {
    if(err){
      return console.log(err);
    }
    console.log(result); // 参看 examples

})


opt

字段名选项描述
urlcdn 地址
本地地址: __diranme+'/test.jpg'
必选目标地址
typetext:识别某张图中的所有文字
line: 将结果作为单行文字去解析
character:识别某张图中的单个文字
可选(默认:line)返回结果结构
language,
可选 : CHN_ENG/CHN/ENG
可选
默认:CHN_ENG
返回语言类型

test

make test
make cov # Coverage rate

license MIT

Keywords

FAQs

Package last updated on 16 Jul 2016

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