Class: PixelFontTrieOCR::ImageColumnExtractor

Inherits:
Object
  • Object
show all
Defined in:
lib/pixel_font_trie_ocr/image_column_extractor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(image, threshold: 38_000) ⇒ ImageColumnExtractor

Returns a new instance of ImageColumnExtractor.



7
8
9
10
# File 'lib/pixel_font_trie_ocr/image_column_extractor.rb', line 7

def initialize(image, threshold: 38_000)
  @image = image
  @threshold = threshold
end

Instance Attribute Details

#imageObject (readonly)

Returns the value of attribute image.



5
6
7
# File 'lib/pixel_font_trie_ocr/image_column_extractor.rb', line 5

def image
  @image
end

#thresholdObject (readonly)

Returns the value of attribute threshold.



5
6
7
# File 'lib/pixel_font_trie_ocr/image_column_extractor.rb', line 5

def threshold
  @threshold
end

Instance Method Details

#extractObject



12
13
14
# File 'lib/pixel_font_trie_ocr/image_column_extractor.rb', line 12

def extract
  trim_masks(masks)
end