Commit 4d5149e1 authored by Gary Bradski's avatar Gary Bradski

created docs

parent 57f7678d
#include <opencv2/imgproc/imgproc.hpp> #include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
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 #define w 500
int levels = 3; int levels = 3;
...@@ -18,12 +29,14 @@ void on_trackbar(int pos) ...@@ -18,12 +29,14 @@ void on_trackbar(int pos)
cvReleaseImage( &cnt_img ); cvReleaseImage( &cnt_img );
} }
int main( int argc, char** argv ) int main( int argc, char** argv )
{ {
int i, j; int i, j;
CvMemStorage* storage = cvCreateMemStorage(0); CvMemStorage* storage = cvCreateMemStorage(0);
IplImage* img = cvCreateImage( cvSize(w,w), 8, 1 ); IplImage* img = cvCreateImage( cvSize(w,w), 8, 1 );
help();
cvZero( img ); cvZero( img );
for( i=0; i < 6; i++ ) for( i=0; i < 6; i++ )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment