Class: OpenCV::Cv::FaceRecognizer
- Inherits:
-
Object
- Object
- OpenCV::Cv::FaceRecognizer
- 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::FaceRecognizer::_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::FaceRecognizer::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.
-
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FaceRecognizer::getAlgorithm(const cv::String name).
-
#get_bool(name) ⇒ Object
wrapper for bool cv::FaceRecognizer::getBool(const cv::String name).
-
#get_double(name) ⇒ Object
wrapper for double cv::FaceRecognizer::getDouble(const cv::String name).
-
#get_int(name) ⇒ Object
wrapper for int cv::FaceRecognizer::getInt(const cv::String name).
-
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::FaceRecognizer::getMat(const cv::String name).
-
#get_mat_vector(name) ⇒ Object
wrapper for vector_Mat cv::FaceRecognizer::getMatVector(const cv::String name).
-
#get_params(names) ⇒ Object
wrapper for void cv::FaceRecognizer::getParams(vector_string names).
-
#get_string(name) ⇒ Object
wrapper for cv::String cv::FaceRecognizer::getString(const cv::String name).
-
#initialize(ptr) ⇒ FaceRecognizer
constructor
private
A new instance of FaceRecognizer.
-
#load(filename) ⇒ Object
wrapper for void cv::FaceRecognizer::load(const cv::String filename).
-
#param_help(name) ⇒ Object
wrapper for cv::String cv::FaceRecognizer::paramHelp(const cv::String name).
-
#param_type(name) ⇒ Object
wrapper for int cv::FaceRecognizer::paramType(const cv::String name).
-
#predict(src, label, confidence) ⇒ Object
wrapper for void cv::FaceRecognizer::predict(const cv::Mat src, int label, double confidence).
-
#save(filename) ⇒ Object
wrapper for void cv::FaceRecognizer::save(const cv::String filename).
-
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setAlgorithm(const cv::String name, const Ptr_Algorithm value).
-
#set_bool(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setBool(const cv::String name, bool value).
-
#set_double(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setDouble(const cv::String name, double value).
-
#set_int(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setInt(const cv::String name, int value).
-
#set_mat(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setMat(const cv::String name, const cv::Mat value).
-
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setMatVector(const cv::String name, const vector_Mat value).
-
#set_string(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setString(const cv::String name, const cv::String value).
-
#train(src, labels) ⇒ Object
methods wrapper for void cv::FaceRecognizer::train(const vector_Mat src, const cv::Mat labels).
-
#update(src, labels) ⇒ Object
wrapper for void cv::FaceRecognizer::update(const vector_Mat src, const cv::Mat labels).
Constructor Details
#initialize(ptr) ⇒ FaceRecognizer
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 FaceRecognizer.
14150 14151 14152 14153 14154 14155 14156 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14150 def initialize(ptr) @__obj_ptr__ = if ptr.is_a? FaceRecognizerStruct ptr else FaceRecognizerStruct.new(FFI::AutoPointer.new(ptr,FaceRecognizerStruct.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.
14147 14148 14149 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14147 def __obj_ptr__ @__obj_ptr__ end |
Class Method Details
._create(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FaceRecognizer::_create(const cv::String name)
14305 14306 14307 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14305 def self._create(name) Rbind::cv_face_recognizer__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
14142 14143 14144 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14142 def self.from_native(ptr,context) rbind_from_native(ptr,context) end |
.get_list(algorithms) ⇒ Object
wrapper for void cv::FaceRecognizer::getList(vector_string algorithms)
14300 14301 14302 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14300 def self.get_list(algorithms) Rbind::cv_face_recognizer_get_list(algorithms) end |
.new(*args) ⇒ Object
14111 14112 14113 14114 14115 14116 14117 14118 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14111 def self.new(*args) if args.first.is_a?(FFI::Pointer) || args.first.is_a?(FaceRecognizerStruct) 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.
14130 14131 14132 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14130 def self.rbind_from_native(ptr,context) FaceRecognizer.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.
14121 14122 14123 14124 14125 14126 14127 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14121 def self.rbind_to_native(obj,context) if obj.is_a? FaceRecognizer 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
14136 14137 14138 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14136 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
14161 14162 14163 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14161 def __owner__? @__obj_ptr__[:bowner] end |
#get_algorithm(name) ⇒ Object
wrapper for Ptr_Algorithm cv::FaceRecognizer::getAlgorithm(const cv::String name)
14239 14240 14241 14242 14243 14244 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14239 def get_algorithm(name) result = Rbind::cv_face_recognizer_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::FaceRecognizer::getBool(const cv::String name)
14210 14211 14212 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14210 def get_bool(name) Rbind::cv_face_recognizer_get_bool( self, name) end |
#get_double(name) ⇒ Object
wrapper for double cv::FaceRecognizer::getDouble(const cv::String name)
14205 14206 14207 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14205 def get_double(name) Rbind::cv_face_recognizer_get_double( self, name) end |
#get_int(name) ⇒ Object
wrapper for int cv::FaceRecognizer::getInt(const cv::String name)
14200 14201 14202 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14200 def get_int(name) Rbind::cv_face_recognizer_get_int( self, name) end |
#get_mat(name) ⇒ Object
wrapper for cv::Mat cv::FaceRecognizer::getMat(const cv::String name)
14223 14224 14225 14226 14227 14228 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14223 def get_mat(name) result = Rbind::cv_face_recognizer_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::FaceRecognizer::getMatVector(const cv::String name)
14231 14232 14233 14234 14235 14236 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14231 def get_mat_vector(name) result = Rbind::cv_face_recognizer_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::FaceRecognizer::getParams(vector_string names)
14295 14296 14297 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14295 def get_params(names) Rbind::cv_face_recognizer_get_params( self, names) end |
#get_string(name) ⇒ Object
wrapper for cv::String cv::FaceRecognizer::getString(const cv::String name)
14215 14216 14217 14218 14219 14220 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14215 def get_string(name) result = Rbind::cv_face_recognizer_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 |
#load(filename) ⇒ Object
wrapper for void cv::FaceRecognizer::load(const cv::String filename)
14195 14196 14197 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14195 def load(filename) Rbind::cv_face_recognizer_load( self, filename) end |
#param_help(name) ⇒ Object
wrapper for cv::String cv::FaceRecognizer::paramHelp(const cv::String name)
14282 14283 14284 14285 14286 14287 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14282 def param_help(name) result = Rbind::cv_face_recognizer_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::FaceRecognizer::paramType(const cv::String name)
14290 14291 14292 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14290 def param_type(name) Rbind::cv_face_recognizer_param_type( self, name) end |
#predict(src, label, confidence) ⇒ Object
wrapper for void cv::FaceRecognizer::predict(const cv::Mat src, int label, double confidence)
14185 14186 14187 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14185 def predict(src, label, confidence) Rbind::cv_face_recognizer_predict( self, src, label, confidence) end |
#save(filename) ⇒ Object
wrapper for void cv::FaceRecognizer::save(const cv::String filename)
14190 14191 14192 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14190 def save(filename) Rbind::cv_face_recognizer_save( self, filename) end |
#set_algorithm(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setAlgorithm(const cv::String name, const Ptr_Algorithm value)
14277 14278 14279 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14277 def set_algorithm(name, value) Rbind::cv_face_recognizer_set_algorithm( self, name, value) end |
#set_bool(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setBool(const cv::String name, bool value)
14257 14258 14259 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14257 def set_bool(name, value) Rbind::cv_face_recognizer_set_bool( self, name, value) end |
#set_double(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setDouble(const cv::String name, double value)
14252 14253 14254 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14252 def set_double(name, value) Rbind::cv_face_recognizer_set_double( self, name, value) end |
#set_int(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setInt(const cv::String name, int value)
14247 14248 14249 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14247 def set_int(name, value) Rbind::cv_face_recognizer_set_int( self, name, value) end |
#set_mat(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setMat(const cv::String name, const cv::Mat value)
14267 14268 14269 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14267 def set_mat(name, value) Rbind::cv_face_recognizer_set_mat( self, name, value) end |
#set_mat_vector(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setMatVector(const cv::String name, const vector_Mat value)
14272 14273 14274 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14272 def set_mat_vector(name, value) Rbind::cv_face_recognizer_set_mat_vector( self, name, value) end |
#set_string(name, value) ⇒ Object
wrapper for void cv::FaceRecognizer::setString(const cv::String name, const cv::String value)
14262 14263 14264 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14262 def set_string(name, value) Rbind::cv_face_recognizer_set_string( self, name, value) end |
#train(src, labels) ⇒ Object
methods wrapper for void cv::FaceRecognizer::train(const vector_Mat src, const cv::Mat labels)
14175 14176 14177 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14175 def train(src, labels) Rbind::cv_face_recognizer_train( self, src, labels) end |
#update(src, labels) ⇒ Object
wrapper for void cv::FaceRecognizer::update(const vector_Mat src, const cv::Mat labels)
14180 14181 14182 |
# File 'lib/ruby/ropencv/ropencv_types.rb', line 14180 def update(src, labels) Rbind::cv_face_recognizer_update( self, src, labels) end |