1
0
mirror of https://github.com/opencv/opencv_contrib.git synced 2025-10-16 22:35:51 +08:00
Files
opencv_contrib/modules/fastcv/test/test_bilateral.cpp
adsha-quic a00b3f3296 Merge pull request #3845 from CodeLinaro:adsha_2ndPost
FastCV Extension code for OpenCV 2ndpost-2 #3845

### Description:
- Add support for cv::fastcv::calcHist

Depends on: [opencv/opencv_contrib#3844](https://github.com/opencv/opencv_contrib/pull/3844)
Depends on: [opencv/opencv#26619](https://github.com/opencv/opencv/pull/26619)
Requires binary from: [opencv/opencv_3rdparty#90](https://github.com/opencv/opencv_3rdparty/pull/90)

### Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

- [x] I agree to contribute to the project under Apache 2 License.
- [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
- [ ] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [ ] The feature is well documented and sample code can be built with the project CMake
2024-12-23 10:11:45 +03:00

39 lines
970 B
C++

/*
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
* SPDX-License-Identifier: Apache-2.0
*/
#include "test_precomp.hpp"
namespace opencv_test { namespace {
typedef testing::TestWithParam<tuple<cv::Size,int,int>> fcv_bilateralFilterTest;
TEST_P(fcv_bilateralFilterTest, accuracy)
{
cv::Size size = get<0>(GetParam());
int d = get<1>(GetParam());
double sigmaColor = get<2>(GetParam());
double sigmaSpace = sigmaColor;
RNG& rng = cv::theRNG();
Mat src(size, CV_8UC1);
cvtest::randUni(rng, src, Scalar::all(0), Scalar::all(255));
cv::Mat dst;
cv::fastcv::bilateralFilter(src, dst, d, sigmaColor, sigmaSpace);
EXPECT_FALSE(dst.empty());
}
INSTANTIATE_TEST_CASE_P(/*nothing*/, fcv_bilateralFilterTest, Combine(
::testing::Values(Size(8, 8), Size(640, 480), Size(800, 600)),
::testing::Values(5, 7, 9),
::testing::Values(1., 10.)
));
}
}