36 #include <visp3/core/vpConfig.h>
40 #include <visp3/detection/vpDetectorQRCode.h>
46 vpDetectorQRCode::vpDetectorQRCode() : m_scanner()
49 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
60 bool detected =
false;
65 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
70 zbar::Image img(width, height,
"Y800", I.
bitmap, (
unsigned long)(width * height));
73 m_nb_objects = (size_t)m_scanner.scan(img);
76 for (zbar::Image::SymbolIterator symbol = img.symbol_begin(); symbol != img.symbol_end(); ++symbol) {
77 m_message.push_back(symbol->get_data());
80 std::vector<vpImagePoint> polygon;
81 for (
unsigned int i = 0; i < (
unsigned int)symbol->get_location_size(); i++) {
82 polygon.push_back(
vpImagePoint(symbol->get_location_y(i), symbol->get_location_x(i)));
84 m_polygon.push_back(polygon);
88 img.set_data(
nullptr, 0);
93 #elif !defined(VISP_BUILD_SHARED_LIBS)
96 void dummy_vpDetectorQRCode() { };
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
Type * bitmap
points toward the bitmap
unsigned int getHeight() const