【文件属性】:
文件名称:baidu_ocr:百度OCR文字识别API For Ruby Gems
文件大小:332KB
文件格式:ZIP
更新时间:2021-05-31 00:34:27
Ruby
BaiduOcr
百度OCR文字识别 For Ruby
Installation
Add this line to your application's Gemfile:
gem 'baidu_ocr', :git => 'https://github.com/rudyboy/baidu_ocr'
or
gem install baidu_ocr
And then execute:
$ bundle
Usage
require 'baidu_ocr'
# 参数说明
# 1. detectType
# LocateRecognize: 整图文字检测、识别,以行为单位(默认)
# Locate:整图文字行定位
# Recognize:整图文字识别
# SingleCharRecognize:单字图像识别
# 2. languageType
# CHN_ENG(中英)(默认)
# ENG(英文
【文件预览】:
baidu_ocr-master
----.gitignore(87B)
----README.md(6KB)
----bin()
--------console(334B)
--------setup(115B)
----Gemfile(119B)
----examples()
--------bit.jpg(190KB)
--------examples.rb(936B)
--------test.jpg(147KB)
----.rspec(31B)
----spec()
--------baidu_ocr_spec.rb(198B)
--------spec_helper.rb(79B)
----.travis.yml(30B)
----lib()
--------baidu_ocr()
--------baidu_ocr.rb(712B)
----Rakefile(28B)
----baidu_ocr.gemspec(1KB)