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
d49c697f
Commit
d49c697f
authored
Jun 25, 2012
by
Alexander Mordvintsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added comments to contours.py and edge.py samples
parent
a3220a44
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
0 deletions
+24
-0
contours.py
samples/python2/contours.py
+11
-0
edge.py
samples/python2/edge.py
+13
-0
No files found.
samples/python2/contours.py
View file @
d49c697f
'''
This program illustrates the use of findContours and drawContours.
The original image is put up along with the image of drawn contours.
Usage:
contours.py
A trackbar is put up which controls the contour level from -3 to 3
'''
import
numpy
as
np
import
cv2
...
...
@@ -30,6 +39,8 @@ def make_image():
return
img
if
__name__
==
'__main__'
:
print
__doc__
img
=
make_image
()
h
,
w
=
img
.
shape
[:
2
]
...
...
samples/python2/edge.py
View file @
d49c697f
'''
This sample demonstrates Canny edge detection.
Usage:
edge.py [<video source>]
Trackbars control edge thresholds.
'''
import
cv2
import
video
import
sys
if
__name__
==
'__main__'
:
print
__doc__
try
:
fn
=
sys
.
argv
[
1
]
except
:
fn
=
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