#include <opencv2/imgproc/imgproc.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
int levels = 3;
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++ )