Fix sanity checks in improc perf tests

This commit is contained in:
Andrey Kamaev 2012-10-08 21:31:07 +04:00
parent a3ab6d147d
commit 13bfcd643e
3 changed files with 80 additions and 77 deletions

View File

@ -34,5 +34,8 @@ PERF_TEST_P(Image_MaxCorners_QualityLevel_MinDistance_BlockSize_UseHarris, goodF
double minDistance = 1;
TEST_CYCLE() goodFeaturesToTrack(image, corners, maxCorners, qualityLevel, minDistance, noArray(), blockSize, useHarrisDetector);
//SANITY_CHECK(corners);
if (corners.size() > 50)
corners.erase(corners.begin() + 50, corners.end());
SANITY_CHECK(corners);
}

View File

@ -7,17 +7,15 @@ using namespace testing;
using std::tr1::make_tuple;
using std::tr1::get;
CV_ENUM(MatrixType, CV_16UC1, CV_16SC1, CV_32FC1)
CV_ENUM(MapType, CV_16SC2, CV_32FC1, CV_32FC2)
CV_ENUM(InterType, INTER_NEAREST, INTER_LINEAR, INTER_CUBIC, INTER_LANCZOS4)
typedef TestBaseWithParam< tr1::tuple<Size, MatrixType, MapType, InterType> > TestRemap;
typedef TestBaseWithParam< tr1::tuple<Size, MatType, MatType, InterType> > TestRemap;
PERF_TEST_P( TestRemap, Remap,
Combine(
Values( szVGA, sz1080p ),
ValuesIn( MatrixType::all() ),
ValuesIn( MapType::all() ),
Values( CV_16UC1, CV_16SC1, CV_32FC1 ),
Values( CV_16SC2, CV_32FC1, CV_32FC2 ),
ValuesIn( InterType::all() )
)
)

View File

@ -9,9 +9,9 @@ using std::tr1::get;
enum{HALF_SIZE=0, UPSIDE_DOWN, REFLECTION_X, REFLECTION_BOTH};
CV_ENUM(BorderMode, BORDER_CONSTANT, BORDER_REPLICATE);
CV_ENUM(InterType, INTER_NEAREST, INTER_LINEAR);
CV_ENUM(RemapMode, HALF_SIZE, UPSIDE_DOWN, REFLECTION_X, REFLECTION_BOTH);
CV_ENUM(BorderMode, BORDER_CONSTANT, BORDER_REPLICATE)
CV_ENUM(InterType, INTER_NEAREST, INTER_LINEAR)
CV_ENUM(RemapMode, HALF_SIZE, UPSIDE_DOWN, REFLECTION_X, REFLECTION_BOTH)
typedef TestBaseWithParam< tr1::tuple<Size, InterType, BorderMode> > TestWarpAffine;
typedef TestBaseWithParam< tr1::tuple<Size, InterType, BorderMode> > TestWarpPerspective;
@ -164,5 +164,7 @@ PERF_TEST(Transform, getPerspectiveTransform)
{
transformCoefficient = getPerspectiveTransform(source, destination);
}
SANITY_CHECK(transformCoefficient, 1e-5);
}