Class: OpenCV::Cv::FlannBasedMatcher
- Inherits:
-
Object
- Object
- OpenCV::Cv::FlannBasedMatcher
- Extended by:
- FFI::DataConverter
- Defined in:
- lib/ruby/ropencv/ropencv_types.rb
Instance Attribute Summary collapse
- #__obj_ptr__ ⇒ Object readonly private
Class Method Summary collapse
-
._create(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FlannBasedMatcher::_create(const cv::String name).
-
.create(descriptor_matcher_type) ⇒ Object
wrapper for Ptr_DescriptorMatcher cv::FlannBasedMatcher::create(const cv::String descriptorMatcherType).
-
.from_native(ptr, context) ⇒ Object
private
can be overwritten by the user.
-
.get_list(algorithms) ⇒ Object
wrapper for void cv::FlannBasedMatcher::getList(vector_string algorithms).
- .new(*args) ⇒ Object
- .rbind_from_native(ptr, context) ⇒ Object private
- .rbind_to_native(obj, context) ⇒ Object private
-
.to_native(obj, context) ⇒ Object
private
can be overwritten by the user.
Instance Method Summary collapse
-
#__owner__? ⇒ Boolean
private
returns true if the underlying pointer is owner of the real object.
-
#add(descriptors) ⇒ Object
methods wrapper for void cv::FlannBasedMatcher::add(const vector_Mat descriptors).
-
#clear ⇒ Object
wrapper for void cv::FlannBasedMatcher::clear().
-
#empty ⇒ Object
wrapper for bool cv::FlannBasedMatcher::empty().
-
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FlannBasedMatcher::getAlgorithm(const cv::String name).
-
#get_bool(name) ⇒ Object
wrapper for bool cv::FlannBasedMatcher::getBool(const cv::String name).
-
#get_double(name) ⇒ Object
wrapper for double cv::FlannBasedMatcher::getDouble(const cv::String name).
-
#get_int(name) ⇒ Object
wrapper for int cv::FlannBasedMatcher::getInt(const cv::String name).
-
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::FlannBasedMatcher::getMat(const cv::String name).
-
#get_mat_vector(name) ⇒ Object
wrapper for vector_Mat cv::FlannBasedMatcher::getMatVector(const cv::String name).
-
#get_params(names) ⇒ Object
wrapper for void cv::FlannBasedMatcher::getParams(vector_string names).
-
#get_string(name) ⇒ Object
wrapper for cv::String cv::FlannBasedMatcher::getString(const cv::String name).
-
#get_train_descriptors ⇒ Object
wrapper for vector_Mat cv::FlannBasedMatcher::getTrainDescriptors().
-
#initialize(ptr) ⇒ FlannBasedMatcher
constructor
private
A new instance of FlannBasedMatcher.
-
#knn_match(*args) ⇒ Object
wrapper for overloaded method knn_match.
-
#match(*args) ⇒ Object
wrapper for overloaded method match.
-
#param_help(name) ⇒ Object
wrapper for cv::String cv::FlannBasedMatcher::paramHelp(const cv::String name).
-
#param_type(name) ⇒ Object
wrapper for int cv::FlannBasedMatcher::paramType(const cv::String name).
-
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setAlgorithm(const cv::String name, const Ptr_Algorithm value).
-
#set_bool(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setBool(const cv::String name, bool value).
-
#set_double(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setDouble(const cv::String name, double value).
-
#set_int(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setInt(const cv::String name, int value).
-
#set_mat(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setMat(const cv::String name, const cv::Mat value).
-
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setMatVector(const cv::String name, const vector_Mat value).
-
#set_string(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setString(const cv::String name, const cv::String value).
-
#train ⇒ Object
wrapper for void cv::FlannBasedMatcher::train().
Constructor Details
#initialize(ptr) ⇒ FlannBasedMatcher
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 FlannBasedMatcher.
12211 12212 12213 12214 12215 12216 12217 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12211 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? FlannBasedMatcherStruct ptr else FlannBasedMatcherStruct.new(FFI::AutoPointer.new(ptr,FlannBasedMatcherStruct.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.
12208 12209 12210 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12208 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
._create(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FlannBasedMatcher::_create(const cv::String name)
12436 12437 12438 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12436 def self._create(name) Rbind::cv_flann_based_matcher__create(name) end |
.create(descriptor_matcher_type) ⇒ Object
wrapper for Ptr_DescriptorMatcher cv::FlannBasedMatcher::create(const cv::String descriptorMatcherType)
12326 12327 12328 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12326 def self.create(descriptor_matcher_type) Rbind::cv_flann_based_matcher_create(descriptor_matcher_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
12203 12204 12205 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12203 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.get_list(algorithms) ⇒ Object
wrapper for void cv::FlannBasedMatcher::getList(vector_string algorithms)
12431 12432 12433 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12431 def self.get_list(algorithms) Rbind::cv_flann_based_matcher_get_list(algorithms) end |
.new(*args) ⇒ Object
12160 12161 12162 12163 12164 12165 12166 12167 12168 12169 12170 12171 12172 12173 12174 12175 12176 12177 12178 12179 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12160 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(FlannBasedMatcherStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for cv::FlannBasedMatcher::FlannBasedMatcher(const Ptr_flann_IndexParams indexParams=new flann::KDTreeIndexParams(), const Ptr_flann_SearchParams searchParams=new flann::SearchParams()) @@cv_flann_based_matcher_flann_based_matcher_defaults0 ||= [Cv::Flann.new(), Cv::Flann::SearchParams.new()] if(args.size >= 0 && args.size <= 2) args.size.upto(1) do |i| args[i] = @@cv_flann_based_matcher_flann_based_matcher_defaults0[i] end begin return Rbind::cv_flann_based_matcher_flann_based_matcher(*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.
12191 12192 12193 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12191 def self.rbind_from_native(ptr,context) FlannBasedMatcher.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.
12182 12183 12184 12185 12186 12187 12188 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12182 def self.rbind_to_native(obj,context) if obj.is_a? FlannBasedMatcher 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
12197 12198 12199 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12197 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
12222 12223 12224 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12222 def __owner__? @__obj_ptr__[:bowner] end |
#add(descriptors) ⇒ Object
methods wrapper for void cv::FlannBasedMatcher::add(const vector_Mat descriptors)
12236 12237 12238 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12236 def add(descriptors) Rbind::cv_flann_based_matcher_add( self, descriptors) end |
#clear ⇒ Object
wrapper for void cv::FlannBasedMatcher::clear()
12249 12250 12251 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12249 def clear() Rbind::cv_flann_based_matcher_clear( self) end |
#empty ⇒ Object
wrapper for bool cv::FlannBasedMatcher::empty()
12254 12255 12256 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12254 def empty() Rbind::cv_flann_based_matcher_empty( self) end |
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FlannBasedMatcher::getAlgorithm(const cv::String name)
12370 12371 12372 12373 12374 12375 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12370 def get_algorithm(name) result = Rbind::cv_flann_based_matcher_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::FlannBasedMatcher::getBool(const cv::String name)
12341 12342 12343 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12341 def get_bool(name) Rbind::cv_flann_based_matcher_get_bool( self, name) end |
#get_double(name) ⇒ Object
wrapper for double cv::FlannBasedMatcher::getDouble(const cv::String name)
12336 12337 12338 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12336 def get_double(name) Rbind::cv_flann_based_matcher_get_double( self, name) end |
#get_int(name) ⇒ Object
wrapper for int cv::FlannBasedMatcher::getInt(const cv::String name)
12331 12332 12333 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12331 def get_int(name) Rbind::cv_flann_based_matcher_get_int( self, name) end |
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::FlannBasedMatcher::getMat(const cv::String name)
12354 12355 12356 12357 12358 12359 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12354 def get_mat(name) result = Rbind::cv_flann_based_matcher_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::FlannBasedMatcher::getMatVector(const cv::String name)
12362 12363 12364 12365 12366 12367 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12362 def get_mat_vector(name) result = Rbind::cv_flann_based_matcher_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::FlannBasedMatcher::getParams(vector_string names)
12426 12427 12428 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12426 def get_params(names) Rbind::cv_flann_based_matcher_get_params( self, names) end |
#get_string(name) ⇒ Object
wrapper for cv::String cv::FlannBasedMatcher::getString(const cv::String name)
12346 12347 12348 12349 12350 12351 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12346 def get_string(name) result = Rbind::cv_flann_based_matcher_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 |
#get_train_descriptors ⇒ Object
wrapper for vector_Mat cv::FlannBasedMatcher::getTrainDescriptors()
12241 12242 12243 12244 12245 12246 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12241 def get_train_descriptors() result = Rbind::cv_flann_based_matcher_get_train_descriptors( self) # 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 |
#knn_match(*args) ⇒ Object
wrapper for overloaded method knn_match
12295 12296 12297 12298 12299 12300 12301 12302 12303 12304 12305 12306 12307 12308 12309 12310 12311 12312 12313 12314 12315 12316 12317 12318 12319 12320 12321 12322 12323 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12295 def knn_match(*args) # wrapper for void cv::FlannBasedMatcher::knnMatch(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, vector_vector_DMatch matches, int k, const cv::Mat mask=Mat(), bool compactResult=false) @@cv_flann_based_matcher_knn_match_defaults0 ||= [nil, nil, nil, nil, Cv::Mat.new(), false] if(args.size >= 4 && args.size <= 6) args.size.upto(5) do |i| args[i] = @@cv_flann_based_matcher_knn_match_defaults0[i] end begin return Rbind::cv_flann_based_matcher_knn_match(self,*args) rescue TypeError => e @error = e end end # wrapper for void cv::FlannBasedMatcher::knnMatch(const cv::Mat queryDescriptors, vector_vector_DMatch matches, int k, const vector_Mat masks=vector_Mat(), bool compactResult=false) @@cv_flann_based_matcher_knn_match2_defaults1 ||= [nil, nil, nil, VectorMat.new(), false] if(args.size >= 3 && args.size <= 5) args.size.upto(4) do |i| args[i] = @@cv_flann_based_matcher_knn_match2_defaults1[i] end begin return Rbind::cv_flann_based_matcher_knn_match2(self,*args) rescue TypeError => e @error = e end end raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}" end |
#match(*args) ⇒ Object
wrapper for overloaded method match
12264 12265 12266 12267 12268 12269 12270 12271 12272 12273 12274 12275 12276 12277 12278 12279 12280 12281 12282 12283 12284 12285 12286 12287 12288 12289 12290 12291 12292 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12264 def match(*args) # wrapper for void cv::FlannBasedMatcher::match(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, vector_DMatch matches, const cv::Mat mask=Mat()) @@cv_flann_based_matcher_match_defaults0 ||= [nil, nil, nil, Cv::Mat.new()] if(args.size >= 3 && args.size <= 4) args.size.upto(3) do |i| args[i] = @@cv_flann_based_matcher_match_defaults0[i] end begin return Rbind::cv_flann_based_matcher_match(self,*args) rescue TypeError => e @error = e end end # wrapper for void cv::FlannBasedMatcher::match(const cv::Mat queryDescriptors, vector_DMatch matches, const vector_Mat masks=vector_Mat()) @@cv_flann_based_matcher_match2_defaults1 ||= [nil, nil, VectorMat.new()] if(args.size >= 2 && args.size <= 3) args.size.upto(2) do |i| args[i] = @@cv_flann_based_matcher_match2_defaults1[i] end begin return Rbind::cv_flann_based_matcher_match2(self,*args) rescue TypeError => e @error = e end end raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}" end |
#param_help(name) ⇒ Object
wrapper for cv::String cv::FlannBasedMatcher::paramHelp(const cv::String name)
12413 12414 12415 12416 12417 12418 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12413 def param_help(name) result = Rbind::cv_flann_based_matcher_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::FlannBasedMatcher::paramType(const cv::String name)
12421 12422 12423 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12421 def param_type(name) Rbind::cv_flann_based_matcher_param_type( self, name) end |
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setAlgorithm(const cv::String name, const Ptr_Algorithm value)
12408 12409 12410 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12408 def set_algorithm(name, value) Rbind::cv_flann_based_matcher_set_algorithm( self, name, value) end |
#set_bool(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setBool(const cv::String name, bool value)
12388 12389 12390 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12388 def set_bool(name, value) Rbind::cv_flann_based_matcher_set_bool( self, name, value) end |
#set_double(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setDouble(const cv::String name, double value)
12383 12384 12385 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12383 def set_double(name, value) Rbind::cv_flann_based_matcher_set_double( self, name, value) end |
#set_int(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setInt(const cv::String name, int value)
12378 12379 12380 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12378 def set_int(name, value) Rbind::cv_flann_based_matcher_set_int( self, name, value) end |
#set_mat(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setMat(const cv::String name, const cv::Mat value)
12398 12399 12400 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12398 def set_mat(name, value) Rbind::cv_flann_based_matcher_set_mat( self, name, value) end |
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setMatVector(const cv::String name, const vector_Mat value)
12403 12404 12405 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12403 def set_mat_vector(name, value) Rbind::cv_flann_based_matcher_set_mat_vector( self, name, value) end |
#set_string(name, value) ⇒ Object
wrapper for void cv::FlannBasedMatcher::setString(const cv::String name, const cv::String value)
12393 12394 12395 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12393 def set_string(name, value) Rbind::cv_flann_based_matcher_set_string( self, name, value) end |
#train ⇒ Object
wrapper for void cv::FlannBasedMatcher::train()
12259 12260 12261 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 12259 def train() Rbind::cv_flann_based_matcher_train( self) end |