2#include <visp3/core/vpConfig.h>
3#include <visp3/gui/vpDisplayFactory.h>
4#include <visp3/io/vpVideoReader.h>
6#include <visp3/tt/vpTemplateTrackerSSDInverseCompositional.h>
7#include <visp3/tt/vpTemplateTrackerWarpHomography.h>
10int main(
int argc,
char **argv)
12#if defined(VISP_HAVE_OPENCV)
13#ifdef ENABLE_VISP_NAMESPACE
16 std::string opt_videoname =
"bruegel.mp4";
17 unsigned int opt_subsample = 1;
19 for (
int i = 1;
i < argc;
i++) {
20 if (std::string(argv[i]) ==
"--videoname" && i + 1 < argc) {
21 opt_videoname = std::string(argv[++i]);
23 else if (std::string(argv[i]) ==
"--subsample" && i + 1 < argc) {
24 opt_subsample =
static_cast<unsigned int>(std::atoi(argv[++i]));
26 else if (std::string(argv[i]) ==
"--help" || std::string(argv[i]) ==
"-h") {
27 std::cout <<
"\nUsage: " << argv[0]
28 <<
" [--videoname <video name>]"
29 <<
" [--subsample <scale factor>] [--help] [-h]\n"
35 std::cout <<
"Video name: " << opt_videoname << std::endl;
42 Iacq.
subsample(opt_subsample, opt_subsample, I);
44#if defined(VISP_HAVE_DISPLAY)
45#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
51 std::cout <<
"No image viewer is available..." << std::endl;
73 Iacq.
subsample(opt_subsample, opt_subsample, I);
83 std::cout <<
"Homography: \n" << H << std::endl;
101#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11) && defined(VISP_HAVE_DISPLAY)
102 if (display !=
nullptr) {
Implementation of column vector and the associated operations.
Class that defines generic functionalities for display.
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
unsigned int getDownScalingFactor()
static void displayText(const vpImage< unsigned char > &I, const vpImagePoint &ip, const std::string &s, const vpColor &color)
Implementation of an homography and operations on homographies.
Definition of the vpImage class member functions.
void subsample(unsigned int v_scale, unsigned int h_scale, vpImage< Type > &sampled) const
vpHomography getHomography(const vpColVector &ParamM) const
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
bool isVideoFormat() const
void open(vpImage< vpRGBa > &I) VP_OVERRIDE
void setFileName(const std::string &filename)
void acquire(vpImage< vpRGBa > &I) VP_OVERRIDE
std::shared_ptr< vpDisplay > createDisplay()
Return a smart pointer vpDisplay specialization if a GUI library is available or nullptr otherwise.
vpDisplay * allocateDisplay()
Return a newly allocated vpDisplay specialization if a GUI library is available or nullptr otherwise.
VISP_EXPORT double measureTimeMs()
VISP_EXPORT int wait(double t0, double t)