Skip to content

Commit e7a4372

Browse files
committed
Merge pull request #1326 from alalek:fix_macos_warning
2 parents 54d65f9 + 905b362 commit e7a4372

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

modules/ximgproc/src/selectivesearchsegmentation.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,7 @@ namespace cv {
163163
for (int r = 0; r < nb_segs; r++) {
164164

165165
// Generate mask
166-
Mat mask = Mat(img.rows, img.cols, CV_8UC1);
167-
168-
int* regions_data = (int*)regions.data;
169-
char* mask_data = (char*)mask.data;
170-
171-
for (unsigned int x = 0; x < regions.total(); x++) {
172-
mask_data[x] = regions_data[x] == r ? 255 : 0;
173-
}
166+
Mat mask = regions == r;
174167

175168
// Compute histogram for each channels
176169
float tt = 0;

0 commit comments

Comments
 (0)