#include <visp3/detection/vpDetectorDataMatrixCode.h>
#include <visp3/detection/vpDetectorQRCode.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/io/vpImageIo.h>
int main(int argc, const char** argv)
{
#if (defined(VISP_HAVE_ZBAR) || defined(VISP_HAVE_DMTX)) && (defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV))
try {
#ifdef VISP_HAVE_X11
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_OPENCV)
#endif
#if (defined(VISP_HAVE_ZBAR) && defined(VISP_HAVE_DMTX))
int opt_barcode = 0;
for (int i=0; i<argc; i++) {
if (std::string(argv[i]) == "--code-type")
opt_barcode = atoi(argv[i+1]);
else if (std::string(argv[i]) == "--help") {
std::cout << "Usage: " << argv[0]
<< " [--code-type <0 for QRcode | 1 for DataMatrix>] [--help]"
<< std::endl;
return 0;
}
}
if (opt_barcode == 0)
else
#elif defined(VISP_HAVE_ZBAR)
(void)argc;
(void)argv;
#elif defined(VISP_HAVE_DMTX)
(void)argc;
(void)argv;
#endif
bool status = detector->
detect(I);
std::ostringstream legend;
if (status) {
std::vector<vpImagePoint> p = detector->
getPolygon(i);
for(size_t j=0; j < p.size(); j++) {
std::ostringstream number;
number << j;
}
}
}
delete detector;
}
std::cout << "Catch an exception: " << e << std::endl;
}
#else
(void)argc;
(void)argv;
#endif
}