Class: CVFFI::OpenSURF::Result
- Inherits:
-
Object
- Object
- CVFFI::OpenSURF::Result
- Defined in:
- lib/opencv-ffi-ext/opensurf.rb
Instance Attribute Summary collapse
-
#kp ⇒ Object
Returns the value of attribute kp.
Instance Method Summary collapse
- #descriptor ⇒ Object
- #distance_to(b) ⇒ Object
-
#initialize(kp) ⇒ Result
constructor
A new instance of Result.
- #laplacian ⇒ Object
- #orientation ⇒ Object
- #packed_descriptor ⇒ Object
- #pt ⇒ Object
- #scale ⇒ Object
- #to_Point ⇒ Object
- #to_vector ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
Constructor Details
#initialize(kp) ⇒ Result
Returns a new instance of Result.
40 41 42 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 40 def initialize( kp ) @kp = CVFFI::OpenSURF::OpenSURFPoint.new(kp) end |
Instance Attribute Details
#kp ⇒ Object
Returns the value of attribute kp.
39 40 41 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 39 def kp @kp end |
Instance Method Details
#descriptor ⇒ Object
51 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 51 def descriptor; @kp.descriptor; end |
#distance_to(b) ⇒ Object
53 54 55 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 53 def distance_to(b) CVFFI::VectorMath::L2distance( @kp.descriptor, b.descriptor, 64 ) end |
#laplacian ⇒ Object
49 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 49 def laplacian; @kp.laplacian; end |
#orientation ⇒ Object
50 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 50 def orientation; @kp.orientation; end |
#packed_descriptor ⇒ Object
65 66 67 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 65 def packed_descriptor [@kp.descriptor.to_a.pack('e64')].pack('m0') end |
#pt ⇒ Object
44 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 44 def pt; @kp.pt; end |
#scale ⇒ Object
48 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 48 def scale; @kp.scale; end |
#to_Point ⇒ Object
61 62 63 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 61 def to_Point pt.to_Point end |
#to_vector ⇒ Object
57 58 59 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 57 def to_vector Vector.[]( x, y, 1 ) end |
#x ⇒ Object
45 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 45 def x; pt.x; end |
#y ⇒ Object
46 |
# File 'lib/opencv-ffi-ext/opensurf.rb', line 46 def y; pt.y; end |