mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
Merge pull request #3824 from CodeLinaro:FastcvHAL_1stPost
Depends on https://github.com/opencv/opencv/pull/26316 ### 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
This commit is contained in:
42
modules/fastcv/perf/perf_fast10.cpp
Normal file
42
modules/fastcv/perf/perf_fast10.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include "perf_precomp.hpp"
|
||||
|
||||
namespace opencv_test {
|
||||
|
||||
typedef std::tuple<bool /*useScores*/, int /*barrier*/, int /*border*/, bool /*nmsEnabled*/> FAST10PerfParams;
|
||||
typedef perf::TestBaseWithParam<FAST10PerfParams> FAST10PerfTest;
|
||||
|
||||
PERF_TEST_P(FAST10PerfTest, run,
|
||||
::testing::Combine(::testing::Bool(), // useScores
|
||||
::testing::Values(10, 30, 50), // barrier
|
||||
::testing::Values( 4, 10, 32), // border
|
||||
::testing::Bool() // nonmax suppression
|
||||
)
|
||||
)
|
||||
{
|
||||
auto p = GetParam();
|
||||
bool useScores = std::get<0>(p);
|
||||
int barrier = std::get<1>(p);
|
||||
int border = std::get<2>(p);
|
||||
bool nmsEnabled = std::get<3>(p);
|
||||
|
||||
cv::Mat src = imread(cvtest::findDataFile("cv/shared/baboon.png"), cv::IMREAD_GRAYSCALE);
|
||||
|
||||
std::vector<int> coords, scores;
|
||||
while(next())
|
||||
{
|
||||
coords.clear();
|
||||
scores.clear();
|
||||
startTimer();
|
||||
cv::fastcv::FAST10(src, noArray(), coords, useScores ? scores : noArray(), barrier, border, nmsEnabled);
|
||||
stopTimer();
|
||||
}
|
||||
|
||||
SANITY_CHECK_NOTHING();
|
||||
}
|
||||
|
||||
} // namespace
|
Reference in New Issue
Block a user