Skip to content

Commit 15b1543

Browse files
committed
Add CV\Mat->clone() and fix medianBlur
1 parent 9810fd3 commit 15b1543

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

source/opencv2/core/opencv_mat.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -444,6 +444,7 @@ const zend_function_entry opencv_mat_methods[] = {
444444
PHP_ME(opencv_mat, empty, NULL, ZEND_ACC_PUBLIC)
445445
PHP_ME(opencv_mat, print, NULL, ZEND_ACC_PUBLIC)
446446
PHP_ME(opencv_mat, size, NULL, ZEND_ACC_PUBLIC)
447+
PHP_ME(opencv_mat, clone, NULL, ZEND_ACC_PUBLIC)
447448
PHP_ME(opencv_mat, zeros, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
448449
PHP_MALIAS(opencv_mat, zerosBySize ,zeros_by_size, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
449450
PHP_MALIAS(opencv_mat, isContinuous ,is_continuous, NULL, ZEND_ACC_PUBLIC)

source/opencv2/opencv_imgproc.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ PHP_FUNCTION(opencv_bilateral_filter){
446446
double sigma_color, sigma_space;
447447
opencv_mat_object *dst_object;
448448

449-
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ozlddl",
449+
if (zend_parse_parameters(ZEND_NUM_ARGS(), "Ozldd|l",
450450
&src_zval, opencv_mat_ce,
451451
&dst_zval, &d, &sigma_color,
452452
&sigma_space, &border_type) == FAILURE) {
@@ -467,7 +467,7 @@ PHP_FUNCTION(opencv_bilateral_filter){
467467
dst_object = Z_PHP_MAT_OBJ_P(dst_real_zval);
468468
dst_object->mat = new Mat(dst);
469469
}
470-
bilateralFilter(*src_object->mat, *dst_object->mat, (int)d, sigma_color, sigma_space, border_type);
470+
bilateralFilter(*src_object->mat, *dst_object->mat, (int)d, sigma_color, sigma_space, (int)border_type);
471471
RETURN_NULL();
472472
}
473473

0 commit comments

Comments
 (0)