Merge pull request #25788 from asmorkalov:as/bilateralFilter_test

Extended bilateralFilter test to cover more branches
This commit is contained in:
Alexander Smorkalov 2024-06-20 10:27:15 +03:00 committed by GitHub
commit 57984e689b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 4 deletions

View File

@ -7,23 +7,25 @@ namespace opencv_test {
CV_ENUM(Mat_Type, CV_8UC1, CV_8UC3, CV_32FC1, CV_32FC3) CV_ENUM(Mat_Type, CV_8UC1, CV_8UC3, CV_32FC1, CV_32FC3)
typedef TestBaseWithParam< tuple<Size, int, Mat_Type> > TestBilateralFilter; typedef TestBaseWithParam< tuple<Size, int, Mat_Type, double> > TestBilateralFilter;
PERF_TEST_P( TestBilateralFilter, BilateralFilter, PERF_TEST_P( TestBilateralFilter, BilateralFilter,
Combine( Combine(
Values( szVGA, sz1080p ), // image size Values( szVGA, sz1080p ), // image size
Values( 3, 5 ), // d Values( 3, 5 ), // d
Mat_Type::all() // image type Mat_Type::all(), // image type
Values(1., 5.)
) )
) )
{ {
Size sz; Size sz;
int d, type; int d, type;
const double sigmaColor = 1., sigmaSpace = 1.; double sigmaColor, sigmaSpace;
sz = get<0>(GetParam()); sz = get<0>(GetParam());
d = get<1>(GetParam()); d = get<1>(GetParam());
type = get<2>(GetParam()); type = get<2>(GetParam());
sigmaColor = sigmaSpace = get<3>(GetParam());
Mat src(sz, type); Mat src(sz, type);
Mat dst(sz, type); Mat dst(sz, type);

View File

@ -243,7 +243,7 @@ namespace opencv_test { namespace {
rng.fill(_src, RNG::UNIFORM, 0, 256); rng.fill(_src, RNG::UNIFORM, 0, 256);
_sigma_color = _sigma_space = 1.; _sigma_color = _sigma_space = rng.uniform(0., 10.);
return 1; return 1;
} }