39 #include <visp3/core/vpConfig.h> 43 #include <visp3/detection/vpDetectorQRCode.h> 51 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
62 bool detected =
false;
67 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
72 zbar::Image img(width, height,
"Y800", I.
bitmap, (
unsigned long)(width * height));
78 for (zbar::Image::SymbolIterator symbol = img.symbol_begin(); symbol != img.symbol_end(); ++symbol) {
82 std::vector<vpImagePoint> polygon;
83 for (
unsigned int i = 0; i < (
unsigned int)symbol->get_location_size(); i++) {
84 polygon.push_back(
vpImagePoint(symbol->get_location_y(i), symbol->get_location_x(i)));
90 img.set_data(NULL, 0);
94 #elif !defined(VISP_BUILD_SHARED_LIBS) 97 void dummy_vpDetectorQRCode(){};
unsigned int getWidth() const
Type * bitmap
points toward the bitmap
bool detect(const vpImage< unsigned char > &I)
size_t m_nb_objects
Number of detected objects.
zbar::ImageScanner m_scanner
QR code detector.
std::vector< std::vector< vpImagePoint > > m_polygon
unsigned int getHeight() const
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
std::vector< std::string > m_message
Message attached to each object.