2 #include <visp3/gui/vpDisplayGDI.h> 3 #include <visp3/gui/vpDisplayOpenCV.h> 4 #include <visp3/gui/vpDisplayX.h> 5 #include <visp3/io/vpVideoReader.h> 7 #include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h> 8 #include <visp3/tt/vpTemplateTrackerWarpHomography.h> 11 int main(
int argc,
char **argv)
13 #if defined(VISP_HAVE_OPENCV) && (VISP_HAVE_OPENCV_VERSION >= 0x020100) 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;
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
Display for windows using GDI (available on any windows 32 platform).
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
static void flush(const vpImage< unsigned char > &I)
void open(vpImage< vpRGBa > &I)
Implementation of an homography and operations on homographies.
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
void acquire(vpImage< vpRGBa > &I)
void setFileName(const char *filename)
Implementation of column vector and the associated operations.
vpHomography getHomography(const vpColVector &ParamM) const