Class: CVFFI::OpenSURF::Params
- Inherits:
-
Object
- Object
- CVFFI::OpenSURF::Params
- 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
-
#initialize(opts = {}) ⇒ Params
constructor
A new instance of Params.
- #to_hash ⇒ Object
- #to_OpenSurfParams ⇒ Object
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_hash ⇒ Object
178 179 180 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 178 def to_hash @params end |
#to_OpenSurfParams ⇒ Object
174 175 176 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 174 def to_OpenSurfParams OpenSURFParams.new( @params ) end |