MarkerData contains matrix of Hamming encoded data. More...
#include <Marker.h>
Public Types | |
enum | MarkerContentType { MARKER_CONTENT_TYPE_NUMBER, MARKER_CONTENT_TYPE_STRING, MARKER_CONTENT_TYPE_FILE, MARKER_CONTENT_TYPE_HTTP } |
Public Member Functions | |
bool | DecodeContent (int *orientation) |
DecodeContent should be called after UpdateContent to fill content_type, decode_error and data | |
unsigned long | GetId () const |
Get ID for recognizing this marker. | |
MarkerData (double _edge_length=0, int _res=0, double _margin=0) | |
Default constructor. | |
void | SetContent (MarkerContentType content_type, unsigned long id, const char *str, bool force_strong_hamming=false, bool verbose=false) |
Updates the marker_content by "encoding" the given parameters. | |
void | SetId (unsigned long _id) |
Set the ID. | |
virtual bool | UpdateContent (std::vector< Point< CvPoint2D64f > > &_marker_corners_img, IplImage *gray, Camera *cam, int frame_no=0) |
Updates the marker_content from the image using Homography Compared to the basic implementation in Marker this will also detect the marker resolution automatically when the marker resolution is specified to be 0. | |
Public Attributes | |
unsigned char | content_type |
union { | |
unsigned long id | |
char str [MAX_MARKER_STRING_LEN] | |
} | data |
MarkerData content can be presented either as number (MARKER_CONTENT_TYPE_NUMBER) or string | |
Static Public Attributes | |
static EIGEN_MAKE_ALIGNED_OPERATOR_NEW const int | MAX_MARKER_STRING_LEN = 2048 |
Protected Member Functions | |
void | Add6bitStr (BitsetExt *bs, char *s) |
int | DecodeCode (int orientation, BitsetExt *bs, int *erroneous, int *total, unsigned char *content_type) |
void | DecodeOrientation (int *error, int *total, int *orientation) |
bool | DetectResolution (std::vector< Point< CvPoint2D64f > > &_marker_corners_img, IplImage *gray, Camera *cam) |
void | Read6bitStr (BitsetExt *bs, char *s, size_t s_max_len) |
int | UsableDataBits (int marker_res, int hamming) |
virtual void | VisualizeMarkerContent (IplImage *image, Camera *cam, double datatext_point[2], double content_point[2]) const |
MarkerData contains matrix of Hamming encoded data.
alvar::MarkerData::MarkerData | ( | double | _edge_length = 0 , |
int | _res = 0 , |
||
double | _margin = 0 |
||
) | [inline] |
Default constructor.
_edge_length | Length of the marker's edge in whatever units you are using (e.g. cm) |
_res | The marker content resolution in pixels (this is actually |
_margin | The marker margin resolution in pixels (The actual captured marker image has pixel resolution of _margin+_res+_margin) |
void alvar::MarkerData::Add6bitStr | ( | BitsetExt * | bs, |
char * | s | ||
) | [protected] |
Definition at line 906 of file Marker.cpp.
int alvar::MarkerData::DecodeCode | ( | int | orientation, |
BitsetExt * | bs, | ||
int * | erroneous, | ||
int * | total, | ||
unsigned char * | content_type | ||
) | [protected] |
Definition at line 771 of file Marker.cpp.
bool alvar::MarkerData::DecodeContent | ( | int * | orientation | ) | [virtual] |
DecodeContent should be called after UpdateContent to fill content_type, decode_error and data
Reimplemented from alvar::Marker.
Definition at line 878 of file Marker.cpp.
void alvar::MarkerData::DecodeOrientation | ( | int * | error, |
int * | total, | ||
int * | orientation | ||
) | [protected] |
Definition at line 632 of file Marker.cpp.
bool alvar::MarkerData::DetectResolution | ( | std::vector< Point< CvPoint2D64f > > & | _marker_corners_img, |
IplImage * | gray, | ||
Camera * | cam | ||
) | [protected] |
Definition at line 670 of file Marker.cpp.
unsigned long alvar::MarkerData::GetId | ( | ) | const [inline, virtual] |
Get ID for recognizing this marker.
Reimplemented from alvar::Marker.
void alvar::MarkerData::Read6bitStr | ( | BitsetExt * | bs, |
char * | s, | ||
size_t | s_max_len | ||
) | [protected] |
Definition at line 829 of file Marker.cpp.
void alvar::MarkerData::SetContent | ( | MarkerContentType | content_type, |
unsigned long | id, | ||
const char * | str, | ||
bool | force_strong_hamming = false , |
||
bool | verbose = false |
||
) |
Updates the marker_content by "encoding" the given parameters.
Definition at line 957 of file Marker.cpp.
void alvar::MarkerData::SetId | ( | unsigned long | _id | ) | [inline, virtual] |
bool alvar::MarkerData::UpdateContent | ( | std::vector< Point< CvPoint2D64f > > & | _marker_corners_img, |
IplImage * | gray, | ||
Camera * | cam, | ||
int | frame_no = 0 |
||
) | [virtual] |
Updates the marker_content from the image using Homography Compared to the basic implementation in Marker this will also detect the marker resolution automatically when the marker resolution is specified to be 0.
Reimplemented from alvar::Marker.
Definition at line 764 of file Marker.cpp.
int alvar::MarkerData::UsableDataBits | ( | int | marker_res, |
int | hamming | ||
) | [protected] |
Definition at line 945 of file Marker.cpp.
void alvar::MarkerData::VisualizeMarkerContent | ( | IplImage * | image, |
Camera * | cam, | ||
double | datatext_point[2], | ||
double | content_point[2] | ||
) | const [protected, virtual] |
Reimplemented from alvar::Marker.
Definition at line 107 of file Marker.cpp.
unsigned char alvar::MarkerData::content_type |
union { ... } alvar::MarkerData::data |
MarkerData content can be presented either as number (MARKER_CONTENT_TYPE_NUMBER) or string
unsigned long alvar::MarkerData::id |
EIGEN_MAKE_ALIGNED_OPERATOR_NEW const int alvar::MarkerData::MAX_MARKER_STRING_LEN = 2048 [static] |