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
7fe4fbfc
Commit
7fe4fbfc
authored
Nov 12, 2010
by
Maria Dimashova
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified grabCut test to stable verification
parent
cfda65a1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
grabcut.cpp
tests/cv/src/grabcut.cpp
+8
-10
tsysa.cpp
tests/cv/src/tsysa.cpp
+0
-1
No files found.
tests/cv/src/grabcut.cpp
View file @
7fe4fbfc
...
@@ -53,6 +53,7 @@ public:
...
@@ -53,6 +53,7 @@ public:
CV_GrabcutTest
();
CV_GrabcutTest
();
~
CV_GrabcutTest
();
~
CV_GrabcutTest
();
protected
:
protected
:
bool
verify
(
const
Mat
&
mask
,
const
Mat
&
exp
);
void
run
(
int
);
void
run
(
int
);
};
};
...
@@ -62,18 +63,15 @@ CV_GrabcutTest::CV_GrabcutTest(): CvTest( "segmentation-grabcut", "cv::grabCut"
...
@@ -62,18 +63,15 @@ CV_GrabcutTest::CV_GrabcutTest(): CvTest( "segmentation-grabcut", "cv::grabCut"
}
}
CV_GrabcutTest
::~
CV_GrabcutTest
()
{}
CV_GrabcutTest
::~
CV_GrabcutTest
()
{}
bool
verify
(
const
Mat
&
mask
,
const
Mat
&
exp
)
bool
CV_GrabcutTest
::
verify
(
const
Mat
&
mask
,
const
Mat
&
exp
)
{
{
if
(
0
==
norm
(
mask
,
exp
,
NORM_INF
))
const
float
maxDiffRatio
=
0.005
f
;
return
true
;
int
expArea
=
countNonZero
(
exp
);
int
nonIntersectArea
=
countNonZero
(
mask
!=
exp
);
Mat
mask_dilated
,
exp_dilated
;
float
curRatio
=
(
float
)
nonIntersectArea
/
(
float
)
expArea
;
ts
->
printf
(
CvTS
::
LOG
,
"nonIntersectArea/expArea = %f
\n
"
,
curRatio
);
const
int
inter_num
=
2
;
return
curRatio
<
maxDiffRatio
;
dilate
(
mask
,
mask_dilated
,
Mat
(),
Point
(
-
1
,
-
1
),
inter_num
);
dilate
(
exp
,
exp_dilated
,
Mat
(),
Point
(
-
1
,
-
1
),
inter_num
);
return
countNonZero
(
mask
-
exp_dilated
)
+
countNonZero
(
mask_dilated
-
exp
)
==
0
;
}
}
void
CV_GrabcutTest
::
run
(
int
/* start_from */
)
void
CV_GrabcutTest
::
run
(
int
/* start_from */
)
...
...
tests/cv/src/tsysa.cpp
View file @
7fe4fbfc
...
@@ -53,7 +53,6 @@ const char* blacklist[] =
...
@@ -53,7 +53,6 @@ const char* blacklist[] =
"latentsvmdetector"
,
//ticket 661
"latentsvmdetector"
,
//ticket 661
"warp-affine"
,
//ticket 572
"warp-affine"
,
//ticket 572
"warp-perspective"
,
//ticket 575
"warp-perspective"
,
//ticket 575
"segmentation-grabcut"
,
//ticket 666
"_3d-fundam"
,
//ticket 434
"_3d-fundam"
,
//ticket 434
"posit"
,
//ticket 430
"posit"
,
//ticket 430
0
0
...
...
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