Class: CVFFI::MatchResult
- Inherits:
-
Object
- Object
- CVFFI::MatchResult
- Defined in:
- lib/opencv-ffi-wrappers/matcher.rb
Instance Attribute Summary collapse
-
#distance ⇒ Object
(also: #dist)
Returns the value of attribute distance.
-
#query_idx ⇒ Object
(also: #qidx)
Returns the value of attribute query_idx.
-
#train_idx ⇒ Object
(also: #tidx)
Returns the value of attribute train_idx.
Instance Method Summary collapse
-
#initialize(t, q, d) ⇒ MatchResult
constructor
A new instance of MatchResult.
- #query ⇒ Object
- #to_s ⇒ Object
- #train ⇒ Object
Constructor Details
#initialize(t, q, d) ⇒ MatchResult
Returns a new instance of MatchResult.
36 37 38 39 40 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 36 def initialize( t, q, d ) @train_idx = t @query_idx = q @distance = d end |
Instance Attribute Details
#distance ⇒ Object Also known as: dist
Returns the value of attribute distance.
30 31 32 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 30 def distance @distance end |
#query_idx ⇒ Object Also known as: qidx
Returns the value of attribute query_idx.
29 30 31 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 29 def query_idx @query_idx end |
#train_idx ⇒ Object Also known as: tidx
Returns the value of attribute train_idx.
29 30 31 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 29 def train_idx @train_idx end |
Instance Method Details
#query ⇒ Object
50 51 52 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 50 def query @query_set[@query_idx] end |
#to_s ⇒ Object
42 43 44 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 42 def to_s "Match t=#{@train_idx} q=#{@query_idx} distance=#{@distance}" end |
#train ⇒ Object
46 47 48 |
# File 'lib/opencv-ffi-wrappers/matcher.rb', line 46 def train @train_set[@train_idx] end |