diff --git a/modules/gpu/perf/perf_labeling.cpp b/modules/gpu/perf/perf_labeling.cpp index 5417133095..2c537ebbeb 100644 --- a/modules/gpu/perf/perf_labeling.cpp +++ b/modules/gpu/perf/perf_labeling.cpp @@ -50,7 +50,7 @@ GPU_PERF_TEST(ConnectedComponents, cv::gpu::DeviceInfo, cv::Size) cv::Mat image = readImage("gpu/labeling/aloe-disp.png", cv::IMREAD_GRAYSCALE); - cv::threshold(image, image, 150, 255, CV_THRESH_BINARY); + // cv::threshold(image, image, 150, 255, CV_THRESH_BINARY); cv::gpu::GpuMat mask; mask.create(image.rows, image.cols, CV_8UC1); diff --git a/modules/gpu/perf_cpu/perf_labeling.cpp b/modules/gpu/perf_cpu/perf_labeling.cpp index 47d62839eb..ddf9c3d9bb 100644 --- a/modules/gpu/perf_cpu/perf_labeling.cpp +++ b/modules/gpu/perf_cpu/perf_labeling.cpp @@ -78,6 +78,7 @@ namespace { void operator() (cv::Mat labels) const { + labels.setTo(cv::Scalar::all(-1)); InInterval inInt(0, 2); int cc = -1;