Class: OpenCV::Cv::DescriptorExtractor

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(ptr) ⇒ DescriptorExtractor

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 DescriptorExtractor.



8697
8698
8699
8700
8701
8702
8703
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8697

def initialize(ptr)
    @__obj_ptr__ = if ptr.is_a? DescriptorExtractorStruct
                       ptr
                   else
                       DescriptorExtractorStruct.new(FFI::AutoPointer.new(ptr,DescriptorExtractorStruct.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.



8694
8695
8696
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8694

def __obj_ptr__
  @__obj_ptr__
end

Class Method Details

._create(name) ⇒ Object

wrapper for Ptr_Algorithm cv::DescriptorExtractor::_create(const cv::String name)



8842
8843
8844
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8842

def self._create(name)
    Rbind::cv_descriptor_extractor__create(name)
end

.create(descriptor_extractor_type) ⇒ Object

wrapper for Ptr_DescriptorExtractor cv::DescriptorExtractor::create(const cv::String descriptorExtractorType)



8732
8733
8734
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8732

def self.create(descriptor_extractor_type)
    Rbind::cv_descriptor_extractor_create(descriptor_extractor_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



8689
8690
8691
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8689

def self.from_native(ptr,context)
    rbind_from_native(ptr,context)
end

.get_list(algorithms) ⇒ Object

wrapper for void cv::DescriptorExtractor::getList(vector_string algorithms)



8837
8838
8839
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8837

def self.get_list(algorithms)
    Rbind::cv_descriptor_extractor_get_list(algorithms)
end

.new(*args) ⇒ Object

Raises:

  • (ArgumentError)


8658
8659
8660
8661
8662
8663
8664
8665
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8658

def self.new(*args)
    if args.first.is_a?(FFI::Pointer) || args.first.is_a?(DescriptorExtractorStruct)
        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.



8677
8678
8679
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8677

def self.rbind_from_native(ptr,context)
    DescriptorExtractor.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.



8668
8669
8670
8671
8672
8673
8674
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8668

def self.rbind_to_native(obj,context)
    if obj.is_a? DescriptorExtractor
        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



8683
8684
8685
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8683

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

Returns:

  • (Boolean)


8708
8709
8710
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8708

def __owner__?
    @__obj_ptr__[:bowner]
end

#compute(image, keypoints, descriptors) ⇒ Object

methods wrapper for void cv::DescriptorExtractor::compute(const cv::Mat image, vector_KeyPoint keypoints, cv::Mat descriptors)



8722
8723
8724
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8722

def compute(image, keypoints, descriptors)
    Rbind::cv_descriptor_extractor_compute( self, image, keypoints, descriptors)
end

#emptyObject

wrapper for bool cv::DescriptorExtractor::empty()



8727
8728
8729
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8727

def empty()
    Rbind::cv_descriptor_extractor_empty( self)
end

#get_algorithm(name) ⇒ Object

wrapper for Ptr_Algorithm cv::DescriptorExtractor::getAlgorithm(const cv::String name)



8776
8777
8778
8779
8780
8781
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8776

def get_algorithm(name)
    result = Rbind::cv_descriptor_extractor_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::DescriptorExtractor::getBool(const cv::String name)



8747
8748
8749
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8747

def get_bool(name)
    Rbind::cv_descriptor_extractor_get_bool( self, name)
end

#get_double(name) ⇒ Object

wrapper for double cv::DescriptorExtractor::getDouble(const cv::String name)



8742
8743
8744
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8742

def get_double(name)
    Rbind::cv_descriptor_extractor_get_double( self, name)
end

#get_int(name) ⇒ Object

wrapper for int cv::DescriptorExtractor::getInt(const cv::String name)



8737
8738
8739
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8737

def get_int(name)
    Rbind::cv_descriptor_extractor_get_int( self, name)
end

#get_mat(name) ⇒ Object

wrapper for cv::Mat cv::DescriptorExtractor::getMat(const cv::String name)



8760
8761
8762
8763
8764
8765
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8760

def get_mat(name)
    result = Rbind::cv_descriptor_extractor_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::DescriptorExtractor::getMatVector(const cv::String name)



8768
8769
8770
8771
8772
8773
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8768

def get_mat_vector(name)
    result = Rbind::cv_descriptor_extractor_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::DescriptorExtractor::getParams(vector_string names)



8832
8833
8834
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8832

def get_params(names)
    Rbind::cv_descriptor_extractor_get_params( self, names)
end

#get_string(name) ⇒ Object

wrapper for cv::String cv::DescriptorExtractor::getString(const cv::String name)



8752
8753
8754
8755
8756
8757
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8752

def get_string(name)
    result = Rbind::cv_descriptor_extractor_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

#param_help(name) ⇒ Object

wrapper for cv::String cv::DescriptorExtractor::paramHelp(const cv::String name)



8819
8820
8821
8822
8823
8824
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8819

def param_help(name)
    result = Rbind::cv_descriptor_extractor_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::DescriptorExtractor::paramType(const cv::String name)



8827
8828
8829
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8827

def param_type(name)
    Rbind::cv_descriptor_extractor_param_type( self, name)
end

#set_algorithm(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setAlgorithm(const cv::String name, const Ptr_Algorithm value)



8814
8815
8816
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8814

def set_algorithm(name, value)
    Rbind::cv_descriptor_extractor_set_algorithm( self, name, value)
end

#set_bool(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setBool(const cv::String name, bool value)



8794
8795
8796
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8794

def set_bool(name, value)
    Rbind::cv_descriptor_extractor_set_bool( self, name, value)
end

#set_double(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setDouble(const cv::String name, double value)



8789
8790
8791
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8789

def set_double(name, value)
    Rbind::cv_descriptor_extractor_set_double( self, name, value)
end

#set_int(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setInt(const cv::String name, int value)



8784
8785
8786
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8784

def set_int(name, value)
    Rbind::cv_descriptor_extractor_set_int( self, name, value)
end

#set_mat(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setMat(const cv::String name, const cv::Mat value)



8804
8805
8806
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8804

def set_mat(name, value)
    Rbind::cv_descriptor_extractor_set_mat( self, name, value)
end

#set_mat_vector(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setMatVector(const cv::String name, const vector_Mat value)



8809
8810
8811
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8809

def set_mat_vector(name, value)
    Rbind::cv_descriptor_extractor_set_mat_vector( self, name, value)
end

#set_string(name, value) ⇒ Object

wrapper for void cv::DescriptorExtractor::setString(const cv::String name, const cv::String value)



8799
8800
8801
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8799

def set_string(name, value)
    Rbind::cv_descriptor_extractor_set_string( self, name, value)
end