class RubyMarks::Config

Attributes

auto_ajust_block_height[RW]
auto_ajust_block_width[RW]
default_block_height_tolerance[RW]
default_block_width_tolerance[RW]
default_distance_between_marks[RW]
default_expected_lines[RW]
default_mark_height[RW]
default_mark_height_tolerance[RW]
default_mark_width[RW]
default_mark_width_tolerance[RW]
default_marks_options[RW]
edge_level[RW]
intensity_percentual[RW]
scan_mode[RW]
scan_timeout[RW]
threshold_level[RW]

Public Class Methods

new(recognizer) click to toggle source
# File lib/ruby_marks/config.rb, line 14
def initialize(recognizer)
  @recognizer = recognizer
  @threshold_level = RubyMarks.threshold_level
  @edge_level = RubyMarks.edge_level
  @scan_timeout = RubyMarks.scan_timeout

  @intensity_percentual = RubyMarks.intensity_percentual
  
  @default_block_width_tolerance  = RubyMarks.default_block_width_tolerance
  @default_block_height_tolerance = RubyMarks.default_block_height_tolerance

  @default_mark_width  = RubyMarks.default_mark_width
  @default_mark_height = RubyMarks.default_mark_height

  @default_mark_width_tolerance  = RubyMarks.default_mark_width_tolerance
  @default_mark_height_tolerance = RubyMarks.default_mark_height_tolerance
  
  @default_marks_options = RubyMarks.default_marks_options
  @default_distance_between_marks = RubyMarks.default_distance_between_marks
  @default_expected_lines = RubyMarks.default_expected_lines      
end

Public Instance Methods

calculated_threshold_level() click to toggle source
# File lib/ruby_marks/config.rb, line 36
def calculated_threshold_level
  Magick::QuantumRange * (@threshold_level.to_f / 100)
end
configure() { |self| ... } click to toggle source
# File lib/ruby_marks/config.rb, line 45
def configure
  yield self if block_given?
end
define_group(group_label, &block) click to toggle source
# File lib/ruby_marks/config.rb, line 40
def define_group(group_label, &block)
  group = RubyMarks::Group.new(group_label, @recognizer, &block)
  @recognizer.add_group(group)
end