Class: OpenCV::Cv::FeatureDetector

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) ⇒ FeatureDetector

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



6107
6108
6109
6110
6111
6112
6113
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6107

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



6104
6105
6106
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6104

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

._create(name) ⇒ Object

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



6252
6253
6254
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6252

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

.create(detector_type) ⇒ Object

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



6142
6143
6144
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6142

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



6099
6100
6101
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6099

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

.get_list(algorithms) ⇒ Object

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



6247
6248
6249
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6247

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

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


6068
6069
6070
6071
6072
6073
6074
6075
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6068

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(FeatureDetectorStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    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.



6087
6088
6089
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6087

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



6078
6079
6080
6081
6082
6083
6084
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6078

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



6093
6094
6095
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6093

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)


6118
6119
6120
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6118

def __owner__?
    @__obj_ptr__[:bowner]
end

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

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



6132
6133
6134
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6132

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

#emptyObject

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



6137
6138
6139
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6137

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

#get_algorithm(name) ⇒ Object

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



6186
6187
6188
6189
6190
6191
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6186

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



6157
6158
6159
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6157

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

#get_double(name) ⇒ Object

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



6152
6153
6154
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6152

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

#get_int(name) ⇒ Object

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



6147
6148
6149
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6147

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

#get_mat(name) ⇒ Object

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



6170
6171
6172
6173
6174
6175
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6170

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



6178
6179
6180
6181
6182
6183
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6178

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



6242
6243
6244
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6242

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

#get_string(name) ⇒ Object

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



6162
6163
6164
6165
6166
6167
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6162

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



6229
6230
6231
6232
6233
6234
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6229

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



6237
6238
6239
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6237

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

#set_algorithm(name, value) ⇒ Object

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



6224
6225
6226
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6224

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

#set_bool(name, value) ⇒ Object

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



6204
6205
6206
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6204

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

#set_double(name, value) ⇒ Object

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



6199
6200
6201
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6199

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

#set_int(name, value) ⇒ Object

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



6194
6195
6196
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6194

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

#set_mat(name, value) ⇒ Object

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



6214
6215
6216
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6214

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

#set_mat_vector(name, value) ⇒ Object

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



6219
6220
6221
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6219

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

#set_string(name, value) ⇒ Object

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



6209
6210
6211
# File 'lib/ruby/ropencv/ropencv_types.rb', line 6209

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