Class: OpenCV::Cv::BOWImgDescriptorExtractor

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

.new(*args) ⇒ Object

Parameters:

Raises:

  • (ArgumentError)


27720
27721
27722
27723
27724
27725
27726
27727
27728
27729
27730
27731
27732
27733
27734
27735
27736
27737
27738
27739
27740
# File 'lib/ropencv/ropencv_types.rb', line 27720

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(BOWImgDescriptorExtractorStruct)
        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::BOWImgDescriptorExtractor::BOWImgDescriptorExtractor(const cv::Ptr<cv::DescriptorExtractor> dextractor, const cv::Ptr<cv::DescriptorMatcher> dmatcher)
    @@cv_bow_img_descriptor_extractor_bow_img_descriptor_extractor_defaults0 ||= [nil, nil]
    if(args.size >= 2 && args.size <= 2)
        targs = args.clone
        targs.size.upto(1) do |i|
            targs[i] = @@cv_bow_img_descriptor_extractor_bow_img_descriptor_extractor_defaults0[i]
        end
        begin
                return Rbind::cv_bow_img_descriptor_extractor_bow_img_descriptor_extractor(*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



27714
27715
27716
# File 'lib/ropencv/ropencv_types.rb', line 27714

def self.null
    new(BOWImgDescriptorExtractorStruct.new)
end

Instance Method Details

#compute(image, keypoints, img_descriptor) ⇒ Void

Note:

method wrapper for void cv::BOWImgDescriptorExtractor::compute2(const cv::Mat image, const std::vectorcv::KeyPoint keypoints, cv::Mat& imgDescriptor)

Parameters:

Returns:

  • (Void)


27842
27843
27844
27845
# File 'lib/ropencv/ropencv_types.rb', line 27842

def compute(image, keypoints, img_descriptor)
    __validate_pointer__
    Rbind::cv_bow_img_descriptor_extractor_compute( self, image, keypoints, img_descriptor)
end

#descriptor_sizeFixnum Also known as: descriptorSize

Note:

method wrapper for int cv::BOWImgDescriptorExtractor::descriptorSize()

Returns:

  • (Fixnum)


27849
27850
27851
27852
# File 'lib/ropencv/ropencv_types.rb', line 27849

def descriptor_size()
    __validate_pointer__
    Rbind::cv_bow_img_descriptor_extractor_descriptor_size( self)
end

#descriptor_typeFixnum Also known as: descriptorType

Note:

method wrapper for int cv::BOWImgDescriptorExtractor::descriptorType()

Returns:

  • (Fixnum)


27857
27858
27859
27860
# File 'lib/ropencv/ropencv_types.rb', line 27857

def descriptor_type()
    __validate_pointer__
    Rbind::cv_bow_img_descriptor_extractor_descriptor_type( self)
end

#get_vocabularyCv::Mat Also known as: getVocabulary

Note:

method wrapper for cv::Mat cv::BOWImgDescriptorExtractor::getVocabulary()

Returns:



27826
27827
27828
27829
27830
27831
27832
27833
27834
# File 'lib/ropencv/ropencv_types.rb', line 27826

def get_vocabulary()
    __validate_pointer__
    result = Rbind::cv_bow_img_descriptor_extractor_get_vocabulary( 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

#set_vocabulary(vocabulary) ⇒ Void Also known as: setVocabulary

Note:

method wrapper for void cv::BOWImgDescriptorExtractor::setVocabulary(const cv::Mat vocabulary)

methods

Parameters:

Returns:

  • (Void)


27818
27819
27820
27821
# File 'lib/ropencv/ropencv_types.rb', line 27818

def set_vocabulary(vocabulary)
    __validate_pointer__
    Rbind::cv_bow_img_descriptor_extractor_set_vocabulary( self, vocabulary)
end

#to_sObject

converts BOWImgDescriptorExtractor into a string by crawling through all its attributes



27806
27807
27808
# File 'lib/ropencv/ropencv_types.rb', line 27806

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