Class: OpenCV::Cv::DescriptorMatcher
- Inherits:
-
Object
- Object
- OpenCV::Cv::DescriptorMatcher
- 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::DescriptorMatcher::_create(const cv::String name).
-
.create(descriptor_matcher_type) ⇒ Object
wrapper for Ptr_DescriptorMatcher cv::DescriptorMatcher::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::DescriptorMatcher::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::DescriptorMatcher::add(const vector_Mat descriptors).
-
#clear ⇒ Object
wrapper for void cv::DescriptorMatcher::clear().
-
#empty ⇒ Object
wrapper for bool cv::DescriptorMatcher::empty().
-
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::DescriptorMatcher::getAlgorithm(const cv::String name).
-
#get_bool(name) ⇒ Object
wrapper for bool cv::DescriptorMatcher::getBool(const cv::String name).
-
#get_double(name) ⇒ Object
wrapper for double cv::DescriptorMatcher::getDouble(const cv::String name).
-
#get_int(name) ⇒ Object
wrapper for int cv::DescriptorMatcher::getInt(const cv::String name).
-
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::DescriptorMatcher::getMat(const cv::String name).
-
#get_mat_vector(name) ⇒ Object
wrapper for vector_Mat cv::DescriptorMatcher::getMatVector(const cv::String name).
-
#get_params(names) ⇒ Object
wrapper for void cv::DescriptorMatcher::getParams(vector_string names).
-
#get_string(name) ⇒ Object
wrapper for cv::String cv::DescriptorMatcher::getString(const cv::String name).
-
#get_train_descriptors ⇒ Object
wrapper for vector_Mat cv::DescriptorMatcher::getTrainDescriptors().
-
#initialize(ptr) ⇒ DescriptorMatcher
constructor
private
A new instance of DescriptorMatcher.
-
#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::DescriptorMatcher::paramHelp(const cv::String name).
-
#param_type(name) ⇒ Object
wrapper for int cv::DescriptorMatcher::paramType(const cv::String name).
-
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setAlgorithm(const cv::String name, const Ptr_Algorithm value).
-
#set_bool(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setBool(const cv::String name, bool value).
-
#set_double(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setDouble(const cv::String name, double value).
-
#set_int(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setInt(const cv::String name, int value).
-
#set_mat(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setMat(const cv::String name, const cv::Mat value).
-
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setMatVector(const cv::String name, const vector_Mat value).
-
#set_string(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setString(const cv::String name, const cv::String value).
-
#train ⇒ Object
wrapper for void cv::DescriptorMatcher::train().
Constructor Details
#initialize(ptr) ⇒ DescriptorMatcher
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 DescriptorMatcher.
11599 11600 11601 11602 11603 11604 11605 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11599 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? DescriptorMatcherStruct ptr else DescriptorMatcherStruct.new(FFI::AutoPointer.new(ptr,DescriptorMatcherStruct.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.
11596 11597 11598 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11596 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
._create(name) ⇒ Object
wrapper for Ptr_Algorithm cv::DescriptorMatcher::_create(const cv::String name)
11824 11825 11826 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11824 def self._create(name) Rbind::cv_descriptor_matcher__create(name) end |
.create(descriptor_matcher_type) ⇒ Object
wrapper for Ptr_DescriptorMatcher cv::DescriptorMatcher::create(const cv::String descriptorMatcherType)
11714 11715 11716 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11714 def self.create(descriptor_matcher_type) Rbind::cv_descriptor_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
11591 11592 11593 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11591 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.get_list(algorithms) ⇒ Object
wrapper for void cv::DescriptorMatcher::getList(vector_string algorithms)
11819 11820 11821 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11819 def self.get_list(algorithms) Rbind::cv_descriptor_matcher_get_list(algorithms) end |
.new(*args) ⇒ Object
11560 11561 11562 11563 11564 11565 11566 11567 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11560 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(DescriptorMatcherStruct) 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.
11579 11580 11581 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11579 def self.rbind_from_native(ptr,context) DescriptorMatcher.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.
11570 11571 11572 11573 11574 11575 11576 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11570 def self.rbind_to_native(obj,context) if obj.is_a? DescriptorMatcher 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
11585 11586 11587 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11585 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
11610 11611 11612 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11610 def __owner__? @__obj_ptr__[:bowner] end |
#add(descriptors) ⇒ Object
methods wrapper for void cv::DescriptorMatcher::add(const vector_Mat descriptors)
11624 11625 11626 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11624 def add(descriptors) Rbind::cv_descriptor_matcher_add( self, descriptors) end |
#clear ⇒ Object
wrapper for void cv::DescriptorMatcher::clear()
11637 11638 11639 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11637 def clear() Rbind::cv_descriptor_matcher_clear( self) end |
#empty ⇒ Object
wrapper for bool cv::DescriptorMatcher::empty()
11642 11643 11644 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11642 def empty() Rbind::cv_descriptor_matcher_empty( self) end |
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::DescriptorMatcher::getAlgorithm(const cv::String name)
11758 11759 11760 11761 11762 11763 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11758 def get_algorithm(name) result = Rbind::cv_descriptor_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::DescriptorMatcher::getBool(const cv::String name)
11729 11730 11731 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11729 def get_bool(name) Rbind::cv_descriptor_matcher_get_bool( self, name) end |
#get_double(name) ⇒ Object
wrapper for double cv::DescriptorMatcher::getDouble(const cv::String name)
11724 11725 11726 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11724 def get_double(name) Rbind::cv_descriptor_matcher_get_double( self, name) end |
#get_int(name) ⇒ Object
wrapper for int cv::DescriptorMatcher::getInt(const cv::String name)
11719 11720 11721 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11719 def get_int(name) Rbind::cv_descriptor_matcher_get_int( self, name) end |
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::DescriptorMatcher::getMat(const cv::String name)
11742 11743 11744 11745 11746 11747 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11742 def get_mat(name) result = Rbind::cv_descriptor_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::DescriptorMatcher::getMatVector(const cv::String name)
11750 11751 11752 11753 11754 11755 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11750 def get_mat_vector(name) result = Rbind::cv_descriptor_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::DescriptorMatcher::getParams(vector_string names)
11814 11815 11816 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11814 def get_params(names) Rbind::cv_descriptor_matcher_get_params( self, names) end |
#get_string(name) ⇒ Object
wrapper for cv::String cv::DescriptorMatcher::getString(const cv::String name)
11734 11735 11736 11737 11738 11739 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11734 def get_string(name) result = Rbind::cv_descriptor_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::DescriptorMatcher::getTrainDescriptors()
11629 11630 11631 11632 11633 11634 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11629 def get_train_descriptors() result = Rbind::cv_descriptor_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
11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 11693 11694 11695 11696 11697 11698 11699 11700 11701 11702 11703 11704 11705 11706 11707 11708 11709 11710 11711 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11683 def knn_match(*args) # wrapper for void cv::DescriptorMatcher::knnMatch(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, vector_vector_DMatch matches, int k, const cv::Mat mask=Mat(), bool compactResult=false) @@cv_descriptor_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_descriptor_matcher_knn_match_defaults0[i] end begin return Rbind::cv_descriptor_matcher_knn_match(self,*args) rescue TypeError => e @error = e end end # wrapper for void cv::DescriptorMatcher::knnMatch(const cv::Mat queryDescriptors, vector_vector_DMatch matches, int k, const vector_Mat masks=vector_Mat(), bool compactResult=false) @@cv_descriptor_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_descriptor_matcher_knn_match2_defaults1[i] end begin return Rbind::cv_descriptor_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
11652 11653 11654 11655 11656 11657 11658 11659 11660 11661 11662 11663 11664 11665 11666 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11652 def match(*args) # wrapper for void cv::DescriptorMatcher::match(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, vector_DMatch matches, const cv::Mat mask=Mat()) @@cv_descriptor_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_descriptor_matcher_match_defaults0[i] end begin return Rbind::cv_descriptor_matcher_match(self,*args) rescue TypeError => e @error = e end end # wrapper for void cv::DescriptorMatcher::match(const cv::Mat queryDescriptors, vector_DMatch matches, const vector_Mat masks=vector_Mat()) @@cv_descriptor_matcher_match2_defaults1 ||= [nil, nil, VectorMat.new()] if(args.size >= 2 && args.size <= 3) args.size.upto(2) do |i| args[i] = @@cv_descriptor_matcher_match2_defaults1[i] end begin return Rbind::cv_descriptor_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::DescriptorMatcher::paramHelp(const cv::String name)
11801 11802 11803 11804 11805 11806 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11801 def param_help(name) result = Rbind::cv_descriptor_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::DescriptorMatcher::paramType(const cv::String name)
11809 11810 11811 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11809 def param_type(name) Rbind::cv_descriptor_matcher_param_type( self, name) end |
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setAlgorithm(const cv::String name, const Ptr_Algorithm value)
11796 11797 11798 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11796 def set_algorithm(name, value) Rbind::cv_descriptor_matcher_set_algorithm( self, name, value) end |
#set_bool(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setBool(const cv::String name, bool value)
11776 11777 11778 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11776 def set_bool(name, value) Rbind::cv_descriptor_matcher_set_bool( self, name, value) end |
#set_double(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setDouble(const cv::String name, double value)
11771 11772 11773 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11771 def set_double(name, value) Rbind::cv_descriptor_matcher_set_double( self, name, value) end |
#set_int(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setInt(const cv::String name, int value)
11766 11767 11768 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11766 def set_int(name, value) Rbind::cv_descriptor_matcher_set_int( self, name, value) end |
#set_mat(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setMat(const cv::String name, const cv::Mat value)
11786 11787 11788 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11786 def set_mat(name, value) Rbind::cv_descriptor_matcher_set_mat( self, name, value) end |
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setMatVector(const cv::String name, const vector_Mat value)
11791 11792 11793 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11791 def set_mat_vector(name, value) Rbind::cv_descriptor_matcher_set_mat_vector( self, name, value) end |
#set_string(name, value) ⇒ Object
wrapper for void cv::DescriptorMatcher::setString(const cv::String name, const cv::String value)
11781 11782 11783 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11781 def set_string(name, value) Rbind::cv_descriptor_matcher_set_string( self, name, value) end |
#train ⇒ Object
wrapper for void cv::DescriptorMatcher::train()
11647 11648 11649 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 11647 def train() Rbind::cv_descriptor_matcher_train( self) end |