diff --git a/modules/imgproc/test/test_imgwarp_strict.cpp b/modules/imgproc/test/test_imgwarp_strict.cpp index 673c6f03e6..bec1d8a05e 100644 --- a/modules/imgproc/test/test_imgwarp_strict.cpp +++ b/modules/imgproc/test/test_imgwarp_strict.cpp @@ -1079,6 +1079,10 @@ void CV_WarpAffine_Test::generate_test_data() // warp_matrix is inverse if (rng.uniform(0., 1.) > 0) interpolation |= cv::WARP_INVERSE_MAP; + + // base sets only REPLICATE and REFLECT while want to test TRANSPARENT as well + static const int borderTypes[] = { BORDER_REPLICATE, BORDER_REFLECT, BORDER_TRANSPARENT }; + borderType = borderTypes[rng.uniform(0, sizeof(borderTypes) / sizeof(borderTypes[0]))]; } void CV_WarpAffine_Test::run_func() @@ -1201,6 +1205,10 @@ void CV_WarpPerspective_Test::generate_test_data() static const int depths[] = { CV_32F, CV_64F }; int depth = depths[rng.uniform(0, 2)]; M.clone().convertTo(M, depth); + + // base sets only REPLICATE and REFLECT while want to test TRANSPARENT as well + static const int borderTypes[] = { BORDER_REPLICATE, BORDER_REFLECT, BORDER_TRANSPARENT }; + borderType = borderTypes[rng.uniform(0, sizeof(borderTypes) / sizeof(borderTypes[0]))]; } void CV_WarpPerspective_Test::run_func()