Class: CVFFI::OpenSURF::Params

Inherits:
Object
  • Object
show all
Defined in:
lib/opencv-ffi-ext/opensurf.rb

Constant Summary collapse

DEFAULTS =
{ upright: 0,
octaves: 5,
intervals: 4,
thres: 0.0004,
init_sample: 2 }

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Params

Returns a new instance of Params.



167
168
169
170
171
172
# File 'lib/opencv-ffi-ext/opensurf.rb', line 167

def initialize( opts = {} )
  @params = {}
  DEFAULTS.keys.each { |k|
    @params[k] = opts[k] || DEFAULTS[k]
  }
end

Instance Method Details

#to_hashObject



178
179
180
# File 'lib/opencv-ffi-ext/opensurf.rb', line 178

def to_hash
  @params
end

#to_OpenSurfParamsObject



174
175
176
# File 'lib/opencv-ffi-ext/opensurf.rb', line 174

def to_OpenSurfParams
  OpenSURFParams.new( @params )
end