Skip to content

Commit a59dea7

Browse files
committed
debug
1 parent 5a2cb15 commit a59dea7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

source/opencv2/opencv_imgproc.cc

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ PHP_FUNCTION(opencv_circle){
125125
*/
126126
PHP_FUNCTION(opencv_fill_poly){
127127

128-
long ncontours = 1, lineType = LINE_8, shift = 0;
128+
long lineType = LINE_8, shift = 0;
129129
zval *img_zval, *color_zval, *offset_point_zval = NULL;
130130
zval *points_zval;
131131
opencv_point_object *offset_object;
@@ -138,6 +138,7 @@ PHP_FUNCTION(opencv_fill_poly){
138138
RETURN_NULL();
139139
}
140140

141+
long ncontours = 1;
141142
unsigned long point_count = zend_hash_num_elements(Z_ARRVAL_P(points_zval));
142143
Point root_points[ncontours][point_count];
143144
opencv_point_object *point_object;
@@ -157,7 +158,8 @@ PHP_FUNCTION(opencv_fill_poly){
157158
}
158159
}ZEND_HASH_FOREACH_END();
159160

160-
const Point* pts[ncontours] = {root_points[0]};
161+
const Point* pts[ncontours];
162+
pts[0] = root_points[0];
161163
int npts[] = {(int)point_count};
162164
Point offset;
163165
zval *offset_point_real_zval;
@@ -671,8 +673,7 @@ PHP_FUNCTION(opencv_threshold){
671673
dst_object = Z_PHP_MAT_OBJ_P(dst_real_zval);
672674
dst_object->mat = new Mat(dst);
673675
}
674-
threshold(*src_object->mat, *dst_object->mat, thresh, maxval, (int)type);
675-
676+
RETURN_DOUBLE(threshold(*src_object->mat, *dst_object->mat, thresh, maxval, (int)type));
676677
}
677678

678679
/**

0 commit comments

Comments
 (0)