38 #include <visp3/core/vpConfig.h>
42 #include <visp3/detection/vpDetectorQRCode.h>
51 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
61 bool detected =
false;
66 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
71 zbar::Image img(width, height,
"Y800", I.
bitmap, (
unsigned long)(width * height));
77 for(zbar::Image::SymbolIterator symbol = img.symbol_begin();
78 symbol != img.symbol_end();
80 m_message.push_back( symbol->get_data() );
83 std::vector<vpImagePoint> polygon;
84 for(
unsigned int i=0; i < (
unsigned int)symbol->get_location_size(); i++){
85 polygon.push_back(
vpImagePoint(symbol->get_location_y(i), symbol->get_location_x(i)));
91 img.set_data(NULL, 0);
95 #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.
std::vector< std::string > m_message
Message attached to each object.
zbar::ImageScanner m_scanner
QR code detector.
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::vector< vpImagePoint > > m_polygon
For each object, defines the polygon that contains the object.