Skip to content

Commit d57eba3

Browse files
committed
DecompTypes
1 parent 97fd501 commit d57eba3

File tree

4 files changed

+13
-1
lines changed

4 files changed

+13
-1
lines changed

opencv.cc

+1
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ PHP_MINIT_FUNCTION(opencv)
143143
opencv_imgproc_init(module_number);
144144
opencv_core_init(module_number);
145145
opencv_border_types_init(module_number);
146+
opencv_decomp_types_init(module_number);
146147
opencv_file_storage_init(module_number);
147148
opencv_objdetect_init(module_number);
148149
opencv_videoio_init(module_number);

source/opencv2/core/opencv_base.cc

+10
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,13 @@ void opencv_border_types_init(int module_number){
3535
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "BORDER_DEFAULT", BorderTypes::BORDER_DEFAULT, CONST_CS | CONST_PERSISTENT);
3636
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "BORDER_ISOLATED", BorderTypes::BORDER_ISOLATED, CONST_CS | CONST_PERSISTENT);
3737
}
38+
39+
void opencv_decomp_types_init(int module_number){
40+
41+
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "DECOMP_LU", DecompTypes::DECOMP_LU, CONST_CS | CONST_PERSISTENT);
42+
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "DECOMP_SVD", DecompTypes::DECOMP_SVD, CONST_CS | CONST_PERSISTENT);
43+
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "DECOMP_EIG", DecompTypes::DECOMP_EIG, CONST_CS | CONST_PERSISTENT);
44+
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "DECOMP_CHOLESKY", DecompTypes::DECOMP_CHOLESKY, CONST_CS | CONST_PERSISTENT);
45+
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "DECOMP_QR", DecompTypes::DECOMP_QR, CONST_CS | CONST_PERSISTENT);
46+
REGISTER_NS_LONG_CONSTANT(OPENCV_NS, "DECOMP_NORMAL", DecompTypes::DECOMP_NORMAL, CONST_CS | CONST_PERSISTENT);
47+
}

source/opencv2/core/opencv_base.h

+1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@
1818
#define PHP_OPENCV_BASE_H
1919

2020
extern void opencv_border_types_init(int module_number);
21+
extern void opencv_decomp_types_init(int module_number);
2122
#endif //OPENCV_BASE_H

source/opencv2/opencv_imgproc.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ PHP_FUNCTION(opencv_get_perspective_transform){
15121512
ZEND_HASH_FOREACH_END();
15131513

15141514
try {
1515-
Mat mat = getPerspectiveTransform(src_points, dst_points);
1515+
Mat mat = getPerspectiveTransform(src_points, dst_points, (int)solveMethod);
15161516
zval instance;
15171517
object_init_ex(&instance, opencv_mat_ce);
15181518
opencv_mat_object *instance_object = Z_PHP_MAT_OBJ_P(&instance);

0 commit comments

Comments
 (0)