Commit 905b362f authored by Alexander Alekhin's avatar Alexander Alekhin

ximgproc: eliminate per-pixel manual loop

fixes warning on MacOSX Xcode 8.3.3
parent 54d65f9d
......@@ -163,14 +163,7 @@ namespace cv {
for (int r = 0; r < nb_segs; r++) {
// Generate mask
Mat mask = Mat(img.rows, img.cols, CV_8UC1);
int* regions_data = (int*)regions.data;
char* mask_data = (char*)mask.data;
for (unsigned int x = 0; x < regions.total(); x++) {
mask_data[x] = regions_data[x] == r ? 255 : 0;
}
Mat mask = regions == r;
// Compute histogram for each channels
float tt = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment