Skip to content

Commit 4f46a4f

Browse files
committed
CV\BaseFaceRecognizer
1 parent 4015c0c commit 4f46a4f

File tree

3 files changed

+38
-0
lines changed

3 files changed

+38
-0
lines changed

source/opencv2/face/opencv_facerec.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ zend_object_handlers opencv_lbph_face_recognizer_object_handlers;
2424

2525
zend_class_entry *opencv_lbph_face_recognizer_ce;
2626

27+
zend_class_entry *opencv_base_face_recognizer_ce;
28+
2729
PHP_METHOD(opencv_lbph_face_recognizer, create)
2830
{
2931
zval instance;
@@ -145,4 +147,24 @@ extern void opencv_lbph_face_recognizer_init(int module_number){
145147
zend_get_std_object_handlers(), sizeof(zend_object_handlers));
146148
opencv_lbph_face_recognizer_object_handlers.clone_obj = NULL;
147149
opencv_lbph_face_recognizer_object_handlers.free_obj = opencv_lbph_face_recognizer_free_obj;
150+
}
151+
152+
/**
153+
* -----------------------------------【CV\BaseFaceRecognizer】--------------------------------------
154+
*
155+
* -------------------------------------------------------------------------------------
156+
*/
157+
158+
/**
159+
* opencv_lbph_face_recognizer_methods[]
160+
*/
161+
const zend_function_entry opencv_base_face_recognizer_methods[] = {
162+
PHP_FE_END
163+
};
164+
/* }}} */
165+
166+
void opencv_base_face_recognizer_init(int module_number){
167+
zend_class_entry ce;
168+
INIT_NS_CLASS_ENTRY(ce,OPENCV_FACE_NS, "BaseFaceRecognizer", opencv_base_face_recognizer_methods);
169+
opencv_base_face_recognizer_ce = zend_register_internal_class_ex(&ce, opencv_face_recognizer_ce);
148170
}

source/opencv2/face/opencv_facerec.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@
2323
#include <opencv2/face.hpp>
2424
using namespace cv::face;
2525

26+
27+
/**
28+
* -----------------------------------【CV\LBPHFaceRecognizer】-------------------------
29+
*
30+
* -------------------------------------------------------------------------------------
31+
*/
2632
extern void opencv_lbph_face_recognizer_init(int module_number);
2733

2834
#define Z_PHP_LBPH_FACE_RECOGNIZER_OBJ_P(zv) get_lbph_face_recognizer_obj(Z_OBJ_P(zv))
@@ -41,4 +47,13 @@ static inline opencv_lbph_face_recognizer_object* get_lbph_face_recognizer_obj(z
4147
return (opencv_lbph_face_recognizer_object*)((char*)(obj) - XtOffsetOf(opencv_lbph_face_recognizer_object, std));
4248
}
4349

50+
51+
/**
52+
* -----------------------------------【CV\BaseFaceRecognizer】-------------------------
53+
*
54+
* -------------------------------------------------------------------------------------
55+
*/
56+
extern void opencv_base_face_recognizer_init(int module_number);
57+
58+
4459
#endif //PHP_OPENCV_FACEREC_H

source/opencv2/opencv_face.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ void opencv_face_recognizer_init(int module_number){
3737
void opencv_face_init(int module_number){
3838
opencv_face_recognizer_init(module_number);
3939
opencv_lbph_face_recognizer_init(module_number);
40+
opencv_base_face_recognizer_init(module_number);
4041
}

0 commit comments

Comments
 (0)