2 #include <visp/vpDisplayGDI.h>
3 #include <visp/vpDisplayX.h>
4 #include <visp/vpDisplayOpenCV.h>
5 #include <visp/vpVideoReader.h>
7 #include <visp/vpTemplateTrackerSSDInverseCompositional.h>
8 #include <visp/vpTemplateTrackerWarpHomography.h>
11 int main(
int argc,
char** argv)
13 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100) || defined(VISP_HAVE_FFMPEG)
14 std::string videoname =
"bruegel.mpg";
16 for (
int i=0; i<argc; i++) {
17 if (std::string(argv[i]) ==
"--videoname")
18 videoname = std::string(argv[i+1]);
19 else if (std::string(argv[i]) ==
"--help") {
20 std::cout <<
"\nUsage: " << argv[0] <<
" [--name <video name>] [--help]\n" << std::endl;
25 std::cout <<
"Video name: " << videoname << std::endl;
33 #if defined(VISP_HAVE_X11)
35 #elif defined(VISP_HAVE_GDI)
37 #elif defined(VISP_HAVE_OPENCV)
40 std::cout <<
"No image viewer is available..." << std::endl;
43 display.
init(I, 100, 100,
"Template tracker");
52 tracker.setSampling(2, 2);
53 tracker.setLambda(0.001);
54 tracker.setIterationMax(200);
55 tracker.setPyramidal(2, 1);
72 std::cout <<
"Homography: \n" << H << std::endl;
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const char *title=NULL)
Display for windows using GDI (available on any windows 32 platform).
Define the X11 console to display images.
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
static void flush(const vpImage< unsigned char > &I)
void open(vpImage< vpRGBa > &I)
This class aims to compute the homography wrt.two images.
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the opencv library.
void acquire(vpImage< vpRGBa > &I)
void setFileName(const char *filename)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
virtual bool getClick(bool blocking=true)=0
vpHomography getHomography(const vpColVector &ParamM) const