class Tesseract::Engine::Iterator::Element

Public Class Methods

for(level) click to toggle source
# File lib/tesseract/engine/iterator.rb, line 34
def self.for (level)
        Iterator.const_get(level.capitalize)
rescue
        self
end
new(level, iterator) click to toggle source
# File lib/tesseract/engine/iterator.rb, line 40
def initialize (level, iterator)
        @level    = level
        @iterator = iterator
end

Public Instance Methods

baseline() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 61
def baseline
        Baseline.new(@iterator.baseline(@level))
end
binary_image() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 51
def binary_image
        @iterator.get_binary_image(@level) rescue nil
end
bounding_box() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 46
def bounding_box
        BoundingBox.new(@iterator.bounding_box(@level))
end
confidence() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 76
def confidence
        @iterator.confidence(@level)
end
image() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 56
def image
        @iterator.get_image(@level) rescue nil
end
inspect() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 82
def inspect
        "#<Tesseract::#{@level.capitalize}(#{confidence}): #{text.inspect}>"
end
orientation() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 66
def orientation
        Orientation.new(@iterator.orientation)
end
text() click to toggle source
# File lib/tesseract/engine/iterator.rb, line 71
def text
        @iterator.get_text(@level)
end
Also aliased as: to_s
to_s()
Alias for: text