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
5bafccd2
Commit
5bafccd2
authored
Jun 11, 2010
by
James Bowman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FindContours with all modes/methods, ticket 303
parent
ab7b50d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
test.py
tests/python/test.py
+10
-8
No files found.
tests/python/test.py
View file @
5bafccd2
...
...
@@ -461,14 +461,16 @@ class FunctionTests(OpenCVTests):
storage
=
cv
.
CreateMemStorage
()
# First run FindContours on a black image.
scratch
=
cv
.
CreateImage
((
800
,
800
),
8
,
1
)
cv
.
SetZero
(
scratch
)
seq
=
cv
.
FindContours
(
scratch
,
storage
,
cv
.
CV_RETR_TREE
,
cv
.
CV_CHAIN_APPROX_SIMPLE
)
x
=
len
(
seq
)
if
seq
:
pass
for
s
in
seq
:
pass
for
mode
in
[
cv
.
CV_RETR_EXTERNAL
,
cv
.
CV_RETR_LIST
,
cv
.
CV_RETR_CCOMP
,
cv
.
CV_RETR_TREE
]:
for
method
in
[
cv
.
CV_CHAIN_CODE
,
cv
.
CV_CHAIN_APPROX_NONE
,
cv
.
CV_CHAIN_APPROX_SIMPLE
,
cv
.
CV_CHAIN_APPROX_TC89_L1
,
cv
.
CV_CHAIN_APPROX_TC89_KCOS
,
cv
.
CV_LINK_RUNS
]:
scratch
=
cv
.
CreateImage
((
800
,
800
),
8
,
1
)
cv
.
SetZero
(
scratch
)
seq
=
cv
.
FindContours
(
scratch
,
storage
,
mode
,
method
)
x
=
len
(
seq
)
if
seq
:
pass
for
s
in
seq
:
pass
for
trial
in
range
(
10
):
scratch
=
cv
.
CreateImage
((
800
,
800
),
8
,
1
)
...
...
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