Class: OpenCV::Cv::BFMatcher

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

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(norm_type = NORM_L2, cross_check = false) ⇒ Cv::Ptr::Cv_BFMatcher

Note:

wrapper for static method const cv::Ptrcv::BFMatcher cv::BFMatcher::create(int normType = NORM_L2, bool crossCheck = false)

methods

Parameters:

  • norm_type (Fixnum) (defaults to: NORM_L2)
  • cross_check (Bool) (defaults to: false)

Returns:



65555
65556
65557
# File 'lib/ropencv/ropencv_types.rb', line 65555

def self.create(norm_type = NORM_L2, cross_check = false)
    Rbind::cv_bf_matcher_create(norm_type, cross_check)
end

.new(*args) ⇒ Object

Parameters:

  • norm_type (Fixnum)
  • cross_check (Bool)

Raises:

  • (ArgumentError)


65456
65457
65458
65459
65460
65461
65462
65463
65464
65465
65466
65467
65468
65469
65470
65471
65472
65473
65474
65475
65476
# File 'lib/ropencv/ropencv_types.rb', line 65456

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(BFMatcherStruct)
        raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1
        return super(args.first)
    end
    # overloaded method wrapper for cv::BFMatcher::BFMatcher(int normType = NORM_L2, bool crossCheck = false)
    @@cv_bf_matcher_bf_matcher_defaults0 ||= [NORM_L2, false]
    if(args.size >= 0 && args.size <= 2)
        targs = args.clone
        targs.size.upto(1) do |i|
            targs[i] = @@cv_bf_matcher_bf_matcher_defaults0[i]
        end
        begin
                return Rbind::cv_bf_matcher_bf_matcher(*targs)
        rescue TypeError => e
            @error = e
        end
    end

    raise ArgumentError, "no constructor for #{self}(#{args.inspect})"
end

.nullObject

returns a null pointer to the object



65450
65451
65452
# File 'lib/ropencv/ropencv_types.rb', line 65450

def self.null
    new(BFMatcherStruct.new)
end

Instance Method Details

#add(descriptors) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


65576
65577
65578
65579
# File 'lib/ropencv/ropencv_types.rb', line 65576

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

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

Note:

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

Parameters:

  • parse_ownership (Bool)

Returns:



65793
65794
65795
65796
65797
65798
65799
65800
65801
# File 'lib/ropencv/ropencv_types.rb', line 65793

def cast_to_algorithm(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_bf_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

#cast_to_descriptor_matcher(parse_ownership) ⇒ Cv::DescriptorMatcher Also known as: castToDescriptorMatcher

Note:

method wrapper for cv::DescriptorMatcher* cv::BFMatcher::castToDescriptorMatcher(bool parse_ownership)

Parameters:

  • parse_ownership (Bool)

Returns:



65562
65563
65564
65565
65566
65567
65568
65569
65570
# File 'lib/ropencv/ropencv_types.rb', line 65562

def cast_to_descriptor_matcher(parse_ownership)
    __validate_pointer__
    result = Rbind::cv_bf_matcher_cast_to_descriptor_matcher( 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::BFMatcher::clear()

Returns:

  • (Void)


65596
65597
65598
65599
# File 'lib/ropencv/ropencv_types.rb', line 65596

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

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

Note:

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

Parameters:

  • empty_train_data (Bool) (defaults to: false)

Returns:



65780
65781
65782
65783
65784
65785
65786
65787
65788
# File 'lib/ropencv/ropencv_types.rb', line 65780

def clone(empty_train_data = false)
    __validate_pointer__
    result = Rbind::cv_bf_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::BFMatcher::empty()

Returns:

  • (Bool)


65603
65604
65605
65606
# File 'lib/ropencv/ropencv_types.rb', line 65603

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

#get_default_nameStd::String Also known as: getDefaultName

Note:

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

Returns:



65814
65815
65816
65817
65818
65819
65820
65821
65822
# File 'lib/ropencv/ropencv_types.rb', line 65814

def get_default_name()
    __validate_pointer__
    result = Rbind::cv_bf_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::BFMatcher::getTrainDescriptors()

Returns:



65583
65584
65585
65586
65587
65588
65589
65590
65591
# File 'lib/ropencv/ropencv_types.rb', line 65583

def get_train_descriptors()
    __validate_pointer__
    result = Rbind::cv_bf_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::BFMatcher::isMaskSupported()

Returns:

  • (Bool)


65610
65611
65612
65613
# File 'lib/ropencv/ropencv_types.rb', line 65610

def is_mask_supported()
    __validate_pointer__
    Rbind::cv_bf_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)


65686
65687
65688
65689
65690
65691
65692
65693
65694
65695
65696
65697
65698
65699
65700
65701
65702
65703
65704
65705
65706
65707
65708
65709
65710
65711
65712
65713
65714
65715
65716
65717
# File 'lib/ropencv/ropencv_types.rb', line 65686

def knn_match(*args)
    __validate_pointer__
    # overloaded method wrapper for void cv::BFMatcher::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_bf_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_bf_matcher_knn_match_defaults0[i]
        end
        begin
                return Rbind::cv_bf_matcher_knn_match(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for void cv::BFMatcher::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_bf_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_bf_matcher_knn_match__2_defaults1[i]
        end
        begin
                return Rbind::cv_bf_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)


65636
65637
65638
65639
65640
65641
65642
65643
65644
65645
65646
65647
65648
65649
65650
65651
65652
65653
65654
65655
65656
65657
65658
65659
65660
65661
65662
65663
65664
65665
65666
65667
# File 'lib/ropencv/ropencv_types.rb', line 65636

def match(*args)
    __validate_pointer__
    # overloaded method wrapper for void cv::BFMatcher::match(const cv::Mat queryDescriptors, const cv::Mat trainDescriptors, std::vector<cv::DMatch>& matches, const cv::Mat mask = Mat())
    @@cv_bf_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_bf_matcher_match_defaults0[i]
        end
        begin
                return Rbind::cv_bf_matcher_match(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for void cv::BFMatcher::match(const cv::Mat queryDescriptors, std::vector<cv::DMatch>& matches, const std::vector<cv::Mat> masks = vector<Mat>())
    @@cv_bf_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_bf_matcher_match__2_defaults1[i]
        end
        begin
                return Rbind::cv_bf_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)


65736
65737
65738
65739
65740
65741
65742
65743
65744
65745
65746
65747
65748
65749
65750
65751
65752
65753
65754
65755
65756
65757
65758
65759
65760
65761
65762
65763
65764
65765
65766
65767
# File 'lib/ropencv/ropencv_types.rb', line 65736

def radius_match(*args)
    __validate_pointer__
    # overloaded method wrapper for void cv::BFMatcher::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_bf_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_bf_matcher_radius_match_defaults0[i]
        end
        begin
                return Rbind::cv_bf_matcher_radius_match(self,*targs)
        rescue TypeError => e
            @error = e
        end
    end

    # overloaded method wrapper for void cv::BFMatcher::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_bf_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_bf_matcher_radius_match__2_defaults1[i]
        end
        begin
                return Rbind::cv_bf_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::BFMatcher::read(const cv::FileNode arg1)

Parameters:

Returns:

  • (Void)


65772
65773
65774
65775
# File 'lib/ropencv/ropencv_types.rb', line 65772

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

#save(filename) ⇒ Void

Note:

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

Parameters:

Returns:

  • (Void)


65807
65808
65809
65810
# File 'lib/ropencv/ropencv_types.rb', line 65807

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

#to_sObject

converts BFMatcher into a string by crawling through all its attributes



65542
65543
65544
# File 'lib/ropencv/ropencv_types.rb', line 65542

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

#trainVoid

Note:

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

Returns:

  • (Void)


65618
65619
65620
65621
# File 'lib/ropencv/ropencv_types.rb', line 65618

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