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
4d5149e1
Commit
4d5149e1
authored
Dec 01, 2010
by
Gary Bradski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
created docs
parent
57f7678d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
contours.c
samples/c/contours.c
+14
-1
No files found.
samples/c/contours.c
View file @
4d5149e1
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
void
help
()
{
printf
(
"
\n
This program creates an image to demonstrate the use of the
\"
c
\"
contour
\n
"
"functions: cvFindContours() and cvApproxPoly() along with the storage
\n
"
"functions cvCreateMemStorage() and cvDrawContours().
\n
"
"It also shows the use of a trackbar to control contour retrieval.
\n
"
"
\n
"
"Call:
\n
"
"./contours
\n
"
);
}
#define w 500
int
levels
=
3
;
...
...
@@ -18,12 +29,14 @@ void on_trackbar(int pos)
cvReleaseImage
(
&
cnt_img
);
}
int
main
(
int
argc
,
char
**
argv
)
{
int
i
,
j
;
CvMemStorage
*
storage
=
cvCreateMemStorage
(
0
);
IplImage
*
img
=
cvCreateImage
(
cvSize
(
w
,
w
),
8
,
1
);
help
();
cvZero
(
img
);
for
(
i
=
0
;
i
<
6
;
i
++
)
...
...
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