You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ximgproc/src/deriche_filter.cpp
+31-13Lines changed: 31 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -135,6 +135,7 @@ HorizontalIIRFilter(Mat &img, Mat &dst, const Range &r, double alphaDerive)
135
135
j = cols - 1;
136
136
g2[j] = (a3 + a4)* *c1;
137
137
j--;
138
+
c1--;
138
139
g2[j] = (a3 + a4) * c1[1] + b1 * g2[j + 1];
139
140
j--;
140
141
c1--;
@@ -160,16 +161,18 @@ class ParallelGradientDericheYCols : public ParallelLoopBody
160
161
dst(d),
161
162
alphaDerive(ald),
162
163
verbose(false)
163
-
{}
164
+
{
165
+
int type = img.depth();
166
+
CV_CheckType(type, type == CV_8UC1 || type == CV_8SC1 || type == CV_16SC1 || type == CV_16UC1 || type == CV_32FC1, "Wrong input type for GradientDericheYCols");
167
+
type = dst.depth();
168
+
CV_CheckType(type, type==CV_32FC1, "Wrong output type for GradientDericheYCols");
@@ -355,12 +367,15 @@ class ParallelGradientDericheXRows : public ParallelLoopBody
355
367
dst(d),
356
368
alphaDerive(ald),
357
369
verbose(false)
358
-
{}
370
+
{
371
+
int type = img.depth();
372
+
CV_CheckType(type, type == CV_8UC1 || type == CV_8SC1 || type == CV_16SC1 || type == CV_16UC1 || type == CV_32FC1, "Wrong input type for GradientDericheXRows");
373
+
type = dst.depth();
374
+
CV_CheckType(type, type == CV_32FC1, "Wrong output type for GradientDericheXRows");
Copy file name to clipboardExpand all lines: modules/ximgproc/src/paillou_filter.cpp
+32-10Lines changed: 32 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -143,12 +143,15 @@ class ParallelGradientPaillouYCols: public ParallelLoopBody
143
143
a(aa),
144
144
w(ww),
145
145
verbose(false)
146
-
{}
146
+
{
147
+
int type = img.depth();
148
+
CV_CheckType(type, type == CV_8UC1 || type == CV_8SC1 || type == CV_16SC1 || type == CV_16UC1 || type == CV_32FC1, "Wrong input type for GradientPaillouY");
149
+
type = dst.depth();
150
+
CV_CheckType(type, type == CV_32FC1, "Wrong output type for GradientPaillouYCols");
@@ -331,7 +345,12 @@ class ParallelGradientPaillouXRows: public ParallelLoopBody
331
345
a(aa),
332
346
w(ww),
333
347
verbose(false)
334
-
{}
348
+
{
349
+
int type = img.depth();
350
+
CV_CheckType(type, type == CV_8UC1 || type == CV_8SC1 || type == CV_16SC1 || type == CV_16UC1 || type == CV_32FC1, "Wrong input type for GradientPaillouXRows");
351
+
type = im1.depth();
352
+
CV_CheckType(type, type == CV_32FC1, "Wrong output type for GradientPaillouXRows");
0 commit comments