Module: CVFFI::STAR

Defined in:
lib/opencv-ffi-wrappers/features2d/star.rb

Defined Under Namespace

Classes: Params, Result, ResultsArray

Class Method Summary collapse

Class Method Details

.detect(img, params) ⇒ Object

Raises:

  • (ArgumentError)


100
101
102
103
104
105
106
107
108
109
# File 'lib/opencv-ffi-wrappers/features2d/star.rb', line 100

def self.detect( img, params )
  params = params.to_CvStarDetectorParams unless  params.is_a?( CvStarDetectorParams )
  raise ArgumentError unless params.is_a?( CvStarDetectorParams ) 

  img = img.to_IplImage.ensure_greyscale
  mem_storage = CVFFI::cvCreateMemStorage( 0 )

  keypoints = CVFFI::CvSeq.new CVFFI::cvGetStarKeypoints( img, mem_storage, params )
  ResultsArray.new( keypoints )
end