36 #include <visp3/core/vpConfig.h>
40 #include <visp3/detection/vpDetectorQRCode.h>
48 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
59 bool detected =
false;
64 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
69 zbar::Image img(width, height,
"Y800", I.
bitmap, (
unsigned long)(width * height));
75 for (zbar::Image::SymbolIterator symbol = img.symbol_begin(); symbol != img.symbol_end(); ++symbol) {
79 std::vector<vpImagePoint> polygon;
80 for (
unsigned int i = 0; i < (
unsigned int)symbol->get_location_size(); i++) {
81 polygon.push_back(
vpImagePoint(symbol->get_location_y(i), symbol->get_location_x(i)));
87 img.set_data(
nullptr, 0);
91 #elif !defined(VISP_BUILD_SHARED_LIBS)
94 void dummy_vpDetectorQRCode(){};
std::vector< std::string > m_message
Message attached to each object.
std::vector< std::vector< vpImagePoint > > m_polygon
For each object, defines the polygon that contains the object.
size_t m_nb_objects
Number of detected objects.
zbar::ImageScanner m_scanner
QR code detector.
bool detect(const vpImage< unsigned char > &I) override
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