Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
ddd8f897
Commit
ddd8f897
authored
Jun 02, 2011
by
Vadim Pisarevsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed drawing test
parent
c8544f39
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
stat.cpp
modules/core/src/stat.cpp
+3
-0
test_drawing.cpp
modules/highgui/test/test_drawing.cpp
+8
-11
No files found.
modules/core/src/stat.cpp
View file @
ddd8f897
...
...
@@ -1113,6 +1113,9 @@ double cv::norm( const InputArray& _src, int normType, const InputArray& _mask )
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
();
...
...
modules/highgui/test/test_drawing.cpp
View file @
ddd8f897
...
...
@@ -49,7 +49,7 @@ using namespace cv;
class
CV_DrawingTest
:
public
cvtest
::
BaseTest
{
public
:
CV_DrawingTest
(
const
char
*
testName
){}
CV_DrawingTest
(){}
protected
:
void
run
(
int
);
virtual
void
draw
(
Mat
&
img
)
=
0
;
...
...
@@ -65,14 +65,12 @@ void CV_DrawingTest::run( int )
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
{
...
...
@@ -88,11 +86,10 @@ void CV_DrawingTest::run( int )
ts
->
set_failed_test_info
(
checkLineIterator
(
testImg
));
}
}
#endif
ts
->
set_failed_test_info
(
cvtest
::
TS
::
OK
);
}
class
CV_DrawingTest_CPP
:
public
cvtest
::
Base
Test
class
CV_DrawingTest_CPP
:
public
CV_Drawing
Test
{
public
:
CV_DrawingTest_CPP
()
{}
...
...
@@ -241,7 +238,7 @@ int CV_DrawingTest_CPP::checkLineIterator( Mat& img )
return
0
;
}
class
CV_DrawingTest_C
:
public
cvtest
::
Base
Test
class
CV_DrawingTest_C
:
public
CV_Drawing
Test
{
public
:
CV_DrawingTest_C
()
{}
...
...
@@ -408,6 +405,6 @@ int CV_DrawingTest_C::checkLineIterator( Mat& _img )
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
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment