mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 11:10:21 +08:00
replaced jpegs with png's. Accuracy tests pass; performance tests were not tried yet
This commit is contained in:
parent
d40a2c28c5
commit
06a13d9ba0
@ -156,7 +156,7 @@ void CV_ChessboardSubpixelTest::run( int )
|
||||
if(!result)
|
||||
{
|
||||
#if 0
|
||||
ts->printf(cvtest::TS::LOG, "Warning: chessboard was not detected! Writing image to test.jpg\n");
|
||||
ts->printf(cvtest::TS::LOG, "Warning: chessboard was not detected! Writing image to test.png\n");
|
||||
ts->printf(cvtest::TS::LOG, "Size = %d, %d\n", pattern_size.width, pattern_size.height);
|
||||
ts->printf(cvtest::TS::LOG, "Intrinsic params: fx = %f, fy = %f, cx = %f, cy = %f\n",
|
||||
intrinsic_matrix_.at<double>(0, 0), intrinsic_matrix_.at<double>(1, 1),
|
||||
@ -166,7 +166,7 @@ void CV_ChessboardSubpixelTest::run( int )
|
||||
distortion_coeffs_.at<double>(0, 2), distortion_coeffs_.at<double>(0, 3),
|
||||
distortion_coeffs_.at<double>(0, 4));
|
||||
|
||||
imwrite("test.jpg", chessboard_image);
|
||||
imwrite("test.png", chessboard_image);
|
||||
#endif
|
||||
continue;
|
||||
}
|
||||
|
@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> fast;
|
||||
|
||||
#define FAST_IMAGES \
|
||||
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
|
||||
"stitching/a3.jpg"
|
||||
"stitching/a3.png"
|
||||
|
||||
PERF_TEST_P(fast, detectForORB, testing::Values(FAST_IMAGES))
|
||||
{
|
||||
|
@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> orb;
|
||||
|
||||
#define ORB_IMAGES \
|
||||
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
|
||||
"stitching/a3.jpg"
|
||||
"stitching/a3.png"
|
||||
|
||||
PERF_TEST_P(orb, detect, testing::Values(ORB_IMAGES))
|
||||
{
|
||||
|
@ -58,8 +58,8 @@ CV_BRISKTest::~CV_BRISKTest() {}
|
||||
|
||||
void CV_BRISKTest::run( int )
|
||||
{
|
||||
Mat image1 = imread(string(ts->get_data_path()) + "inpaint/orig.jpg");
|
||||
Mat image2 = imread(string(ts->get_data_path()) + "cameracalibration/chess9.jpg");
|
||||
Mat image1 = imread(string(ts->get_data_path()) + "inpaint/orig.png");
|
||||
Mat image2 = imread(string(ts->get_data_path()) + "cameracalibration/chess9.png");
|
||||
|
||||
if (image1.empty() || image2.empty())
|
||||
{
|
||||
|
@ -59,8 +59,8 @@ CV_FastTest::~CV_FastTest() {}
|
||||
void CV_FastTest::run( int )
|
||||
{
|
||||
for(int type=0; type <= 2; ++type) {
|
||||
Mat image1 = imread(string(ts->get_data_path()) + "inpaint/orig.jpg");
|
||||
Mat image2 = imread(string(ts->get_data_path()) + "cameracalibration/chess9.jpg");
|
||||
Mat image1 = imread(string(ts->get_data_path()) + "inpaint/orig.png");
|
||||
Mat image2 = imread(string(ts->get_data_path()) + "cameracalibration/chess9.png");
|
||||
string xml = string(ts->get_data_path()) + format("fast/result%d.xml", type);
|
||||
|
||||
if (image1.empty() || image2.empty())
|
||||
|
@ -49,7 +49,7 @@ TEST(Features2D_ORB, _1996)
|
||||
Ptr<FeatureDetector> fd = FeatureDetector::create("ORB");
|
||||
Ptr<DescriptorExtractor> de = DescriptorExtractor::create("ORB");
|
||||
|
||||
Mat image = imread(string(cvtest::TS::ptr()->get_data_path()) + "shared/lena.jpg");
|
||||
Mat image = imread(string(cvtest::TS::ptr()->get_data_path()) + "shared/lena.png");
|
||||
ASSERT_FALSE(image.empty());
|
||||
|
||||
Mat roi(image.size(), CV_8UC1, Scalar(0));
|
||||
|
@ -20,7 +20,7 @@ static pair_string make_string_pair(const string& a, const string& b)
|
||||
#endif
|
||||
}
|
||||
|
||||
PERF_TEST_P(ImagePair, Calib3D_StereoBM, Values(make_string_pair("gpu/perf/aloe.jpg", "gpu/perf/aloeR.jpg")))
|
||||
PERF_TEST_P(ImagePair, Calib3D_StereoBM, Values(make_string_pair("gpu/perf/aloe.png", "gpu/perf/aloeR.png")))
|
||||
{
|
||||
declare.time(5.0);
|
||||
|
||||
|
@ -10,7 +10,7 @@ namespace {
|
||||
|
||||
DEF_PARAM_TEST_1(Image, string);
|
||||
|
||||
PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.jpg"))
|
||||
PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.png"))
|
||||
{
|
||||
declare.time(50.0);
|
||||
|
||||
@ -51,7 +51,7 @@ PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.jpg"))
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// FAST
|
||||
|
||||
PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.jpg"))
|
||||
PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.png"))
|
||||
{
|
||||
cv::Mat img = readImage(GetParam(), cv::IMREAD_GRAYSCALE);
|
||||
ASSERT_FALSE(img.empty());
|
||||
@ -87,7 +87,7 @@ PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.jpg"))
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// ORB
|
||||
|
||||
PERF_TEST_P(Image, Features2D_ORB, Values<string>("gpu/perf/aloe.jpg"))
|
||||
PERF_TEST_P(Image, Features2D_ORB, Values<string>("gpu/perf/aloe.png"))
|
||||
{
|
||||
cv::Mat img = readImage(GetParam(), cv::IMREAD_GRAYSCALE);
|
||||
ASSERT_FALSE(img.empty());
|
||||
|
@ -645,7 +645,7 @@ PERF_TEST_P(Sz, ImgProc_ColumnSum, GPU_TYPICAL_MAT_SIZES)
|
||||
DEF_PARAM_TEST(Image_AppertureSz_L2gradient, string, int, bool);
|
||||
|
||||
PERF_TEST_P(Image_AppertureSz_L2gradient, ImgProc_Canny, Combine(
|
||||
Values("perf/800x600.jpg", "perf/1280x1024.jpg", "perf/1680x1050.jpg"),
|
||||
Values("perf/800x600.png", "perf/1280x1024.png", "perf/1680x1050.png"),
|
||||
Values(3, 5),
|
||||
Bool()))
|
||||
{
|
||||
|
@ -145,7 +145,7 @@ PERF_TEST_P(ImagePair, Video_CreateOpticalFlowNeedleMap, Values<pair_string>(mak
|
||||
|
||||
DEF_PARAM_TEST(Image_MinDistance, string, double);
|
||||
|
||||
PERF_TEST_P(Image_MinDistance, Video_GoodFeaturesToTrack, Combine(Values<string>("gpu/perf/aloe.jpg"), Values(0.0, 3.0)))
|
||||
PERF_TEST_P(Image_MinDistance, Video_GoodFeaturesToTrack, Combine(Values<string>("gpu/perf/aloe.png"), Values(0.0, 3.0)))
|
||||
{
|
||||
string fileName = GET_PARAM(0);
|
||||
double minDistance = GET_PARAM(1);
|
||||
|
@ -808,10 +808,10 @@ struct MatchTemplate_CanFindBigTemplate : testing::TestWithParam<cv::gpu::Device
|
||||
|
||||
TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF_NORMED)
|
||||
{
|
||||
cv::Mat scene = readImage("matchtemplate/scene.jpg");
|
||||
cv::Mat scene = readImage("matchtemplate/scene.png");
|
||||
ASSERT_FALSE(scene.empty());
|
||||
|
||||
cv::Mat templ = readImage("matchtemplate/template.jpg");
|
||||
cv::Mat templ = readImage("matchtemplate/template.png");
|
||||
ASSERT_FALSE(templ.empty());
|
||||
|
||||
cv::gpu::GpuMat d_result;
|
||||
@ -831,10 +831,10 @@ TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF_NORMED)
|
||||
|
||||
TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF)
|
||||
{
|
||||
cv::Mat scene = readImage("matchtemplate/scene.jpg");
|
||||
cv::Mat scene = readImage("matchtemplate/scene.png");
|
||||
ASSERT_FALSE(scene.empty());
|
||||
|
||||
cv::Mat templ = readImage("matchtemplate/template.jpg");
|
||||
cv::Mat templ = readImage("matchtemplate/template.png");
|
||||
ASSERT_FALSE(templ.empty());
|
||||
|
||||
cv::gpu::GpuMat d_result;
|
||||
|
@ -60,7 +60,7 @@ protected:
|
||||
void CV_DrawingTest::run( int )
|
||||
{
|
||||
Mat testImg, valImg;
|
||||
const string fname = "drawing/image.jpg";
|
||||
const string fname = "drawing/image.png";
|
||||
string path = ts->get_data_path(), filename;
|
||||
filename = path + fname;
|
||||
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
|
||||
void CV_HighGuiTest::ImageTest(const string& dir)
|
||||
{
|
||||
string _name = dir + string("../cv/shared/baboon.jpg");
|
||||
string _name = dir + string("../cv/shared/baboon.png");
|
||||
ts->printf(ts->LOG, "reading image : %s\n", _name.c_str());
|
||||
|
||||
Mat image = imread(_name);
|
||||
@ -143,7 +143,7 @@ void CV_HighGuiTest::ImageTest(const string& dir)
|
||||
#ifdef HAVE_JASPER
|
||||
"jp2",
|
||||
#endif
|
||||
#ifdef HAVE_OPENEXR
|
||||
#if defined HAVE_OPENEXR && !defined __APPLE__
|
||||
"exr",
|
||||
#endif
|
||||
"bmp",
|
||||
|
@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Img_Aperture_L2_thresholds_t> Img_Aperture_L2_th
|
||||
|
||||
PERF_TEST_P(Img_Aperture_L2_thresholds, canny,
|
||||
testing::Combine(
|
||||
testing::Values( "cv/shared/lena.jpg", "stitching/b1.jpg", "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png" ),
|
||||
testing::Values( "cv/shared/lena.png", "stitching/b1.png", "cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png" ),
|
||||
testing::Values( 3, 5 ),
|
||||
testing::Bool(),
|
||||
testing::Values( make_tuple(50.0, 100.0), make_tuple(0.0, 50.0), make_tuple(100.0, 120.0) )
|
||||
|
@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Img_BlockSize_ApertureSize_BorderType_t> Img_Blo
|
||||
|
||||
PERF_TEST_P(Img_BlockSize_ApertureSize_BorderType, cornerEigenValsAndVecs,
|
||||
testing::Combine(
|
||||
testing::Values( "stitching/a1.jpg", "cv/shared/pic5.png"),
|
||||
testing::Values( "stitching/a1.png", "cv/shared/pic5.png"),
|
||||
testing::Values( 3, 5 ),
|
||||
testing::Values( 3, 5 ),
|
||||
testing::ValuesIn(BorderType::all())
|
||||
|
@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Img_BlockSize_ApertureSize_k_BorderType_t> Img_B
|
||||
|
||||
PERF_TEST_P(Img_BlockSize_ApertureSize_k_BorderType, cornerHarris,
|
||||
testing::Combine(
|
||||
testing::Values( "stitching/a1.jpg", "cv/shared/pic5.png"),
|
||||
testing::Values( "stitching/a1.png", "cv/shared/pic5.png"),
|
||||
testing::Values( 3, 5 ),
|
||||
testing::Values( 3, 5 ),
|
||||
testing::Values( 0.04, 0.1 ),
|
||||
|
@ -11,7 +11,7 @@ typedef perf::TestBaseWithParam<Image_MaxCorners_QualityLevel_MinDistance_BlockS
|
||||
|
||||
PERF_TEST_P(Image_MaxCorners_QualityLevel_MinDistance_BlockSize_UseHarris, goodFeaturesToTrack,
|
||||
testing::Combine(
|
||||
testing::Values( "stitching/a1.jpg", "cv/shared/pic5.png"),
|
||||
testing::Values( "stitching/a1.png", "cv/shared/pic5.png"),
|
||||
testing::Values( 100, 500 ),
|
||||
testing::Values( 0.1, 0.01 ),
|
||||
testing::Values( 3, 5 ),
|
||||
|
@ -13,7 +13,7 @@ typedef perf::TestBaseWithParam<Image_RhoStep_ThetaStep_Threshold_t> Image_RhoSt
|
||||
|
||||
PERF_TEST_P(Image_RhoStep_ThetaStep_Threshold, HoughLines,
|
||||
testing::Combine(
|
||||
testing::Values( "cv/shared/pic5.png", "stitching/a1.jpg" ),
|
||||
testing::Values( "cv/shared/pic5.png", "stitching/a1.png" ),
|
||||
testing::Values( 1, 10 ),
|
||||
testing::Values( 0.01, 0.1 ),
|
||||
testing::Values( 300, 500 )
|
||||
|
@ -33,7 +33,7 @@ PERF_TEST_P( TestWarpAffine, WarpAffine,
|
||||
borderMode = get<1>(GetParam());
|
||||
interType = get<2>(GetParam());
|
||||
|
||||
Mat src, img = imread(getDataPath("cv/shared/fruits.jpg"));
|
||||
Mat src, img = imread(getDataPath("cv/shared/fruits.png"));
|
||||
cvtColor(img, src, COLOR_BGR2RGBA, 4);
|
||||
Mat warpMat = getRotationMatrix2D(Point2f(src.cols/2.f, src.rows/2.f), 30., 2.2);
|
||||
Mat dst(sz, CV_8UC4);
|
||||
@ -61,7 +61,7 @@ PERF_TEST_P( TestWarpPerspective, WarpPerspective,
|
||||
interType = get<2>(GetParam());
|
||||
|
||||
|
||||
Mat src, img = imread(getDataPath("cv/shared/fruits.jpg"));
|
||||
Mat src, img = imread(getDataPath("cv/shared/fruits.png"));
|
||||
cvtColor(img, src, COLOR_BGR2RGBA, 4);
|
||||
Mat rotMat = getRotationMatrix2D(Point2f(src.cols/2.f, src.rows/2.f), 30., 2.2);
|
||||
Mat warpMat(3, 3, CV_64FC1);
|
||||
|
@ -76,7 +76,7 @@ void CV_GrabcutTest::run( int /* start_from */)
|
||||
{
|
||||
cvtest::DefaultRngAuto defRng;
|
||||
|
||||
Mat img = imread(string(ts->get_data_path()) + "shared/airplane.jpg");
|
||||
Mat img = imread(string(ts->get_data_path()) + "shared/airplane.png");
|
||||
Mat mask_prob = imread(string(ts->get_data_path()) + "grabcut/mask_prob.png", 0);
|
||||
Mat exp_mask1 = imread(string(ts->get_data_path()) + "grabcut/exp_mask1.png", 0);
|
||||
Mat exp_mask2 = imread(string(ts->get_data_path()) + "grabcut/exp_mask2.png", 0);
|
||||
|
@ -62,7 +62,7 @@ void CV_WatershedTest::run( int /* start_from */)
|
||||
{
|
||||
string exp_path = string(ts->get_data_path()) + "watershed/wshed_exp.png";
|
||||
Mat exp = imread(exp_path, 0);
|
||||
Mat orig = imread(string(ts->get_data_path()) + "inpaint/orig.jpg");
|
||||
Mat orig = imread(string(ts->get_data_path()) + "inpaint/orig.png");
|
||||
FileStorage fs(string(ts->get_data_path()) + "watershed/comp.xml", FileStorage::READ);
|
||||
|
||||
if (orig.empty() || !fs.isOpened())
|
||||
|
@ -661,7 +661,7 @@ namespace cv{
|
||||
for(int i = 0; i < m_pose_count; i++)
|
||||
{
|
||||
char buf[1024];
|
||||
sprintf(buf, "%s/patch_%04d.jpg", path, i);
|
||||
sprintf(buf, "%s/patch_%04d.png", path, i);
|
||||
IplImage* patch = cvCreateImage(cvSize(m_samples[i]->width, m_samples[i]->height), IPL_DEPTH_8U, m_samples[i]->nChannels);
|
||||
|
||||
double maxval;
|
||||
|
@ -10,7 +10,7 @@ typedef perf::TestBaseWithParam<std::string> surf;
|
||||
|
||||
#define SURF_IMAGES \
|
||||
"cv/detectors_descriptors_evaluation/images_datasets/leuven/img1.png",\
|
||||
"stitching/a3.jpg"
|
||||
"stitching/a3.png"
|
||||
|
||||
PERF_TEST_P(surf, detect, testing::Values(SURF_IMAGES))
|
||||
{
|
||||
|
@ -11,17 +11,17 @@ typedef std::tr1::tuple<std::string, int> ImageName_MinSize_t;
|
||||
typedef perf::TestBaseWithParam<ImageName_MinSize_t> ImageName_MinSize;
|
||||
|
||||
PERF_TEST_P(ImageName_MinSize, CascadeClassifierLBPFrontalFace,
|
||||
testing::Combine(testing::Values( std::string("cv/shared/lena.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000247.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000289.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000492.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000573.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000803.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000892.jpg"),
|
||||
std::string("cv/shared/1_itseez-0000984.jpg"),
|
||||
std::string("cv/shared/1_itseez-0001238.jpg"),
|
||||
std::string("cv/shared/1_itseez-0001438.jpg"),
|
||||
std::string("cv/shared/1_itseez-0002524.jpg")),
|
||||
testing::Combine(testing::Values( std::string("cv/shared/lena.png"),
|
||||
std::string("cv/shared/1_itseez-0000247.png"),
|
||||
std::string("cv/shared/1_itseez-0000289.png"),
|
||||
std::string("cv/shared/1_itseez-0000492.png"),
|
||||
std::string("cv/shared/1_itseez-0000573.png"),
|
||||
std::string("cv/shared/1_itseez-0000803.png"),
|
||||
std::string("cv/shared/1_itseez-0000892.png"),
|
||||
std::string("cv/shared/1_itseez-0000984.png"),
|
||||
std::string("cv/shared/1_itseez-0001238.png"),
|
||||
std::string("cv/shared/1_itseez-0001438.png"),
|
||||
std::string("cv/shared/1_itseez-0002524.png")),
|
||||
testing::Values(24, 30, 40, 50, 60, 70, 80, 90)
|
||||
)
|
||||
)
|
||||
|
@ -76,7 +76,7 @@ bool CV_LatentSVMDetectorTest::isEqual(CvRect r1, CvRect r2, int eps)
|
||||
|
||||
void CV_LatentSVMDetectorTest::run( int /* start_from */)
|
||||
{
|
||||
string img_path = string(ts->get_data_path()) + "latentsvmdetector/cat.jpg";
|
||||
string img_path = string(ts->get_data_path()) + "latentsvmdetector/cat.png";
|
||||
string model_path = string(ts->get_data_path()) + "latentsvmdetector/models_VOC2007/cat.xml";
|
||||
int numThreads = -1;
|
||||
|
||||
@ -204,8 +204,8 @@ bool compareResults( const vector<LatentSvmDetector::ObjectDetection>& calc, con
|
||||
|
||||
void LatentSVMDetectorTest::run( int /* start_from */)
|
||||
{
|
||||
string img_path_cat = string(ts->get_data_path()) + "latentsvmdetector/cat.jpg";
|
||||
string img_path_cars = string(ts->get_data_path()) + "latentsvmdetector/cars.jpg";
|
||||
string img_path_cat = string(ts->get_data_path()) + "latentsvmdetector/cat.png";
|
||||
string img_path_cars = string(ts->get_data_path()) + "latentsvmdetector/cars.png";
|
||||
|
||||
string model_path_cat = string(ts->get_data_path()) + "latentsvmdetector/models_VOC2007/cat.xml";
|
||||
string model_path_car = string(ts->get_data_path()) + "latentsvmdetector/models_VOC2007/car.xml";
|
||||
@ -263,17 +263,17 @@ void LatentSVMDetectorTest::run( int /* start_from */)
|
||||
|
||||
if( !compareResults(detections1_cat, true_detections1_cat, 1, score_thr) )
|
||||
{
|
||||
std::cerr << "Results of detector1 are invalid on image cat.jpg" << std::endl;
|
||||
std::cerr << "Results of detector1 are invalid on image cat.png" << std::endl;
|
||||
ts->set_failed_test_info( cvtest::TS::FAIL_MISMATCH );
|
||||
}
|
||||
if( !compareResults(detections12_cat, true_detections12_cat, 1, score_thr) )
|
||||
{
|
||||
std::cerr << "Results of detector12 are invalid on image cat.jpg" << std::endl;
|
||||
std::cerr << "Results of detector12 are invalid on image cat.png" << std::endl;
|
||||
ts->set_failed_test_info( cvtest::TS::FAIL_MISMATCH );
|
||||
}
|
||||
if( !compareResults(detections12_cars, true_detections12_cars, 1, score_thr) )
|
||||
{
|
||||
std::cerr << "Results of detector12 are invalid on image cars.jpg" << std::endl;
|
||||
std::cerr << "Results of detector12 are invalid on image cars.png" << std::endl;
|
||||
ts->set_failed_test_info( cvtest::TS::FAIL_MISMATCH );
|
||||
}
|
||||
}
|
||||
|
@ -62,7 +62,7 @@ CV_InpaintTest::~CV_InpaintTest() {}
|
||||
void CV_InpaintTest::run( int )
|
||||
{
|
||||
string folder = string(ts->get_data_path()) + "inpaint/";
|
||||
Mat orig = imread(folder + "orig.jpg");
|
||||
Mat orig = imread(folder + "orig.png");
|
||||
Mat exp1 = imread(folder + "exp1.png");
|
||||
Mat exp2 = imread(folder + "exp2.png");
|
||||
Mat mask = imread(folder + "mask.png");
|
||||
|
@ -30,9 +30,9 @@ PERF_TEST_P(stitch, a123, TEST_DETECTORS)
|
||||
Mat pano;
|
||||
|
||||
vector<Mat> imgs;
|
||||
imgs.push_back( imread( getDataPath("stitching/a1.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a2.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a3.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a1.png") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a2.png") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/a3.png") ) );
|
||||
|
||||
Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb"
|
||||
? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder()
|
||||
@ -63,8 +63,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
|
||||
Mat pano;
|
||||
|
||||
vector<Mat> imgs;
|
||||
imgs.push_back( imread( getDataPath("stitching/b1.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/b2.jpg") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/b1.png") ) );
|
||||
imgs.push_back( imread( getDataPath("stitching/b2.png") ) );
|
||||
|
||||
Ptr<detail::FeaturesFinder> featuresFinder = GetParam() == "orb"
|
||||
? (detail::FeaturesFinder*)new detail::OrbFeaturesFinder()
|
||||
@ -92,8 +92,8 @@ PERF_TEST_P(stitch, b12, TEST_DETECTORS)
|
||||
|
||||
PERF_TEST_P( match, bestOf2Nearest, TEST_DETECTORS)
|
||||
{
|
||||
Mat img1, img1_full = imread( getDataPath("stitching/b1.jpg") );
|
||||
Mat img2, img2_full = imread( getDataPath("stitching/b2.jpg") );
|
||||
Mat img1, img1_full = imread( getDataPath("stitching/b1.png") );
|
||||
Mat img2, img2_full = imread( getDataPath("stitching/b2.png") );
|
||||
float scale1 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));
|
||||
float scale2 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));
|
||||
resize(img1_full, img1, Size(), scale1, scale1);
|
||||
@ -140,8 +140,8 @@ PERF_TEST_P( matchVector, bestOf2NearestVectorFeatures, testing::Combine(
|
||||
testing::Values(2, 4, 6, 8))
|
||||
)
|
||||
{
|
||||
Mat img1, img1_full = imread( getDataPath("stitching/b1.jpg") );
|
||||
Mat img2, img2_full = imread( getDataPath("stitching/b2.jpg") );
|
||||
Mat img1, img1_full = imread( getDataPath("stitching/b1.png") );
|
||||
Mat img2, img2_full = imread( getDataPath("stitching/b2.png") );
|
||||
float scale1 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img1_full.total()));
|
||||
float scale2 = (float)std::min(1.0, sqrt(WORK_MEGAPIX * 1e6 / img2_full.total()));
|
||||
resize(img1_full, img1, Size(), scale1, scale1);
|
||||
|
@ -46,8 +46,8 @@ using namespace std;
|
||||
|
||||
TEST(MultiBandBlender, CanBlendTwoImages)
|
||||
{
|
||||
Mat image1 = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/baboon.jpg");
|
||||
Mat image2 = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/lena.jpg");
|
||||
Mat image1 = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/baboon.png");
|
||||
Mat image2 = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/lena.png");
|
||||
ASSERT_EQ(image1.rows, image2.rows); ASSERT_EQ(image1.cols, image2.cols);
|
||||
|
||||
Mat image1s, image2s;
|
||||
|
@ -50,7 +50,7 @@ using namespace std;
|
||||
TEST(SurfFeaturesFinder, CanFindInROIs)
|
||||
{
|
||||
Ptr<detail::FeaturesFinder> finder = new detail::SurfFeaturesFinder();
|
||||
Mat img = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/lena.jpg");
|
||||
Mat img = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/lena.png");
|
||||
|
||||
vector<Rect> rois;
|
||||
rois.push_back(Rect(0, 0, img.cols / 2, img.rows / 2));
|
||||
|
@ -29,7 +29,7 @@ void FormTrackingPointsArray(vector<Point2f>& points, int width, int height, int
|
||||
}
|
||||
|
||||
PERF_TEST_P(Path_Idx_Cn_NPoints_WSize, OpticalFlowPyrLK_full, testing::Combine(
|
||||
testing::Values<std::string>("cv/optflow/frames/VGA_%02d.png", "cv/optflow/frames/720p_%02d.jpg"),
|
||||
testing::Values<std::string>("cv/optflow/frames/VGA_%02d.png", "cv/optflow/frames/720p_%02d.png"),
|
||||
testing::Range(1, 3),
|
||||
testing::Values(1, 3, 4),
|
||||
testing::Values(make_tuple(9, 9), make_tuple(15, 15)),
|
||||
@ -97,7 +97,7 @@ typedef tr1::tuple<std::string, int, int, tr1::tuple<int,int>, int, bool> Path_I
|
||||
typedef TestBaseWithParam<Path_Idx_Cn_NPoints_WSize_Deriv_t> Path_Idx_Cn_NPoints_WSize_Deriv;
|
||||
|
||||
PERF_TEST_P(Path_Idx_Cn_NPoints_WSize_Deriv, OpticalFlowPyrLK_self, testing::Combine(
|
||||
testing::Values<std::string>("cv/optflow/frames/VGA_%02d.png", "cv/optflow/frames/720p_%02d.jpg"),
|
||||
testing::Values<std::string>("cv/optflow/frames/VGA_%02d.png", "cv/optflow/frames/720p_%02d.png"),
|
||||
testing::Range(1, 3),
|
||||
testing::Values(1, 3, 4),
|
||||
testing::Values(make_tuple(9, 9), make_tuple(15, 15)),
|
||||
@ -173,7 +173,7 @@ typedef tr1::tuple<std::string, int, bool, PyrBorderMode, bool> Path_Win_Deriv_B
|
||||
typedef TestBaseWithParam<Path_Win_Deriv_Border_Reuse_t> Path_Win_Deriv_Border_Reuse;
|
||||
|
||||
PERF_TEST_P(Path_Win_Deriv_Border_Reuse, OpticalFlowPyrLK_pyr, testing::Combine(
|
||||
testing::Values<std::string>("cv/optflow/frames/720p_01.jpg"),
|
||||
testing::Values<std::string>("cv/optflow/frames/720p_01.png"),
|
||||
testing::Values(7, 11),
|
||||
testing::Bool(),
|
||||
testing::ValuesIn(PyrBorderMode::all()),
|
||||
|
Loading…
Reference in New Issue
Block a user