Giter Site home page Giter Site logo

rtesseract's Introduction

rtesseract

Ruby library for working with the Tesseract OCR.

REQUIREMENTS:

To work properly rtesseract are needed:

  • Tesseract - Program

  • ImageMagic - Program

  • RMagick - Gem

EXAMPLE USAGE

It’s very simple to use rtesseract:

CONVERT IMAGE TO STRING

image = RTesseract.new("my_image.jpg")
image.to_s #Getting the value

CHANGE THE IMAGE

image = RTesseract.new("my_image.jpg")
image.source = "new_image.png"
image.to_s

CONVERT PARTS OF IMAGE TO STRING

mix_block = RTesseract::Mixed.new("test.jpg") do |image|
  image.area(28,  19, 25, 25)
  image.area(180, 22, 20, 28)
  image.area(218, 22, 24, 28)
  image.area(248, 24, 22, 22)
end
mix_block.to_s

OR

mix_block = RTesseract::Mixed.new("test.jpg",{:areas => [
  {:x => 28,  :y=>19, :width=>25, :height=>25 },
  {:x => 180,  :y=>22, :width=>20, :height=>28},
  {:x => 218,  :y=>22, :width=>24, :height=>28},
  {:x => 248,  :y=>24, :width=>22, :height=>22}
]})
mix_block.to_s

Note on Patches/Pull Requests

  • Fork the project.

  • Make your feature addition or bug fix.

  • Send me a pull request. Bonus points for topic branches.

Copyright © 2010 Danilo Jeremias da Silva. See LICENSE for details.

rtesseract's People

Contributors

dannnylo avatar scrumers avatar thiagoalessio avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.