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),
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;
}
#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))
{
#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))
{
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())
{
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())
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));
#endif \r
}\r
\r
-PERF_TEST_P(ImagePair, Calib3D_StereoBM, Values(make_string_pair("gpu/perf/aloe.jpg", "gpu/perf/aloeR.jpg")))\r
+PERF_TEST_P(ImagePair, Calib3D_StereoBM, Values(make_string_pair("gpu/perf/aloe.png", "gpu/perf/aloeR.png")))\r
{\r
declare.time(5.0);\r
\r
\r
DEF_PARAM_TEST_1(Image, string);\r
\r
-PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.jpg"))\r
+PERF_TEST_P(Image, Features2D_SURF, Values<string>("gpu/perf/aloe.png"))\r
{\r
declare.time(50.0);\r
\r
//////////////////////////////////////////////////////////////////////\r
// FAST\r
\r
-PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.jpg"))\r
+PERF_TEST_P(Image, Features2D_FAST, Values<string>("gpu/perf/aloe.png"))\r
{\r
cv::Mat img = readImage(GetParam(), cv::IMREAD_GRAYSCALE);\r
ASSERT_FALSE(img.empty());\r
//////////////////////////////////////////////////////////////////////\r
// ORB\r
\r
-PERF_TEST_P(Image, Features2D_ORB, Values<string>("gpu/perf/aloe.jpg"))\r
+PERF_TEST_P(Image, Features2D_ORB, Values<string>("gpu/perf/aloe.png"))\r
{\r
cv::Mat img = readImage(GetParam(), cv::IMREAD_GRAYSCALE);\r
ASSERT_FALSE(img.empty());\r
DEF_PARAM_TEST(Image_AppertureSz_L2gradient, string, int, bool);\r
\r
PERF_TEST_P(Image_AppertureSz_L2gradient, ImgProc_Canny, Combine(\r
- Values("perf/800x600.jpg", "perf/1280x1024.jpg", "perf/1680x1050.jpg"),\r
+ Values("perf/800x600.png", "perf/1280x1024.png", "perf/1680x1050.png"),\r
Values(3, 5),\r
Bool()))\r
{\r
\r
DEF_PARAM_TEST(Image_MinDistance, string, double);\r
\r
-PERF_TEST_P(Image_MinDistance, Video_GoodFeaturesToTrack, Combine(Values<string>("gpu/perf/aloe.jpg"), Values(0.0, 3.0)))\r
+PERF_TEST_P(Image_MinDistance, Video_GoodFeaturesToTrack, Combine(Values<string>("gpu/perf/aloe.png"), Values(0.0, 3.0)))\r
{\r
string fileName = GET_PARAM(0);\r
double minDistance = GET_PARAM(1);\r
\r
TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF_NORMED)\r
{\r
- cv::Mat scene = readImage("matchtemplate/scene.jpg");\r
+ cv::Mat scene = readImage("matchtemplate/scene.png");\r
ASSERT_FALSE(scene.empty());\r
\r
- cv::Mat templ = readImage("matchtemplate/template.jpg");\r
+ cv::Mat templ = readImage("matchtemplate/template.png");\r
ASSERT_FALSE(templ.empty());\r
\r
cv::gpu::GpuMat d_result;\r
\r
TEST_P(MatchTemplate_CanFindBigTemplate, SQDIFF)\r
{\r
- cv::Mat scene = readImage("matchtemplate/scene.jpg");\r
+ cv::Mat scene = readImage("matchtemplate/scene.png");\r
ASSERT_FALSE(scene.empty());\r
\r
- cv::Mat templ = readImage("matchtemplate/template.jpg");\r
+ cv::Mat templ = readImage("matchtemplate/template.png");\r
ASSERT_FALSE(templ.empty());\r
\r
cv::gpu::GpuMat d_result;\r
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;
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);
#ifdef HAVE_JASPER
"jp2",
#endif
-#ifdef HAVE_OPENEXR
+#if defined HAVE_OPENEXR && !defined __APPLE__
"exr",
#endif
"bmp",
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) )
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())
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 ),
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 ),
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 )
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);
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);
{
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);
{
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())
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;
#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))
{
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)
)
)
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;
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";
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 );
}
}
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");
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()
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()
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);
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);
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;
TEST(SurfFeaturesFinder, CanFindInROIs)\r
{\r
Ptr<detail::FeaturesFinder> finder = new detail::SurfFeaturesFinder();\r
- Mat img = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/lena.jpg");\r
+ Mat img = imread(string(cvtest::TS::ptr()->get_data_path()) + "cv/shared/lena.png");\r
\r
vector<Rect> rois;\r
rois.push_back(Rect(0, 0, img.cols / 2, img.rows / 2));\r
}
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)),
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)),
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()),