mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 14:13:15 +08:00
created docs
This commit is contained in:
parent
57f7678db1
commit
4d5149e1ae
@ -1,5 +1,16 @@
|
|||||||
#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)
|
|||||||
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++ )
|
||||||
|
Loading…
Reference in New Issue
Block a user