Class: OpenCV::Cv::Feature2D
- Inherits:
-
Object
- Object
- OpenCV::Cv::Feature2D
- 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::Feature2D::_create(const cv::String name).
-
.create(name) ⇒ Object
wrapper for Ptr_Feature2D cv::Feature2D::create(const cv::String name).
-
.from_native(ptr, context) ⇒ Object
private
can be overwritten by the user.
-
.get_list(algorithms) ⇒ Object
wrapper for void cv::Feature2D::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.
-
#compute(image, keypoints, descriptors) ⇒ Object
wrapper for void cv::Feature2D::compute(const cv::Mat image, vector_KeyPoint keypoints, cv::Mat descriptors).
-
#detect(image, keypoints, mask = Cv::Mat.new()) ⇒ Object
wrapper for void cv::Feature2D::detect(const cv::Mat image, vector_KeyPoint keypoints, const cv::Mat mask=Mat()).
-
#detect_and_compute(image, mask, keypoints, descriptors, use_provided_keypoints = false) ⇒ Object
methods wrapper for void cv::Feature2D::operator()(const cv::Mat image, const cv::Mat mask, vector_KeyPoint keypoints, cv::Mat descriptors, bool useProvidedKeypoints=false).
-
#empty(*args) ⇒ Object
wrapper for overloaded method empty.
-
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::Feature2D::getAlgorithm(const cv::String name).
-
#get_bool(name) ⇒ Object
wrapper for bool cv::Feature2D::getBool(const cv::String name).
-
#get_double(name) ⇒ Object
wrapper for double cv::Feature2D::getDouble(const cv::String name).
-
#get_int(name) ⇒ Object
wrapper for int cv::Feature2D::getInt(const cv::String name).
-
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::Feature2D::getMat(const cv::String name).
-
#get_mat_vector(name) ⇒ Object
wrapper for vector_Mat cv::Feature2D::getMatVector(const cv::String name).
-
#get_params(names) ⇒ Object
wrapper for void cv::Feature2D::getParams(vector_string names).
-
#get_string(name) ⇒ Object
wrapper for cv::String cv::Feature2D::getString(const cv::String name).
-
#initialize(ptr) ⇒ Feature2D
constructor
private
A new instance of Feature2D.
-
#param_help(name) ⇒ Object
wrapper for cv::String cv::Feature2D::paramHelp(const cv::String name).
-
#param_type(name) ⇒ Object
wrapper for int cv::Feature2D::paramType(const cv::String name).
-
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::Feature2D::setAlgorithm(const cv::String name, const Ptr_Algorithm value).
-
#set_bool(name, value) ⇒ Object
wrapper for void cv::Feature2D::setBool(const cv::String name, bool value).
-
#set_double(name, value) ⇒ Object
wrapper for void cv::Feature2D::setDouble(const cv::String name, double value).
-
#set_int(name, value) ⇒ Object
wrapper for void cv::Feature2D::setInt(const cv::String name, int value).
-
#set_mat(name, value) ⇒ Object
wrapper for void cv::Feature2D::setMat(const cv::String name, const cv::Mat value).
-
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::Feature2D::setMatVector(const cv::String name, const vector_Mat value).
-
#set_string(name, value) ⇒ Object
wrapper for void cv::Feature2D::setString(const cv::String name, const cv::String value).
Constructor Details
#initialize(ptr) ⇒ Feature2D
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 Feature2D.
8911 8912 8913 8914 8915 8916 8917 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8911 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? Feature2DStruct ptr else Feature2DStruct.new(FFI::AutoPointer.new(ptr,Feature2DStruct.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.
8908 8909 8910 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8908 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
._create(name) ⇒ Object
wrapper for Ptr_Algorithm cv::Feature2D::_create(const cv::String name)
9087 9088 9089 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9087 def self._create(name) Rbind::cv_feature2d__create(name) end |
.create(name) ⇒ Object
wrapper for Ptr_Feature2D cv::Feature2D::create(const cv::String name)
8941 8942 8943 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8941 def self.create(name) Rbind::cv_feature2d_create(name) 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
8903 8904 8905 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8903 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.get_list(algorithms) ⇒ Object
wrapper for void cv::Feature2D::getList(vector_string algorithms)
9082 9083 9084 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9082 def self.get_list(algorithms) Rbind::cv_feature2d_get_list(algorithms) end |
.new(*args) ⇒ Object
8872 8873 8874 8875 8876 8877 8878 8879 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8872 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(Feature2DStruct) 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.
8891 8892 8893 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8891 def self.rbind_from_native(ptr,context) Feature2D.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.
8882 8883 8884 8885 8886 8887 8888 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8882 def self.rbind_to_native(obj,context) if obj.is_a? Feature2D 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
8897 8898 8899 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8897 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
8922 8923 8924 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8922 def __owner__? @__obj_ptr__[:bowner] end |
#compute(image, keypoints, descriptors) ⇒ Object
wrapper for void cv::Feature2D::compute(const cv::Mat image, vector_KeyPoint keypoints, cv::Mat descriptors)
9092 9093 9094 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9092 def compute(image, keypoints, descriptors) Rbind::cv_feature2d_compute( self, image, keypoints, descriptors) end |
#detect(image, keypoints, mask = Cv::Mat.new()) ⇒ Object
wrapper for void cv::Feature2D::detect(const cv::Mat image, vector_KeyPoint keypoints, const cv::Mat mask=Mat())
8946 8947 8948 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8946 def detect(image, keypoints, mask = Cv::Mat.new()) Rbind::cv_feature2d_detect( self, image, keypoints, mask) end |
#detect_and_compute(image, mask, keypoints, descriptors, use_provided_keypoints = false) ⇒ Object
methods wrapper for void cv::Feature2D::operator()(const cv::Mat image, const cv::Mat mask, vector_KeyPoint keypoints, cv::Mat descriptors, bool useProvidedKeypoints=false)
8936 8937 8938 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8936 def detect_and_compute(image, mask, keypoints, descriptors, use_provided_keypoints = false) Rbind::cv_feature2d_detect_and_compute( self, image, mask, keypoints, descriptors, use_provided_keypoints) end |
#empty(*args) ⇒ Object
wrapper for overloaded method empty
8951 8952 8953 8954 8955 8956 8957 8958 8959 8960 8961 8962 8963 8964 8965 8966 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 8978 8979 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8951 def empty(*args) # wrapper for bool cv::Feature2D::empty() @@cv_feature2d_empty_defaults0 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@cv_feature2d_empty_defaults0[i] end begin return Rbind::cv_feature2d_empty(self,*args) rescue TypeError => e @error = e end end # wrapper for bool cv::Feature2D::empty() @@cv_feature2d_empty2_defaults1 ||= [] if(args.size >= 0 && args.size <= 0) args.size.upto(-1) do |i| args[i] = @@cv_feature2d_empty2_defaults1[i] end begin return Rbind::cv_feature2d_empty2(self,*args) rescue TypeError => e @error = e end end raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}" end |
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::Feature2D::getAlgorithm(const cv::String name)
9021 9022 9023 9024 9025 9026 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9021 def get_algorithm(name) result = Rbind::cv_feature2d_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::Feature2D::getBool(const cv::String name)
8992 8993 8994 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8992 def get_bool(name) Rbind::cv_feature2d_get_bool( self, name) end |
#get_double(name) ⇒ Object
wrapper for double cv::Feature2D::getDouble(const cv::String name)
8987 8988 8989 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8987 def get_double(name) Rbind::cv_feature2d_get_double( self, name) end |
#get_int(name) ⇒ Object
wrapper for int cv::Feature2D::getInt(const cv::String name)
8982 8983 8984 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8982 def get_int(name) Rbind::cv_feature2d_get_int( self, name) end |
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::Feature2D::getMat(const cv::String name)
9005 9006 9007 9008 9009 9010 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9005 def get_mat(name) result = Rbind::cv_feature2d_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::Feature2D::getMatVector(const cv::String name)
9013 9014 9015 9016 9017 9018 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9013 def get_mat_vector(name) result = Rbind::cv_feature2d_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::Feature2D::getParams(vector_string names)
9077 9078 9079 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9077 def get_params(names) Rbind::cv_feature2d_get_params( self, names) end |
#get_string(name) ⇒ Object
wrapper for cv::String cv::Feature2D::getString(const cv::String name)
8997 8998 8999 9000 9001 9002 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 8997 def get_string(name) result = Rbind::cv_feature2d_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::Feature2D::paramHelp(const cv::String name)
9064 9065 9066 9067 9068 9069 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9064 def param_help(name) result = Rbind::cv_feature2d_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::Feature2D::paramType(const cv::String name)
9072 9073 9074 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9072 def param_type(name) Rbind::cv_feature2d_param_type( self, name) end |
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::Feature2D::setAlgorithm(const cv::String name, const Ptr_Algorithm value)
9059 9060 9061 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9059 def set_algorithm(name, value) Rbind::cv_feature2d_set_algorithm( self, name, value) end |
#set_bool(name, value) ⇒ Object
wrapper for void cv::Feature2D::setBool(const cv::String name, bool value)
9039 9040 9041 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9039 def set_bool(name, value) Rbind::cv_feature2d_set_bool( self, name, value) end |
#set_double(name, value) ⇒ Object
wrapper for void cv::Feature2D::setDouble(const cv::String name, double value)
9034 9035 9036 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9034 def set_double(name, value) Rbind::cv_feature2d_set_double( self, name, value) end |
#set_int(name, value) ⇒ Object
wrapper for void cv::Feature2D::setInt(const cv::String name, int value)
9029 9030 9031 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9029 def set_int(name, value) Rbind::cv_feature2d_set_int( self, name, value) end |
#set_mat(name, value) ⇒ Object
wrapper for void cv::Feature2D::setMat(const cv::String name, const cv::Mat value)
9049 9050 9051 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9049 def set_mat(name, value) Rbind::cv_feature2d_set_mat( self, name, value) end |
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::Feature2D::setMatVector(const cv::String name, const vector_Mat value)
9054 9055 9056 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9054 def set_mat_vector(name, value) Rbind::cv_feature2d_set_mat_vector( self, name, value) end |
#set_string(name, value) ⇒ Object
wrapper for void cv::Feature2D::setString(const cv::String name, const cv::String value)
9044 9045 9046 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9044 def set_string(name, value) Rbind::cv_feature2d_set_string( self, name, value) end |