double cv::norm( const InputArray& _src1, const InputArray& _src2, int normType, const InputArray& _mask )
{
+ if( normType & CV_RELATIVE )
+ return norm(_src1, _src2, normType & ~CV_RELATIVE, _mask)/(norm(_src2, normType, _mask) + DBL_EPSILON);
+
Mat src1 = _src1.getMat(), src2 = _src2.getMat(), mask = _mask.getMat();
int depth = src1.depth(), cn = src1.channels();
class CV_DrawingTest : public cvtest::BaseTest
{
public:
- CV_DrawingTest( const char* testName ){}
+ CV_DrawingTest(){}
protected:
void run( int );
virtual void draw( Mat& img ) = 0;
draw( testImg );
-#ifdef DRAW_TEST_IMAGE
- imwrite( filename, testImg );
-#else
valImg = imread( filename );
if( valImg.empty() )
{
- ts->printf( ts->LOG, "test image can not be read");
- ts->set_failed_test_info(cvtest::TS::FAIL_INVALID_TEST_DATA);
+ imwrite( filename, testImg );
+ //ts->printf( ts->LOG, "test image can not be read");
+ //ts->set_failed_test_info(cvtest::TS::FAIL_INVALID_TEST_DATA);
}
else
{
ts->set_failed_test_info(checkLineIterator( testImg ));
}
}
-#endif
ts->set_failed_test_info(cvtest::TS::OK);
}
-class CV_DrawingTest_CPP : public cvtest::BaseTest
+class CV_DrawingTest_CPP : public CV_DrawingTest
{
public:
CV_DrawingTest_CPP() {}
return 0;
}
-class CV_DrawingTest_C : public cvtest::BaseTest
+class CV_DrawingTest_C : public CV_DrawingTest
{
public:
CV_DrawingTest_C() {}
return 0;
}
-//TEST(Highgui_Drawing_CPP, regression) { CV_DrawingTest_CPP test; test.safe_run(); }
-//TEST(Highgui_Drawing_C, regression) { CV_DrawingTest_C test; test.safe_run(); }
+TEST(Highgui_Drawing_CPP, regression) { CV_DrawingTest_CPP test; test.safe_run(); }
+TEST(Highgui_Drawing_C, regression) { CV_DrawingTest_C test; test.safe_run(); }