Minimize usages of legacy C API inside the library
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
#include <opencv2/gpu.hpp>
|
||||
#include <opencv2/highgui.hpp>
|
||||
#include <opencv2/video.hpp>
|
||||
#include <opencv2/legacy.hpp>
|
||||
#include <opencv2/ts.hpp>
|
||||
|
||||
static void printOsInfo()
|
||||
|
@@ -1305,7 +1305,9 @@ PERF_TEST_P(Sz_3Depth, Core_AddWeighted,
|
||||
// GEMM
|
||||
|
||||
CV_FLAGS(GemmFlags, 0, cv::GEMM_1_T, cv::GEMM_2_T, cv::GEMM_3_T)
|
||||
#define ALL_GEMM_FLAGS Values(0, CV_GEMM_A_T, CV_GEMM_B_T, CV_GEMM_C_T, CV_GEMM_A_T | CV_GEMM_B_T, CV_GEMM_A_T | CV_GEMM_C_T, CV_GEMM_A_T | CV_GEMM_B_T | CV_GEMM_C_T)
|
||||
#define ALL_GEMM_FLAGS Values(0, (int)cv::GEMM_1_T, (int)cv::GEMM_2_T, (int)cv::GEMM_3_T, \
|
||||
(int)cv::GEMM_1_T | cv::GEMM_2_T, (int)cv::GEMM_1_T | cv::GEMM_3_T, \
|
||||
(int)cv::GEMM_1_T | cv::GEMM_2_T | cv::GEMM_3_T)
|
||||
|
||||
DEF_PARAM_TEST(Sz_Type_Flags, cv::Size, MatType, GemmFlags);
|
||||
|
||||
@@ -2071,7 +2073,7 @@ PERF_TEST_P(Sz_Depth, Core_CountNonZero,
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// Reduce
|
||||
|
||||
CV_ENUM(ReduceCode, CV_REDUCE_SUM, CV_REDUCE_AVG, CV_REDUCE_MAX, CV_REDUCE_MIN)
|
||||
CV_ENUM(ReduceCode, cv::REDUCE_SUM, cv::REDUCE_AVG, cv::REDUCE_MAX, cv::REDUCE_MIN)
|
||||
#define ALL_REDUCE_CODES ValuesIn(ReduceCode::all())
|
||||
|
||||
enum {Rows = 0, Cols = 1};
|
||||
|
@@ -1794,7 +1794,7 @@ PERF_TEST_P(Sz_Dp_MinDist, ImgProc_HoughCircles,
|
||||
cv::gpu::GpuMat d_circles;
|
||||
cv::gpu::HoughCirclesBuf d_buf;
|
||||
|
||||
TEST_CYCLE() cv::gpu::HoughCircles(d_src, d_circles, d_buf, CV_HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
TEST_CYCLE() cv::gpu::HoughCircles(d_src, d_circles, d_buf, cv::HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
|
||||
cv::Mat gpu_circles(d_circles);
|
||||
cv::Vec3f* begin = gpu_circles.ptr<cv::Vec3f>(0);
|
||||
@@ -1806,7 +1806,7 @@ PERF_TEST_P(Sz_Dp_MinDist, ImgProc_HoughCircles,
|
||||
{
|
||||
std::vector<cv::Vec3f> cpu_circles;
|
||||
|
||||
TEST_CYCLE() cv::HoughCircles(src, cpu_circles, CV_HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
TEST_CYCLE() cv::HoughCircles(src, cpu_circles, cv::HOUGH_GRADIENT, dp, minDist, cannyThreshold, votesThreshold, minRadius, maxRadius);
|
||||
|
||||
SANITY_CHECK(cpu_circles);
|
||||
}
|
||||
|
@@ -63,7 +63,6 @@
|
||||
#include "opencv2/calib3d.hpp"
|
||||
#include "opencv2/imgproc.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
#include "opencv2/photo.hpp"
|
||||
|
||||
#include "opencv2/core/gpu_private.hpp"
|
||||
|
@@ -41,6 +41,7 @@
|
||||
//M*/
|
||||
|
||||
#include "perf_precomp.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace testing;
|
||||
|
@@ -49,7 +49,6 @@
|
||||
#include "opencv2/gpu.hpp"
|
||||
#include "opencv2/highgui.hpp"
|
||||
#include "opencv2/video.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
#include "opencv2/ts.hpp"
|
||||
#include "opencv2/ts/gpu_perf.hpp"
|
||||
|
||||
|
@@ -73,7 +73,6 @@
|
||||
#include "opencv2/ts.hpp"
|
||||
#include "opencv2/ts/gpu_test.hpp"
|
||||
#include "opencv2/gpu.hpp"
|
||||
#include "opencv2/legacy.hpp"
|
||||
|
||||
#include "interpolation.hpp"
|
||||
#include "main_test_nvidia.h"
|
||||
|
Reference in New Issue
Block a user