From c10225bd281257a50518f70003b8f40aed3f6c4a Mon Sep 17 00:00:00 2001 From: Gary Bradski Date: Fri, 3 Dec 2010 00:29:27 +0000 Subject: [PATCH] docs --- samples/c/motempl.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/samples/c/motempl.c b/samples/c/motempl.c index 14354f0..18e33a5 100644 --- a/samples/c/motempl.c +++ b/samples/c/motempl.c @@ -2,7 +2,19 @@ #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" #include +#include +void help() +{ + printf( + "\nThis program demonstrated the use of motion templates -- basically using the gradients\n" + "of thresholded layers of decaying frame differencing. New movements are stamped on top with floating system\n" + "time code and motions too old are thresholded away. This is the 'motion history file'. The program reads from the camera of your choice or from\n" + "a file. Gradients of motion history are used to detect direction of motoin etc\n" + "Call:\n" + "./motempl [camera number 0-n or file name, default is camera 0]\n" + ); +} // various tracking parameters (in seconds) const double MHI_DURATION = 1; const double MAX_TIME_DELTA = 0.5; @@ -147,7 +159,7 @@ int main(int argc, char** argv) { IplImage* motion = 0; CvCapture* capture = 0; - + help(); if( argc == 1 || (argc == 2 && strlen(argv[1]) == 1 && isdigit(argv[1][0]))) capture = cvCaptureFromCAM( argc == 2 ? argv[1][0] - '0' : 0 ); else if( argc == 2 ) -- 2.7.4