mirror of
https://github.com/ruby-opencv/ruby-opencv
synced 2023-03-27 23:22:12 -04:00
add Algorithm class and modify FaceRecognizer to inherit it
This commit is contained in:
parent
70d10febd2
commit
2e63bbd856
6 changed files with 345 additions and 1 deletions
|
@ -138,7 +138,7 @@ define_ruby_class()
|
|||
* note: this comment is used by rdoc.
|
||||
*/
|
||||
VALUE opencv = rb_module_opencv();
|
||||
rb_klass = rb_define_class_under(opencv, "FaceRecognizer", rb_cObject);
|
||||
rb_klass = rb_define_class_under(opencv, "FaceRecognizer", cAlgorithm::rb_class());
|
||||
rb_define_method(rb_klass, "train", RUBY_METHOD_FUNC(rb_train), 2);
|
||||
rb_define_method(rb_klass, "predict", RUBY_METHOD_FUNC(rb_predict), 1);
|
||||
rb_define_method(rb_klass, "save", RUBY_METHOD_FUNC(rb_save), 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue