Skip to content

Commit b4c132b

Browse files
authored
Replacing Scalar::all(0) with (uchar)0
1 parent cab9c54 commit b4c132b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

modules/ximgproc/src/globalmatting.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ void GlobalMatting::erodeFB(cv::Mat_<uchar> &trimap, int r)
180180
int w = trimap.cols;
181181
int h = trimap.rows;
182182

183-
cv::Mat_<uchar> foreground(trimap.size(), cv::Scalar::all(0));
184-
cv::Mat_<uchar> background(trimap.size(), cv::Scalar::all(0));
183+
cv::Mat_<uchar> foreground(trimap.size(), (uchar)0);
184+
cv::Mat_<uchar> background(trimap.size(), (uchar)0);
185185

186186
for (int y = 0; y < h; ++y)
187187
for (int x = 0; x < w; ++x)
@@ -402,8 +402,8 @@ void GlobalMatting::erodeFB(cv::Mat &_trimap, int r)
402402
int w = trimap.cols;
403403
int h = trimap.rows;
404404

405-
cv::Mat_<uchar> foreground(trimap.size(), cv::Scalar::all(0));
406-
cv::Mat_<uchar> background(trimap.size(), cv::Scalar::all(0));
405+
cv::Mat_<uchar> foreground(trimap.size(), (uchar)0);
406+
cv::Mat_<uchar> background(trimap.size(), (uchar)0);
407407

408408
for (int y = 0; y < h; ++y)
409409
for (int x = 0; x < w; ++x)

0 commit comments

Comments
 (0)