added help

This commit is contained in:
Gary Bradski 2010-12-02 09:40:58 +00:00
parent 68c41a6c6c
commit f960d61faf

View File

@ -1,6 +1,15 @@
#include <opencv2/video/tracking.hpp> #include <opencv2/video/tracking.hpp>
#include <opencv2/highgui/highgui.hpp> #include <opencv2/highgui/highgui.hpp>
#include <stdio.h>
void help()
{
printf(
"This program demonstrate dense \"Farneback\n optical flow\n"
"It read from camera 0, and shows how to use and display dense Franeback optical flow\n"
"Call:\n"
"./fback_c\n\n");
}
void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step, void drawOptFlowMap(const CvMat* flow, CvMat* cflowmap, int step,
double scale, CvScalar color) double scale, CvScalar color)
{ {
@ -20,6 +29,8 @@ int main(int argc, char** argv)
CvCapture* capture = cvCreateCameraCapture(0); CvCapture* capture = cvCreateCameraCapture(0);
CvMat* prevgray = 0, *gray = 0, *flow = 0, *cflow = 0; CvMat* prevgray = 0, *gray = 0, *flow = 0, *cflow = 0;
help();
if( !capture ) if( !capture )
return -1; return -1;