Add test for issue #2646

pull/343/head
Andrey Kamaev 12 years ago
parent d83914d478
commit 7e92826efc
  1. 11
      modules/photo/test/test_denoising.cpp

@ -145,3 +145,14 @@ TEST(Photo_DenoisingColoredMulti, regression)
ASSERT_EQ(0, norm(result != expected));
}
TEST(Photo_White, issue_2646)
{
cv::Mat img(50, 50, CV_8UC1, cv::Scalar::all(255));
cv::Mat filtered;
cv::fastNlMeansDenoising(img, filtered);
int nonWhitePixelsCount = (int)img.total() - cv::countNonZero(filtered == img);
ASSERT_EQ(0, nonWhitePixelsCount);
}

Loading…
Cancel
Save