From: Gary Bradski Date: Thu, 2 Dec 2010 23:31:18 +0000 (+0000) Subject: Created output doc help() file. X-Git-Tag: accepted/2.0/20130307.220821~3972 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a4385b18b1f9f2a390d814f4c780dd2f77f4a048;p=profile%2Fivi%2Fopencv.git Created output doc help() file. --- diff --git a/samples/c/kalman.c b/samples/c/kalman.c index d04d477..9784400 100644 --- a/samples/c/kalman.c +++ b/samples/c/kalman.c @@ -1,23 +1,30 @@ -/* - Tracking of rotating point. - Rotation speed is constant. - Both state and measurements vectors are 1D (a point angle), - Measurement is the real point angle + gaussian noise. - The real and the estimated points are connected with yellow line segment, - the real and the measured points are connected with red line segment. - (if Kalman filter works correctly, - the yellow segment should be shorter than the red one). - Pressing any key (except ESC) will reset the tracking with a different speed. - Pressing ESC will stop the program. -*/ - #include "opencv2/video/tracking.hpp" #include "opencv2/highgui/highgui.hpp" +#include +void help() +{ + printf( "\nExamle of c calls to OpenCV's Kalman filter.\n" +" Tracking of rotating point.\n" +" Rotation speed is constant.\n" +" Both state and measurements vectors are 1D (a point angle),\n" +" Measurement is the real point angle + gaussian noise.\n" +" The real and the estimated points are connected with yellow line segment,\n" +" the real and the measured points are connected with red line segment.\n" +" (if Kalman filter works correctly,\n" +" the yellow segment should be shorter than the red one).\n" + "\n" +" Pressing any key (except ESC) will reset the tracking with a different speed.\n" +" Pressing ESC will stop the program.\n" + ); +} + + + int main(int argc, char** argv) { const float A[] = { 1, 1, 0, 1 }; - + help(); IplImage* img = cvCreateImage( cvSize(500,500), 8, 3 ); CvKalman* kalman = cvCreateKalman( 2, 1, 0 ); CvMat* state = cvCreateMat( 2, 1, CV_32FC1 ); /* (phi, delta_phi) */