mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
Added perf test for distanceTransform
This commit is contained in:
parent
bbc8605530
commit
9a408c744d
23
modules/imgproc/perf/perf_distanceTransform.cpp
Normal file
23
modules/imgproc/perf/perf_distanceTransform.cpp
Normal file
@ -0,0 +1,23 @@
|
||||
#include "perf_precomp.hpp"
|
||||
#include "distransform.cpp"
|
||||
|
||||
using namespace std;
|
||||
using namespace cv;
|
||||
using namespace perf;
|
||||
|
||||
typedef perf::TestBaseWithParam<Size> Size_DistanceTransform;
|
||||
|
||||
PERF_TEST_P(Size_DistanceTransform, icvTrueDistTrans, testing::Values(TYPICAL_MAT_SIZES))
|
||||
{
|
||||
Size size = GetParam();
|
||||
Mat src(size, CV_8UC1);
|
||||
Mat dst(size, CV_32FC1);
|
||||
CvMat srcStub = src;
|
||||
CvMat dstStub = dst;
|
||||
|
||||
declare.in(src, WARMUP_RNG).out(dst);
|
||||
|
||||
TEST_CYCLE() icvTrueDistTrans(&srcStub, &dstStub);
|
||||
|
||||
SANITY_CHECK(dst, 1);
|
||||
}
|
Loading…
Reference in New Issue
Block a user