用于处理 Tesseract OCR 的 Ruby 库。
用于处理 Tesseract OCR 的 Ruby 库。
检查是否安装了 tesseract ocr 程序: $ tesseract --version 如果没有,您可以使用如下命令安装它们: $ apt install tesseract-ocr 或者 $ brew install tesseract 或者为 Heroku 22 添加 buildpack https://github.com/pathwaysmedical/heroku-buildpack-tesseract 将以下一行添加到您应用程序的 Gemfile 中:
gem 'rtesseract'然后执行: $ bundle 或者自己安装如下: $ gem install rtesseract
使用 rtesseract 非常简单。
image = RTesseract.new("my_image.jpg")
image.to_s # Getting the value image = RTesseract.new("my_image.jpg")
image.to_pdf # Getting open file of pdf image = RTesseract.new("my_image.jpg")
image.to_tsv # Getting open file of tsv这将保留生成的 PDF 中的图像颜色、图片和结构。
检查仓库后,运行 bin/setup 以安装依赖项。然后,运行 rake spec 以运行测试。您还可以运行 bin/console 以获得交互式提示,从而进行实验。要将此宝石安装到本地机器上,请运行 bundle exec rake install。要发布新版本,请在 version.rb 中更新版本号,然后运行 bundle exec rake release。这将为版本创建一个 git 标签,推送 git 提交和标签,并
暂无开放 Issues,或尚未同步最近议题。