41 #include <visp/vpConfig.h>
45 #include <visp/vpDetectorQRCode.h>
54 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
64 bool detected =
false;
69 m_scanner.set_config(zbar::ZBAR_NONE, zbar::ZBAR_CFG_ENABLE, 1);
74 zbar::Image img(width, height,
"Y800", I.
bitmap, (
unsigned long)(width * height));
80 for(zbar::Image::SymbolIterator symbol = img.symbol_begin();
81 symbol != img.symbol_end();
83 m_message.push_back( symbol->get_data() );
86 std::vector<vpImagePoint> polygon;
87 for(
unsigned int i=0; i < (
unsigned int)symbol->get_location_size(); i++){
88 polygon.push_back(
vpImagePoint(symbol->get_location_y(i), symbol->get_location_x(i)));
94 img.set_data(NULL, 0);
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.