Class: OpenCV::Cv::PyramidAdaptedFeatureDetector

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ PyramidAdaptedFeatureDetector

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 PyramidAdaptedFeatureDetector.



11207
11208
11209
11210
11211
11212
11213
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11207

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? PyramidAdaptedFeatureDetectorStruct
                       ptr
                   else
                       PyramidAdaptedFeatureDetectorStruct.new(FFI::AutoPointer.new(ptr,PyramidAdaptedFeatureDetectorStruct.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.



11204
11205
11206
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11204

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

._create(name) ⇒ Object

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



11352
11353
11354
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11352

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

.create(detector_type) ⇒ Object

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



11242
11243
11244
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11242

def self.create(detector_type)
    Rbind::cv_pyramid_adapted_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



11199
11200
11201
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11199

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

.get_list(algorithms) ⇒ Object

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



11347
11348
11349
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11347

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

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11156

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(PyramidAdaptedFeatureDetectorStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # wrapper for cv::PyramidAdaptedFeatureDetector::PyramidAdaptedFeatureDetector(const Ptr_FeatureDetector detector, int maxLevel=2)
    @@cv_pyramid_adapted_feature_detector_pyramid_adapted_feature_detector_defaults0 ||= [nil, 2]
    if(args.size >= 1 && args.size <= 2)
        args.size.upto(1) do |i|
            args[i] = @@cv_pyramid_adapted_feature_detector_pyramid_adapted_feature_detector_defaults0[i]
        end
        begin
            return Rbind::cv_pyramid_adapted_feature_detector_pyramid_adapted_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.



11187
11188
11189
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11187

def self.rbind_from_native(ptr,context)
    PyramidAdaptedFeatureDetector.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.



11178
11179
11180
11181
11182
11183
11184
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11178

def self.rbind_to_native(obj,context)
    if obj.is_a? PyramidAdaptedFeatureDetector
        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



11193
11194
11195
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11193

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)


11218
11219
11220
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11218

def __owner__?
    @__obj_ptr__[:bowner]
end

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

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



11232
11233
11234
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11232

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

#emptyObject

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



11237
11238
11239
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11237

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

#get_algorithm(name) ⇒ Object

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



11286
11287
11288
11289
11290
11291
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11286

def get_algorithm(name)
    result = Rbind::cv_pyramid_adapted_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::PyramidAdaptedFeatureDetector::getBool(const cv::String name)



11257
11258
11259
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11257

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

#get_double(name) ⇒ Object

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



11252
11253
11254
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11252

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

#get_int(name) ⇒ Object

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



11247
11248
11249
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11247

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

#get_mat(name) ⇒ Object

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



11270
11271
11272
11273
11274
11275
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11270

def get_mat(name)
    result = Rbind::cv_pyramid_adapted_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::PyramidAdaptedFeatureDetector::getMatVector(const cv::String name)



11278
11279
11280
11281
11282
11283
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11278

def get_mat_vector(name)
    result = Rbind::cv_pyramid_adapted_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::PyramidAdaptedFeatureDetector::getParams(vector_string names)



11342
11343
11344
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11342

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

#get_string(name) ⇒ Object

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



11262
11263
11264
11265
11266
11267
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11262

def get_string(name)
    result = Rbind::cv_pyramid_adapted_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::PyramidAdaptedFeatureDetector::paramHelp(const cv::String name)



11329
11330
11331
11332
11333
11334
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11329

def param_help(name)
    result = Rbind::cv_pyramid_adapted_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::PyramidAdaptedFeatureDetector::paramType(const cv::String name)



11337
11338
11339
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11337

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

#set_algorithm(name, value) ⇒ Object

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



11324
11325
11326
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11324

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

#set_bool(name, value) ⇒ Object

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



11304
11305
11306
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11304

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

#set_double(name, value) ⇒ Object

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



11299
11300
11301
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11299

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

#set_int(name, value) ⇒ Object

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



11294
11295
11296
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11294

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

#set_mat(name, value) ⇒ Object

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



11314
11315
11316
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11314

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

#set_mat_vector(name, value) ⇒ Object

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



11319
11320
11321
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11319

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

#set_string(name, value) ⇒ Object

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



11309
11310
11311
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11309

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