Class: OpenCV::Cv::DescriptorMatcher

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

Constants collapse

FLANNBASED =
1
BRUTEFORCE =
2
BRUTEFORCE_L1 =
3
BRUTEFORCE_HAMMING =
4
BRUTEFORCE_HAMMINGLUT =
5
BRUTEFORCE_SL2 =
6

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.cast_from_algorithm(ptr, parse_ownership) ⇒ Cv::DescriptorMatcher Also known as: castFromAlgorithm

Note:

wrapper for static method cv::DescriptorMatcher* cv::DescriptorMatcher::castFromAlgorithm(cv::Algorithm* ptr, bool parse_ownership)

Parameters:

Returns:



65124
65125
65126
# File 'lib/ropencv/ropencv_types.rb', line 65124

def self.cast_from_algorithm(ptr, parse_ownership)
    Rbind::cv_descriptor_matcher_cast_from_algorithm(ptr, parse_ownership)
end

.create(descriptor_matcher_type) ⇒ Cv::Ptr::Cv_DescriptorMatcher .create(matcher_type) ⇒ Cv::Ptr::Cv_DescriptorMatcher

Note:

wrapper for overloaded static method create

Overloads:

Raises:

  • (ArgumentError)


65069
65070
65071
65072
65073
65074
65075
65076
65077
65078
65079
65080
65081
65082
65083
65084
65085
65086
65087
65088
65089
65090
65091
65092
65093
65094
65095
65096
65097
65098
65099
65100
65101
65102
65103
65104
65105
# File 'lib/ropencv/ropencv_types.rb', line 65069

def self.create(*args)
    # overloaded method wrapper for const cv::Ptr<cv::DescriptorMatcher> cv::DescriptorMatcher::create(const std::string descriptorMatcherType)
    @@cv_descriptor_matcher_create_defaults0 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_descriptor_matcher_create_defaults0[i]
        end
        begin
                result = Rbind::cv_descriptor_matcher_create(*targs)
            # store owner insight the pointer to not get garbage collected
            result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
            return result
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for const cv::Ptr<cv::DescriptorMatcher> cv::DescriptorMatcher::create(cv::DescriptorMatcher::MatcherType matcherType)
    @@cv_descriptor_matcher_create__2_defaults1 ||= [nil]
    if(args.size >= 1 && args.size <= 1)
        targs = args.clone
        targs.size.upto(0) do |i|
            targs[i] = @@cv_descriptor_matcher_create__2_defaults1[i]
        end
        begin
                result = Rbind::cv_descriptor_matcher_create__2(*targs)
            # store owner insight the pointer to not get garbage collected
            result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) if !result.__owner__?
            return result
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}"
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


64756
64757
64758
64759
64760
64761
64762
64763
# File 'lib/ropencv/ropencv_types.rb', line 64756

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

.nullObject

returns a null pointer to the object



64752
64753
64754
# File 'lib/ropencv/ropencv_types.rb', line 64752

def self.null
    new(DescriptorMatcherStruct.new)
end

Instance Method Details

#add(descriptors) ⇒ Void

Note:

method wrapper for void cv::DescriptorMatcher::add(const std::vectorcv::Mat descriptors)

methods

Parameters:

Returns:

  • (Void)


64847
64848
64849
64850
# File 'lib/ropencv/ropencv_types.rb', line 64847

def add(descriptors)
    __validate_pointer__
    Rbind::cv_descriptor_matcher_add( self, descriptors)
end

#cast_to_algorithm(parse_ownership) ⇒ Cv::Algorithm Also known as: castToAlgorithm

Note:

method wrapper for cv::Algorithm* cv::DescriptorMatcher::castToAlgorithm(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



65109
65110
65111
65112
65113
65114
65115
65116
65117
# File 'lib/ropencv/ropencv_types.rb', line 65109

def cast_to_algorithm(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_descriptor_matcher_cast_to_algorithm( self, parse_ownership)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#clearVoid

Note:

method wrapper for void cv::DescriptorMatcher::clear()

Returns:

  • (Void)


64867
64868
64869
64870
# File 'lib/ropencv/ropencv_types.rb', line 64867

def clear()
    __validate_pointer__
    Rbind::cv_descriptor_matcher_clear( self)
end

#clone(empty_train_data = false) ⇒ Cv::Ptr::Cv_DescriptorMatcher

Note:

method wrapper for const cv::Ptrcv::DescriptorMatcher cv::DescriptorMatcher::clone(bool emptyTrainData = false)

Parameters:

  • empty_train_data (Bool) (defaults to: false)

Returns:



65051
65052
65053
65054
65055
65056
65057
65058
65059
# File 'lib/ropencv/ropencv_types.rb', line 65051

def clone(empty_train_data = false)
    __validate_pointer__
    result = Rbind::cv_descriptor_matcher_clone( self, empty_train_data)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#emptyBool

Note:

method wrapper for bool cv::DescriptorMatcher::empty()

Returns:

  • (Bool)


64874
64875
64876
64877
# File 'lib/ropencv/ropencv_types.rb', line 64874

def empty()
    __validate_pointer__
    Rbind::cv_descriptor_matcher_empty( self)
end

#get_default_nameStd::String Also known as: getDefaultName

Note:

method wrapper for const std::string cv::DescriptorMatcher::getDefaultName()

Returns:



65139
65140
65141
65142
65143
65144
65145
65146
65147
# File 'lib/ropencv/ropencv_types.rb', line 65139

def get_default_name()
    __validate_pointer__
    result = Rbind::cv_descriptor_matcher_get_default_name( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#get_train_descriptorsStd::Vector::Cv_Mat Also known as: getTrainDescriptors

Note:

method wrapper for const std::vectorcv::Mat cv::DescriptorMatcher::getTrainDescriptors()

Returns:



64854
64855
64856
64857
64858
64859
64860
64861
64862
# File 'lib/ropencv/ropencv_types.rb', line 64854

def get_train_descriptors()
    __validate_pointer__
    result = Rbind::cv_descriptor_matcher_get_train_descriptors( self)
    if result.respond_to?(:__owner__?) && !result.__owner__?
    # store owner insight the pointer to not get garbage collected
        result.instance_variable_get(:@__obj_ptr__).instance_variable_set(:@__owner__,self) 
    end
    result
end

#is_mask_supportedBool Also known as: isMaskSupported

Note:

method wrapper for bool cv::DescriptorMatcher::isMaskSupported()

Returns:

  • (Bool)


64881
64882
64883
64884
# File 'lib/ropencv/ropencv_types.rb', line 64881

def is_mask_supported()
    __validate_pointer__
    Rbind::cv_descriptor_matcher_is_mask_supported( self)
end

#knn_match(query_descriptors, train_descriptors, matches, k, mask = Cv::Mat.new(), compact_result = false) ⇒ Void #knn_match(query_descriptors, matches, k, masks = Std::Vector::Cv_Mat.new(), compact_result = false) ⇒ Void

Note:

wrapper for overloaded method knn_match

Overloads:

  • #knn_match(query_descriptors, train_descriptors, matches, k, mask = Cv::Mat.new(), compact_result = false) ⇒ Void

    Parameters:

    Returns:

    • (Void)
  • #knn_match(query_descriptors, matches, k, masks = Std::Vector::Cv_Mat.new(), compact_result = false) ⇒ Void

    Parameters:

    Returns:

    • (Void)

Raises:

  • (ArgumentError)


64957
64958
64959
64960
64961
64962
64963
64964
64965
64966
64967
64968
64969
64970
64971
64972
64973
64974
64975
64976
64977
64978
64979
64980
64981
64982
64983
64984
64985
64986
64987
64988
# File 'lib/ropencv/ropencv_types.rb', line 64957

def knn_match(*args)
    __validate_pointer__
    # overloaded method wrapper for void cv::DescriptorMatcher::knnMatch(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, std::vector<std::vector<cv::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)
        targs = args.clone
        targs.size.upto(5) do |i|
            targs[i] = @@cv_descriptor_matcher_knn_match_defaults0[i]
        end
        begin
                return Rbind::cv_descriptor_matcher_knn_match(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for void cv::DescriptorMatcher::knnMatch(const cv::Mat queryDescriptors, std::vector<std::vector<cv::DMatch> >& matches, int k, const std::vector<cv::Mat> masks = vector<Mat>(), bool compactResult = false)
    @@cv_descriptor_matcher_knn_match__2_defaults1 ||= [nil, nil, nil, Std::Vector::Cv_Mat.new(), false]
    if(args.size >= 3 && args.size <= 5)
        targs = args.clone
        targs.size.upto(4) do |i|
            targs[i] = @@cv_descriptor_matcher_knn_match__2_defaults1[i]
        end
        begin
                return Rbind::cv_descriptor_matcher_knn_match__2(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}"
end

#match(query_descriptors, train_descriptors, matches, mask = Cv::Mat.new()) ⇒ Void #match(query_descriptors, matches, masks = Std::Vector::Cv_Mat.new()) ⇒ Void

Note:

wrapper for overloaded method match

Overloads:

  • #match(query_descriptors, train_descriptors, matches, mask = Cv::Mat.new()) ⇒ Void

    Parameters:

    Returns:

    • (Void)
  • #match(query_descriptors, matches, masks = Std::Vector::Cv_Mat.new()) ⇒ Void

    Parameters:

    Returns:

    • (Void)

Raises:

  • (ArgumentError)


64907
64908
64909
64910
64911
64912
64913
64914
64915
64916
64917
64918
64919
64920
64921
64922
64923
64924
64925
64926
64927
64928
64929
64930
64931
64932
64933
64934
64935
64936
64937
64938
# File 'lib/ropencv/ropencv_types.rb', line 64907

def match(*args)
    __validate_pointer__
    # overloaded method wrapper for void cv::DescriptorMatcher::match(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, std::vector<cv::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)
        targs = args.clone
        targs.size.upto(3) do |i|
            targs[i] = @@cv_descriptor_matcher_match_defaults0[i]
        end
        begin
                return Rbind::cv_descriptor_matcher_match(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for void cv::DescriptorMatcher::match(const cv::Mat queryDescriptors, std::vector<cv::DMatch>& matches, const std::vector<cv::Mat> masks = vector<Mat>())
    @@cv_descriptor_matcher_match__2_defaults1 ||= [nil, nil, Std::Vector::Cv_Mat.new()]
    if(args.size >= 2 && args.size <= 3)
        targs = args.clone
        targs.size.upto(2) do |i|
            targs[i] = @@cv_descriptor_matcher_match__2_defaults1[i]
        end
        begin
                return Rbind::cv_descriptor_matcher_match__2(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}"
end

#radius_match(query_descriptors, train_descriptors, matches, max_distance, mask = Cv::Mat.new(), compact_result = false) ⇒ Void #radius_match(query_descriptors, matches, max_distance, masks = Std::Vector::Cv_Mat.new(), compact_result = false) ⇒ Void

Note:

wrapper for overloaded method radius_match

Overloads:

  • #radius_match(query_descriptors, train_descriptors, matches, max_distance, mask = Cv::Mat.new(), compact_result = false) ⇒ Void

    Parameters:

    Returns:

    • (Void)
  • #radius_match(query_descriptors, matches, max_distance, masks = Std::Vector::Cv_Mat.new(), compact_result = false) ⇒ Void

    Parameters:

    Returns:

    • (Void)

Raises:

  • (ArgumentError)


65007
65008
65009
65010
65011
65012
65013
65014
65015
65016
65017
65018
65019
65020
65021
65022
65023
65024
65025
65026
65027
65028
65029
65030
65031
65032
65033
65034
65035
65036
65037
65038
# File 'lib/ropencv/ropencv_types.rb', line 65007

def radius_match(*args)
    __validate_pointer__
    # overloaded method wrapper for void cv::DescriptorMatcher::radiusMatch(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, std::vector<std::vector<cv::DMatch> >& matches, float maxDistance, const cv::Mat mask = Mat(), bool compactResult = false)
    @@cv_descriptor_matcher_radius_match_defaults0 ||= [nil, nil, nil, nil, Cv::Mat.new(), false]
    if(args.size >= 4 && args.size <= 6)
        targs = args.clone
        targs.size.upto(5) do |i|
            targs[i] = @@cv_descriptor_matcher_radius_match_defaults0[i]
        end
        begin
                return Rbind::cv_descriptor_matcher_radius_match(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for void cv::DescriptorMatcher::radiusMatch(const cv::Mat queryDescriptors, std::vector<std::vector<cv::DMatch> >& matches, float maxDistance, const std::vector<cv::Mat> masks = vector<Mat>(), bool compactResult = false)
    @@cv_descriptor_matcher_radius_match__2_defaults1 ||= [nil, nil, nil, Std::Vector::Cv_Mat.new(), false]
    if(args.size >= 3 && args.size <= 5)
        targs = args.clone
        targs.size.upto(4) do |i|
            targs[i] = @@cv_descriptor_matcher_radius_match__2_defaults1[i]
        end
        begin
                return Rbind::cv_descriptor_matcher_radius_match__2(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}"
end

#read(_arg1) ⇒ Void

Note:

method wrapper for void cv::DescriptorMatcher::read(const cv::FileNode arg1)

Parameters:

Returns:

  • (Void)


65043
65044
65045
65046
# File 'lib/ropencv/ropencv_types.rb', line 65043

def read(_arg1)
    __validate_pointer__
    Rbind::cv_descriptor_matcher_read__2( self, _arg1)
end

#save(filename) ⇒ Void

Note:

method wrapper for void cv::DescriptorMatcher::save(const std::string filename)

Parameters:

Returns:

  • (Void)


65132
65133
65134
65135
# File 'lib/ropencv/ropencv_types.rb', line 65132

def save(filename)
    __validate_pointer__
    Rbind::cv_descriptor_matcher_save( self, filename)
end

#to_sObject

converts DescriptorMatcher into a string by crawling through all its attributes



64829
64830
64831
# File 'lib/ropencv/ropencv_types.rb', line 64829

def to_s
    "#<cv::DescriptorMatcher >"
end

#trainVoid

Note:

method wrapper for void cv::DescriptorMatcher::train()

Returns:

  • (Void)


64889
64890
64891
64892
# File 'lib/ropencv/ropencv_types.rb', line 64889

def train()
    __validate_pointer__
    Rbind::cv_descriptor_matcher_train( self)
end