From 4d5149e1ae5e7d9d5dcd84cefe3b9953965efae1 Mon Sep 17 00:00:00 2001 From: Gary Bradski Date: Wed, 1 Dec 2010 08:28:00 +0000 Subject: [PATCH] created docs --- samples/c/contours.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/samples/c/contours.c b/samples/c/contours.c index 4af2d2a0c2..2fc8918488 100644 --- a/samples/c/contours.c +++ b/samples/c/contours.c @@ -1,5 +1,16 @@ #include #include +#include +void help() +{ + printf("\nThis 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++ )