1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #28879 from manand881:feat/akaze-ocl-performance

Feat: Add OpenCL support for AKAZE features #28879

Implement OpenCL-accelerated AKAZE feature
detection and descriptor extraction

Benchmarked on RTX 5060 Ti: 1.2x to 3.31x faster
for image sizes from 640x480 to 3840x2160

- Added 8 OpenCL kernels for feature detection and descriptor extraction
- Refactored compute_kcontrast to use OpenCV magnitude() for consistency
- Added comprehensive tests with >95% accuracy vs CPU baseline

### 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
- [x] The PR is proposed to the proper branch
- [ ] There is a reference to the original bug report and related work
- [x] There is accuracy test, performance test and test data in opencv_extra repository, if applicable
      Patch to opencv_extra has the same branch name.
- [x] The feature is well documented and sample code can be built with the project CMake
This commit is contained in:
Anand Mahesh
2026-05-06 13:44:47 +05:30
committed by GitHub
parent 847fca1056
commit ad50964f78
13 changed files with 2293 additions and 286 deletions
+2 -4
View File
@@ -9,8 +9,7 @@ namespace opencv_test { namespace {
TEST(Features2d_AKAZE, detect_and_compute_split)
{
Mat testImg(100, 100, CV_8U);
RNG rng(101);
rng.fill(testImg, RNG::UNIFORM, Scalar(0), Scalar(255), true);
theRNG().fill(testImg, RNG::UNIFORM, Scalar(0), Scalar(255), true);
Ptr<Feature2D> ext = AKAZE::create(AKAZE::DESCRIPTOR_MLDB, 0, 3, 0.001f, 1, 1, KAZE::DIFF_PM_G2);
vector<KeyPoint> detAndCompKps;
@@ -49,8 +48,7 @@ TEST(Features2d_AKAZE, uninitialized_and_nans)
TEST(Features2d_KAZE, diffusivity_charbonnier)
{
Mat testImg(200, 200, CV_8U);
RNG rng(42);
rng.fill(testImg, RNG::UNIFORM, Scalar(0), Scalar(255), true);
theRNG().fill(testImg, RNG::UNIFORM, Scalar(0), Scalar(255), true);
// KAZE with DIFF_CHARBONNIER
Ptr<KAZE> kaze_charbonnier = KAZE::create(false, false, 0.001f, 4, 4, KAZE::DIFF_CHARBONNIER);