Skip to content

Commit 4f860dc

Browse files
committed
Merge pull request #348 from mshabunin:contrib-tests
2 parents e72e2a1 + 47d45c5 commit 4f860dc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+32
-50
lines changed

modules/line_descriptor/perf/perf_descriptors.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ using std::tr1::get;
5151
typedef perf::TestBaseWithParam<std::string> file_str;
5252

5353
#define IMAGES \
54-
"line_descriptor_data/cameraman.jpg", "line_descriptor_data/lena.bmp"
54+
"cv/line_descriptor/cameraman.jpg", "cv/shared/lena.png"
5555

5656
PERF_TEST_P(file_str, descriptors, testing::Values(IMAGES))
5757
{

modules/line_descriptor/perf/perf_detection.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ using std::tr1::get;
5151
typedef perf::TestBaseWithParam<std::string> file_str;
5252

5353
#define IMAGES \
54-
"line_descriptor_data/cameraman.jpg", "line_descriptor_data/lena.bmp"
54+
"cv/line_descriptor/cameraman.jpg", "cv/shared/lena.png"
5555

5656
void createMatFromVec( const std::vector<KeyLine>& linesVec, Mat& output );
5757

modules/line_descriptor/test/test_descriptors_regression.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ using namespace cv::line_descriptor;
5050

5151
const std::string LINE_DESCRIPTOR_DIR = "line_descriptor";
5252
const std::string IMAGE_FILENAME = "cameraman.jpg";
53-
const std::string DESCRIPTORS_DIR = LINE_DESCRIPTOR_DIR + "/descriptors";
5453

5554
template<class Distance>
5655
class CV_BD_DescriptorsTest : public cvtest::BaseTest
@@ -120,15 +119,15 @@ class CV_BD_DescriptorsTest : public cvtest::BaseTest
120119
Mat readDescriptors()
121120
{
122121
Mat descriptors;
123-
FileStorage fs( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/descriptors/" + fs_name, FileStorage::READ );
122+
FileStorage fs( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/" + fs_name, FileStorage::READ );
124123
fs["descriptors"] >> descriptors;
125124

126125
return descriptors;
127126
}
128127

129128
bool writeDescriptors( Mat& descs )
130129
{
131-
FileStorage fs( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/descriptors/" + fs_name, FileStorage::WRITE );
130+
FileStorage fs( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/" + fs_name, FileStorage::WRITE );
132131
fs << "descriptors" << descs;
133132

134133
return true;
@@ -270,7 +269,7 @@ class CV_BD_DescriptorsTest : public cvtest::BaseTest
270269
}
271270

272271
std::vector<KeyLine> keylines;
273-
FileStorage fs( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/detectors/edl_detector_keylines_cameraman.yaml", FileStorage::READ );
272+
FileStorage fs( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/edl_detector_keylines_cameraman.yaml", FileStorage::READ );
274273
if( fs.isOpened() )
275274
{
276275
//read( fs.getFirstTopLevelNode(), keypoints );
@@ -326,7 +325,7 @@ class CV_BD_DescriptorsTest : public cvtest::BaseTest
326325
else
327326
{
328327
ts->printf( cvtest::TS::LOG, "Compute and write keylines.\n" );
329-
fs.open( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/detectors/edl_detector_keylines_cameraman.yaml", FileStorage::WRITE );
328+
fs.open( std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/edl_detector_keylines_cameraman.yaml", FileStorage::WRITE );
330329
if( fs.isOpened() )
331330
{
332331
bd->detect( img, keylines );

modules/line_descriptor/test/test_detector_regression.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ using namespace cv::line_descriptor;
5050

5151
const std::string LINE_DESCRIPTOR_DIR = "line_descriptor";
5252
const std::string IMAGE_FILENAME = "cameraman.jpg";
53-
const std::string DETECTOR_DIR = LINE_DESCRIPTOR_DIR + "/detectors";
5453

5554
class CV_BinaryDescriptorDetectorTest : public cvtest::BaseTest
5655
{
@@ -256,7 +255,7 @@ void CV_BinaryDescriptorDetectorTest::regressionTest()
256255
{
257256
assert( bd );
258257
std::string imgFilename = std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/" + IMAGE_FILENAME;
259-
std::string resFilename = std::string( ts->get_data_path() ) + DETECTOR_DIR + "/" + fs_name + ".yaml";
258+
std::string resFilename = std::string( ts->get_data_path() ) + LINE_DESCRIPTOR_DIR + "/" + fs_name + ".yaml";
260259

261260
// Read the test image.
262261
Mat image = imread( imgFilename );

modules/reg/test/test_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@
4343

4444
#include "test_precomp.hpp"
4545

46-
CV_TEST_MAIN("reg")
46+
CV_TEST_MAIN("cv")

modules/reg/test/test_reg.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ void RegTest::testProjective()
244244

245245
void RegTest::loadImage()
246246
{
247-
const string imageName = cvtest::TS::ptr()->get_data_path() + "home.png";
247+
const string imageName = cvtest::TS::ptr()->get_data_path() + "reg/home.png";
248248

249249
img1 = imread(imageName, -1);
250250
ASSERT_TRUE(img1.data != 0);

modules/rgbd/samples/odometry_evaluation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ int main(int argc, char** argv)
173173

174174
Ptr<OdometryFrame> frame_prev = Ptr<OdometryFrame>(new OdometryFrame()),
175175
frame_curr = Ptr<OdometryFrame>(new OdometryFrame());
176-
Ptr<Odometry> odometry = Odometry::create("RGBD." + string(argv[3]) + "Odometry");
176+
Ptr<Odometry> odometry = Odometry::create(string(argv[3]) + "Odometry");
177177
if(odometry.empty())
178178
{
179179
cout << "Can not create Odometry algorithm. Check the passed odometry name." << endl;

modules/rgbd/test/test_main.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#include "test_precomp.hpp"
22

3-
CV_TEST_MAIN("rgbd")
3+
CV_TEST_MAIN("cv")

modules/rgbd/test/test_normal.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ class CV_RgbdPlaneTest: public cvtest::BaseTest
450450

451451
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
452452

453-
TEST(Rgbd_Normals, compute)
453+
TEST(DISABLED_Rgbd_Normals, compute)
454454
{
455455
cv::rgbd::CV_RgbdNormalsTest test;
456456
test.safe_run();

modules/rgbd/test/test_odometry.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -175,8 +175,8 @@ class CV_OdometryTest : public cvtest::BaseTest
175175

176176
bool CV_OdometryTest::readData(Mat& image, Mat& depth) const
177177
{
178-
std::string imageFilename = std::string(ts->get_data_path()) + "/odometry/rgb.png";
179-
std::string depthFilename = std::string(ts->get_data_path()) + "/odometry/depth.png";
178+
std::string imageFilename = ts->get_data_path() + "rgbd/rgb.png";
179+
std::string depthFilename = ts->get_data_path() + "rgbd/depth.png";
180180

181181
image = imread(imageFilename, 0);
182182
depth = imread(depthFilename, -1);
@@ -286,7 +286,7 @@ void CV_OdometryTest::run(int)
286286
Rodrigues(calcR, calcRvec);
287287
calcRvec = calcRvec.reshape(rvec.channels(), rvec.rows);
288288
Mat calcTvec = calcRt(Rect(3,0,1,3));
289-
289+
290290
#if SHOW_DEBUG_IMAGES
291291
imshow("image", image);
292292
imshow("warpedImage", warpedImage);
@@ -296,7 +296,7 @@ void CV_OdometryTest::run(int)
296296
waitKey();
297297
#endif
298298

299-
299+
300300
// compare rotation
301301
double rdiffnorm = norm(rvec - calcRvec),
302302
rnorm = norm(rvec);
@@ -338,18 +338,18 @@ void CV_OdometryTest::run(int)
338338

339339
TEST(RGBD_Odometry_Rgbd, algorithmic)
340340
{
341-
cv::rgbd::CV_OdometryTest test(cv::rgbd::Odometry::create("RGBD.RgbdOdometry"), 0.99, 0.94);
341+
cv::rgbd::CV_OdometryTest test(cv::rgbd::Odometry::create("RgbdOdometry"), 0.99, 0.94);
342342
test.safe_run();
343343
}
344344

345-
TEST(RGBD_Odometry_ICP, algorithmic)
345+
TEST(DISABLED_RGBD_Odometry_ICP, algorithmic)
346346
{
347-
cv::rgbd::CV_OdometryTest test(cv::rgbd::Odometry::create("RGBD.ICPOdometry"), 0.99, 0.99);
347+
cv::rgbd::CV_OdometryTest test(cv::rgbd::Odometry::create("ICPOdometry"), 0.99, 0.99);
348348
test.safe_run();
349349
}
350350

351-
TEST(RGBD_Odometry_RgbdICP, algorithmic)
351+
TEST(DISABLED_RGBD_Odometry_RgbdICP, algorithmic)
352352
{
353-
cv::rgbd::CV_OdometryTest test(cv::rgbd::Odometry::create("RGBD.RgbdICPOdometry"), 0.99, 0.99);
353+
cv::rgbd::CV_OdometryTest test(cv::rgbd::Odometry::create("RgbdICPOdometry"), 0.99, 0.99);
354354
test.safe_run();
355355
}

0 commit comments

Comments
 (0)