Class: OpenCV::Cv::FastFeatureDetector

Inherits:
Object
  • Object
show all
Extended by:
FFI::DataConverter
Defined in:
lib/ruby/ropencv/ropencv_types.rb

Constants collapse

TYPE_5_8 =
0
TYPE_7_12 =
1
TYPE_9_16 =
2

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ FastFeatureDetector

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of FastFeatureDetector.



10235
10236
10237
10238
10239
10240
10241
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10235

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? FastFeatureDetectorStruct
                       ptr
                   else
                       FastFeatureDetectorStruct.new(FFI::AutoPointer.new(ptr,FastFeatureDetectorStruct.method(:release)))
                   end
end

Instance Attribute Details

#__obj_ptr__Object (readonly)

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10232
10233
10234
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10232

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

._create(name) ⇒ Object

wrapper for Ptr_Algorithm cv::FastFeatureDetector::_create(const cv::String name)



10383
10384
10385
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10383

def self._create(name)
    Rbind::cv_fast_feature_detector__create(name)
end

.create(detector_type) ⇒ Object

wrapper for Ptr_FeatureDetector cv::FastFeatureDetector::create(const cv::String detectorType)



10273
10274
10275
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10273

def self.create(detector_type)
    Rbind::cv_fast_feature_detector_create(detector_type)
end

.from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



10227
10228
10229
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10227

def self.from_native(ptr,context)
    rbind_from_native(ptr,context)
end

.get_list(algorithms) ⇒ Object

wrapper for void cv::FastFeatureDetector::getList(vector_string algorithms)



10378
10379
10380
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10378

def self.get_list(algorithms)
    Rbind::cv_fast_feature_detector_get_list(algorithms)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10184

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(FastFeatureDetectorStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # wrapper for cv::FastFeatureDetector::FastFeatureDetector(int threshold=10, bool nonmaxSuppression=true)
    @@cv_fast_feature_detector_fast_feature_detector_defaults0 ||= [10, true]
    if(args.size >= 0 && args.size <= 2)
        args.size.upto(1) do |i|
            args[i] = @@cv_fast_feature_detector_fast_feature_detector_defaults0[i]
        end
        begin
            return Rbind::cv_fast_feature_detector_fast_feature_detector(*args)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.rbind_from_native(ptr, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10215
10216
10217
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10215

def self.rbind_from_native(ptr,context)
    FastFeatureDetector.new(ptr)
end

.rbind_to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



10206
10207
10208
10209
10210
10211
10212
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10206

def self.rbind_to_native(obj,context)
    if obj.is_a? FastFeatureDetector
        obj.__obj_ptr__
    else
        raise TypeError, "expected kind of #{name}, was #{obj.class}"
    end
end

.to_native(obj, context) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

can be overwritten by the user



10221
10222
10223
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10221

def self.to_native(obj,context)
    rbind_to_native(obj,context)
end

Instance Method Details

#__owner__?Boolean

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

returns true if the underlying pointer is owner of the real object

Returns:

  • (Boolean)


10246
10247
10248
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10246

def __owner__?
    @__obj_ptr__[:bowner]
end

#detect(image, keypoints, mask = Cv::Mat.new()) ⇒ Object

methods wrapper for void cv::FastFeatureDetector::detect(const cv::Mat image, vector_KeyPoint keypoints, const cv::Mat mask=Mat())



10263
10264
10265
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10263

def detect(image, keypoints, mask = Cv::Mat.new())
    Rbind::cv_fast_feature_detector_detect( self, image, keypoints, mask)
end

#emptyObject

wrapper for bool cv::FastFeatureDetector::empty()



10268
10269
10270
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10268

def empty()
    Rbind::cv_fast_feature_detector_empty( self)
end

#get_algorithm(name) ⇒ Object

wrapper for Ptr_Algorithm cv::FastFeatureDetector::getAlgorithm(const cv::String name)



10317
10318
10319
10320
10321
10322
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10317

def get_algorithm(name)
    result = Rbind::cv_fast_feature_detector_get_algorithm( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#get_bool(name) ⇒ Object

wrapper for bool cv::FastFeatureDetector::getBool(const cv::String name)



10288
10289
10290
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10288

def get_bool(name)
    Rbind::cv_fast_feature_detector_get_bool( self, name)
end

#get_double(name) ⇒ Object

wrapper for double cv::FastFeatureDetector::getDouble(const cv::String name)



10283
10284
10285
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10283

def get_double(name)
    Rbind::cv_fast_feature_detector_get_double( self, name)
end

#get_int(name) ⇒ Object

wrapper for int cv::FastFeatureDetector::getInt(const cv::String name)



10278
10279
10280
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10278

def get_int(name)
    Rbind::cv_fast_feature_detector_get_int( self, name)
end

#get_mat(name) ⇒ Object

wrapper for cv::Mat cv::FastFeatureDetector::getMat(const cv::String name)



10301
10302
10303
10304
10305
10306
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10301

def get_mat(name)
    result = Rbind::cv_fast_feature_detector_get_mat( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#get_mat_vector(name) ⇒ Object

wrapper for vector_Mat cv::FastFeatureDetector::getMatVector(const cv::String name)



10309
10310
10311
10312
10313
10314
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10309

def get_mat_vector(name)
    result = Rbind::cv_fast_feature_detector_get_mat_vector( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#get_params(names) ⇒ Object

wrapper for void cv::FastFeatureDetector::getParams(vector_string names)



10373
10374
10375
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10373

def get_params(names)
    Rbind::cv_fast_feature_detector_get_params( self, names)
end

#get_string(name) ⇒ Object

wrapper for cv::String cv::FastFeatureDetector::getString(const cv::String name)



10293
10294
10295
10296
10297
10298
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10293

def get_string(name)
    result = Rbind::cv_fast_feature_detector_get_string( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#param_help(name) ⇒ Object

wrapper for cv::String cv::FastFeatureDetector::paramHelp(const cv::String name)



10360
10361
10362
10363
10364
10365
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10360

def param_help(name)
    result = Rbind::cv_fast_feature_detector_param_help( self, name)
    # store owner insight the pointer to not get garbage collected
    result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
    result
end

#param_type(name) ⇒ Object

wrapper for int cv::FastFeatureDetector::paramType(const cv::String name)



10368
10369
10370
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10368

def param_type(name)
    Rbind::cv_fast_feature_detector_param_type( self, name)
end

#set_algorithm(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setAlgorithm(const cv::String name, const Ptr_Algorithm value)



10355
10356
10357
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10355

def set_algorithm(name, value)
    Rbind::cv_fast_feature_detector_set_algorithm( self, name, value)
end

#set_bool(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setBool(const cv::String name, bool value)



10335
10336
10337
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10335

def set_bool(name, value)
    Rbind::cv_fast_feature_detector_set_bool( self, name, value)
end

#set_double(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setDouble(const cv::String name, double value)



10330
10331
10332
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10330

def set_double(name, value)
    Rbind::cv_fast_feature_detector_set_double( self, name, value)
end

#set_int(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setInt(const cv::String name, int value)



10325
10326
10327
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10325

def set_int(name, value)
    Rbind::cv_fast_feature_detector_set_int( self, name, value)
end

#set_mat(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setMat(const cv::String name, const cv::Mat value)



10345
10346
10347
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10345

def set_mat(name, value)
    Rbind::cv_fast_feature_detector_set_mat( self, name, value)
end

#set_mat_vector(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setMatVector(const cv::String name, const vector_Mat value)



10350
10351
10352
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10350

def set_mat_vector(name, value)
    Rbind::cv_fast_feature_detector_set_mat_vector( self, name, value)
end

#set_string(name, value) ⇒ Object

wrapper for void cv::FastFeatureDetector::setString(const cv::String name, const cv::String value)



10340
10341
10342
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10340

def set_string(name, value)
    Rbind::cv_fast_feature_detector_set_string( self, name, value)
end