EXPECT_LE(cvtest::norm(dst, expected, NORM_INF), 2);
}
+TEST(Imgproc_Filter2D, dftFilter2d_regression_13179)
+{
+ uchar src_[24*24] = {
+ 0, 40, 0, 0, 255, 0, 0, 78, 131, 0, 196, 0, 255, 0, 0, 0, 0, 255, 70, 0, 255, 0, 0, 0,
+ 0, 0, 255, 204, 0, 0, 255, 93, 255, 0, 0, 255, 12, 0, 0, 0, 255, 121, 0, 255, 0, 0, 0, 255,
+ 0, 178, 0, 25, 67, 0, 165, 0, 255, 0, 0, 181, 151, 175, 0, 0, 32, 0, 0, 255, 165, 93, 0, 255,
+ 255, 255, 0, 0, 255, 126, 0, 0, 0, 0, 133, 29, 9, 0, 220, 255, 0, 142, 255, 255, 255, 0, 255, 0,
+ 255, 32, 255, 0, 13, 237, 0, 0, 0, 0, 0, 19, 90, 0, 0, 85, 122, 62, 95, 29, 255, 20, 0, 0,
+ 0, 0, 166, 41, 0, 48, 70, 0, 68, 0, 255, 0, 139, 7, 63, 144, 0, 204, 0, 0, 0, 98, 114, 255,
+ 105, 0, 0, 0, 0, 255, 91, 0, 73, 0, 255, 0, 0, 0, 255, 198, 21, 0, 0, 0, 255, 43, 153, 128,
+ 0, 98, 26, 0, 101, 0, 0, 0, 255, 0, 0, 0, 255, 77, 56, 0, 241, 0, 169, 132, 0, 255, 186, 255,
+ 255, 87, 0, 1, 0, 0, 10, 39, 120, 0, 23, 69, 207, 0, 0, 0, 0, 84, 0, 0, 0, 0, 255, 0,
+ 255, 0, 0, 136, 255, 77, 247, 0, 67, 0, 15, 255, 0, 143, 0, 243, 255, 0, 0, 238, 255, 0, 255, 8,
+ 42, 0, 0, 255, 29, 0, 0, 0, 255, 255, 255, 75, 0, 0, 0, 255, 0, 0, 255, 38, 197, 0, 255, 87,
+ 0, 123, 17, 0, 234, 0, 0, 149, 0, 0, 255, 16, 0, 0, 0, 255, 0, 255, 0, 38, 0, 114, 255, 76,
+ 0, 0, 8, 0, 255, 0, 0, 0, 220, 0, 11, 255, 0, 0, 55, 98, 0, 0, 0, 255, 0, 175, 255, 110,
+ 235, 0, 175, 0, 255, 227, 38, 206, 0, 0, 255, 246, 0, 0, 123, 183, 255, 0, 0, 255, 0, 156, 0, 54,
+ 0, 255, 0, 202, 0, 0, 0, 0, 157, 0, 255, 63, 0, 0, 0, 0, 0, 255, 132, 0, 255, 0, 0, 0,
+ 0, 0, 0, 255, 0, 0, 128, 126, 0, 243, 46, 7, 0, 211, 108, 166, 0, 0, 162, 227, 0, 204, 0, 51,
+ 255, 216, 0, 0, 43, 0, 255, 40, 188, 188, 255, 0, 0, 255, 34, 0, 0, 168, 0, 0, 0, 35, 0, 0,
+ 0, 80, 131, 255, 0, 255, 10, 0, 0, 0, 180, 255, 209, 255, 173, 34, 0, 66, 0, 49, 0, 255, 83, 0,
+ 0, 204, 0, 91, 0, 0, 0, 205, 84, 0, 0, 0, 92, 255, 91, 0, 126, 0, 185, 145, 0, 0, 9, 0,
+ 255, 0, 0, 255, 255, 0, 0, 255, 0, 0, 216, 0, 187, 221, 0, 0, 141, 0, 0, 209, 0, 0, 255, 0,
+ 255, 0, 0, 154, 150, 0, 0, 0, 148, 0, 201, 255, 0, 255, 16, 0, 0, 160, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 255, 0, 255, 0, 255, 0, 255, 198, 255, 147, 131, 0, 255, 202, 0, 0, 0, 0, 255, 0,
+ 0, 0, 0, 164, 181, 0, 0, 0, 69, 255, 31, 0, 255, 195, 0, 0, 255, 164, 109, 0, 0, 202, 0, 206,
+ 0, 0, 61, 235, 33, 255, 77, 0, 0, 0, 0, 85, 0, 228, 0, 0, 0, 0, 255, 0, 0, 5, 255, 255
+ };
+ cv::Mat_<uchar> src(24, 24, src_);
+
+ uchar expected_[16*16] = {
+ 0,255, 0, 0,255, 0, 0,255, 0, 0,255,255, 0,255, 0, 0,
+ 0,255, 0, 0,255, 0, 0,255, 0, 0,255,255, 0,255, 0, 0,
+ 0,255, 0, 0,255, 0, 0,255, 70, 0,255,255, 0,255, 0, 0,
+ 0,234,138, 0,255, 0, 0,255, 8, 0,255,255, 0,255, 0, 0,
+ 0, 0,255, 0,255,228, 0,255,255, 0,255,255, 0,255, 0, 5,
+ 0, 0,255, 0,255, 0, 0,255, 0, 0,255,255, 0,255, 0, 0,
+ 0,253, 0, 0,255, 0, 0,255, 0, 0,255,255, 0,255, 0, 0,
+ 0,255, 0, 0,255, 0, 0,255, 0, 0,255, 93, 0,255, 0,255,
+ 0,255, 0, 0,255, 0,182,255, 0, 0,255, 0, 0,255, 0, 0,
+ 0, 0,253, 0,228, 0,255,255, 0, 0,255, 0, 0, 0, 0, 75,
+ 0, 0,255, 0, 0, 0,255,255, 0,255,206, 0, 1,162, 0,255,
+ 0, 0,255, 0, 0, 0,255,255, 0,255,255, 0, 0,255, 0,255,
+ 0, 0,255, 0, 0, 0,255,255, 0,255,255, 0,255,255, 0,255,
+ 0, 0,255,255, 0, 0,255, 0, 0,255,255, 0,255,168, 0,255,
+ 0, 0,255,255, 0, 0,255, 26, 0,255,255, 0,255,255, 0,255,
+ 0, 0,255,255, 0, 0,255, 0, 0,255,255, 0,255,255, 0,255,
+ };
+ cv::Mat_<uchar> expected(16, 16, expected_);
+
+ cv::Mat kernel = cv::getGaborKernel(cv::Size(13, 13), 8, 0, 3, 0.25);
+
+ cv::Mat roi(src, cv::Rect(0, 0, 16, 16));
+
+ cv::Mat filtered(16, 16, roi.type());
+
+ cv::filter2D(roi, filtered, -1, kernel);
+
+ EXPECT_LE(cvtest::norm(filtered, expected, cv::NORM_INF), 2);
+}
+
TEST(Imgproc_MedianBlur, hires_regression_13409)
{
Mat src(2048, 2048, CV_8UC1), dst_hires, dst_ref;