41 #include <visp3/core/vpConfig.h> 47 #include <visp3/detection/vpDetectorDataMatrixCode.h> 62 bool detected =
false;
74 dec = dmtxDecodeCreate(img, 1);
79 reg = dmtxRegionFindNext(dec, 0);
82 msg = dmtxDecodeMatrixRegion(dec, reg, DmtxUndefined);
85 std::vector<vpImagePoint> polygon;
87 DmtxVector2 p00, p10, p11, p01;
89 p00.X = p00.Y = p10.Y = p01.X = 0.0;
90 p10.X = p01.Y = p11.X = p11.Y = 1.0;
91 dmtxMatrix3VMultiplyBy(&p00, reg->fit2raw);
92 dmtxMatrix3VMultiplyBy(&p10, reg->fit2raw);
93 dmtxMatrix3VMultiplyBy(&p11, reg->fit2raw);
94 dmtxMatrix3VMultiplyBy(&p01, reg->fit2raw);
103 m_message.push_back((
const char *)msg->output);
109 dmtxMessageDestroy(&msg);
113 dmtxRegionDestroy(®);
117 dmtxDecodeDestroy(&dec);
118 dmtxImageDestroy(&img);
122 #elif !defined(VISP_BUILD_SHARED_LIBS) 125 void dummy_vpDetectorDataMatrixCode(){};
Type * bitmap
points toward the bitmap
size_t m_nb_objects
Number of detected objects.
vpDetectorDataMatrixCode()
unsigned int getHeight() const
bool detect(const vpImage< unsigned char > &I)
std::vector< std::vector< vpImagePoint > > m_polygon
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
unsigned int getWidth() const
std::vector< std::string > m_message
Message attached to each object.