Class: OpenCV::Cv::StarDetector
- Inherits:
-
Object
- Object
- OpenCV::Cv::StarDetector
- 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::StarDetector::_create(const cv::String name).
-
.create(detector_type) ⇒ Object
wrapper for Ptr_FeatureDetector cv::StarDetector::create(const cv::String detectorType).
-
.from_native(ptr, context) ⇒ Object
private
can be overwritten by the user.
-
.get_list(algorithms) ⇒ Object
wrapper for void cv::StarDetector::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.
-
#detect(*args) ⇒ Object
methods wrapper for overloaded method detect.
-
#empty ⇒ Object
wrapper for bool cv::StarDetector::empty().
-
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::StarDetector::getAlgorithm(const cv::String name).
-
#get_bool(name) ⇒ Object
wrapper for bool cv::StarDetector::getBool(const cv::String name).
-
#get_double(name) ⇒ Object
wrapper for double cv::StarDetector::getDouble(const cv::String name).
-
#get_int(name) ⇒ Object
wrapper for int cv::StarDetector::getInt(const cv::String name).
-
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::StarDetector::getMat(const cv::String name).
-
#get_mat_vector(name) ⇒ Object
wrapper for vector_Mat cv::StarDetector::getMatVector(const cv::String name).
-
#get_params(names) ⇒ Object
wrapper for void cv::StarDetector::getParams(vector_string names).
-
#get_string(name) ⇒ Object
wrapper for cv::String cv::StarDetector::getString(const cv::String name).
-
#initialize(ptr) ⇒ StarDetector
constructor
private
A new instance of StarDetector.
-
#param_help(name) ⇒ Object
wrapper for cv::String cv::StarDetector::paramHelp(const cv::String name).
-
#param_type(name) ⇒ Object
wrapper for int cv::StarDetector::paramType(const cv::String name).
-
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::StarDetector::setAlgorithm(const cv::String name, const Ptr_Algorithm value).
-
#set_bool(name, value) ⇒ Object
wrapper for void cv::StarDetector::setBool(const cv::String name, bool value).
-
#set_double(name, value) ⇒ Object
wrapper for void cv::StarDetector::setDouble(const cv::String name, double value).
-
#set_int(name, value) ⇒ Object
wrapper for void cv::StarDetector::setInt(const cv::String name, int value).
-
#set_mat(name, value) ⇒ Object
wrapper for void cv::StarDetector::setMat(const cv::String name, const cv::Mat value).
-
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::StarDetector::setMatVector(const cv::String name, const vector_Mat value).
-
#set_string(name, value) ⇒ Object
wrapper for void cv::StarDetector::setString(const cv::String name, const cv::String value).
Constructor Details
#initialize(ptr) ⇒ StarDetector
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 StarDetector.
9983 9984 9985 9986 9987 9988 9989 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9983 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? StarDetectorStruct ptr else StarDetectorStruct.new(FFI::AutoPointer.new(ptr,StarDetectorStruct.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.
9980 9981 9982 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9980 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
._create(name) ⇒ Object
wrapper for Ptr_Algorithm cv::StarDetector::_create(const cv::String name)
10154 10155 10156 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10154 def self._create(name) Rbind::cv_star_detector__create(name) end |
.create(detector_type) ⇒ Object
wrapper for Ptr_FeatureDetector cv::StarDetector::create(const cv::String detectorType)
10044 10045 10046 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10044 def self.create(detector_type) Rbind::cv_star_detector_create(detector_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
9975 9976 9977 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9975 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.get_list(algorithms) ⇒ Object
wrapper for void cv::StarDetector::getList(vector_string algorithms)
10149 10150 10151 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10149 def self.get_list(algorithms) Rbind::cv_star_detector_get_list(algorithms) end |
.new(*args) ⇒ Object
9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9932 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(StarDetectorStruct) raise ArgumentError, "too many arguments for creating #{self.name} from Pointer" unless args.size == 1 return super(args.first) end # wrapper for cv::StarDetector::StarDetector(int _maxSize=45, int _responseThreshold=30, int _lineThresholdProjected=10, int _lineThresholdBinarized=8, int _suppressNonmaxSize=5) @@cv_star_detector_star_detector_defaults0 ||= [45, 30, 10, 8, 5] if(args.size >= 0 && args.size <= 5) args.size.upto(4) do |i| args[i] = @@cv_star_detector_star_detector_defaults0[i] end begin return Rbind::cv_star_detector_star_detector(*args) rescue TypeError => e @error = e end 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.
9963 9964 9965 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9963 def self.rbind_from_native(ptr,context) StarDetector.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.
9954 9955 9956 9957 9958 9959 9960 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9954 def self.rbind_to_native(obj,context) if obj.is_a? StarDetector 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
9969 9970 9971 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9969 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
9994 9995 9996 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 9994 def __owner__? @__obj_ptr__[:bowner] end |
#detect(*args) ⇒ Object
methods wrapper for overloaded method detect
10008 10009 10010 10011 10012 10013 10014 10015 10016 10017 10018 10019 10020 10021 10022 10023 10024 10025 10026 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10008 def detect(*args) # wrapper for void cv::StarDetector::operator()(const cv::Mat image, vector_KeyPoint keypoints) @@cv_star_detector_detect_defaults0 ||= [nil, nil] if(args.size >= 2 && args.size <= 2) args.size.upto(1) do |i| args[i] = @@cv_star_detector_detect_defaults0[i] end begin return Rbind::cv_star_detector_detect(self,*args) rescue TypeError => e @error = e end end # wrapper for void cv::StarDetector::detect(const cv::Mat image, vector_KeyPoint keypoints, const cv::Mat mask=Mat()) @@cv_star_detector_detect1_defaults0 ||= [nil, nil, Cv::Mat.new()] if(args.size >= 2 && args.size <= 3) args.size.upto(2) do |i| args[i] = @@cv_star_detector_detect1_defaults0[i] end begin return Rbind::cv_star_detector_detect1(self,*args) rescue TypeError => e @error = e end end raise ArgumentError, "No overloaded signature fits to: #{args.map(&:class)}" end |
#empty ⇒ Object
wrapper for bool cv::StarDetector::empty()
10039 10040 10041 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10039 def empty() Rbind::cv_star_detector_empty( self) end |
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::StarDetector::getAlgorithm(const cv::String name)
10088 10089 10090 10091 10092 10093 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10088 def get_algorithm(name) result = Rbind::cv_star_detector_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::StarDetector::getBool(const cv::String name)
10059 10060 10061 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10059 def get_bool(name) Rbind::cv_star_detector_get_bool( self, name) end |
#get_double(name) ⇒ Object
wrapper for double cv::StarDetector::getDouble(const cv::String name)
10054 10055 10056 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10054 def get_double(name) Rbind::cv_star_detector_get_double( self, name) end |
#get_int(name) ⇒ Object
wrapper for int cv::StarDetector::getInt(const cv::String name)
10049 10050 10051 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10049 def get_int(name) Rbind::cv_star_detector_get_int( self, name) end |
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::StarDetector::getMat(const cv::String name)
10072 10073 10074 10075 10076 10077 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10072 def get_mat(name) result = Rbind::cv_star_detector_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::StarDetector::getMatVector(const cv::String name)
10080 10081 10082 10083 10084 10085 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10080 def get_mat_vector(name) result = Rbind::cv_star_detector_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::StarDetector::getParams(vector_string names)
10144 10145 10146 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10144 def get_params(names) Rbind::cv_star_detector_get_params( self, names) end |
#get_string(name) ⇒ Object
wrapper for cv::String cv::StarDetector::getString(const cv::String name)
10064 10065 10066 10067 10068 10069 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10064 def get_string(name) result = Rbind::cv_star_detector_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::StarDetector::paramHelp(const cv::String name)
10131 10132 10133 10134 10135 10136 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10131 def param_help(name) result = Rbind::cv_star_detector_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::StarDetector::paramType(const cv::String name)
10139 10140 10141 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10139 def param_type(name) Rbind::cv_star_detector_param_type( self, name) end |
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::StarDetector::setAlgorithm(const cv::String name, const Ptr_Algorithm value)
10126 10127 10128 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10126 def set_algorithm(name, value) Rbind::cv_star_detector_set_algorithm( self, name, value) end |
#set_bool(name, value) ⇒ Object
wrapper for void cv::StarDetector::setBool(const cv::String name, bool value)
10106 10107 10108 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10106 def set_bool(name, value) Rbind::cv_star_detector_set_bool( self, name, value) end |
#set_double(name, value) ⇒ Object
wrapper for void cv::StarDetector::setDouble(const cv::String name, double value)
10101 10102 10103 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10101 def set_double(name, value) Rbind::cv_star_detector_set_double( self, name, value) end |
#set_int(name, value) ⇒ Object
wrapper for void cv::StarDetector::setInt(const cv::String name, int value)
10096 10097 10098 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10096 def set_int(name, value) Rbind::cv_star_detector_set_int( self, name, value) end |
#set_mat(name, value) ⇒ Object
wrapper for void cv::StarDetector::setMat(const cv::String name, const cv::Mat value)
10116 10117 10118 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10116 def set_mat(name, value) Rbind::cv_star_detector_set_mat( self, name, value) end |
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::StarDetector::setMatVector(const cv::String name, const vector_Mat value)
10121 10122 10123 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10121 def set_mat_vector(name, value) Rbind::cv_star_detector_set_mat_vector( self, name, value) end |
#set_string(name, value) ⇒ Object
wrapper for void cv::StarDetector::setString(const cv::String name, const cv::String value)
10111 10112 10113 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 10111 def set_string(name, value) Rbind::cv_star_detector_set_string( self, name, value) end |