Notes: ARToolkitPlus for OpenCV
1. Complie ARToolKitPlus with g++-4.1 unless it succeeds
2. Pattern
PATTERN_IMAGE_WIDTH is the number of columns of a pattern. A marker consists of a border and patterns inside of the border.
So, marker of simple-id consists of 6x6 patterns. Widths of borders are 0.25 and 0.125.
You can print a pattern found under id-markers directory by enlarging it with some tools; ALSEE for my case.
3. Simple-id stores 9bits number. so it can represent 0-511. 2^9=512.
4. ARTKP supports three formats: RGBA (32 bits), RGB (16bits), Gray (8bits)
ARTKPsupports three detection methods: template matching, Simple-ID and BCHencoding. But it seems to support only ID based methods.
5. bpp in the source code represents depth. So 1 for grayscale input, 3 for RGB input.
6. Markers are already stored in memory when a program starts. A marker is not searched in real-time.
7. Border width is very important. Use the right width for the certain image.
For thin simple ID or BCH encoding, use 0.125.
For standard simple ID, use 0.25
8. Use OpenCV to capture images and use ARToolkitPlus functions
IplImage* image= cvCreateImage( imgSize, IPL_DEPTH_8U, 3 );
IplImage* grayImage= cvCreateImage( imgSize, IPL_DEPTH_8U, 1 );
tracker->setPixelFormat(ARToolKitPlus::PIXEL_FORMAT_LUM); // gray input
cvCvtColor( image, grayImage, CV_RGB2GRAY );
ARToolKitPlus::ARMarkerInfo* marker_info;
int numMarkers= 0;
int markerId = tracker->calc( arImage, -1, true, &marker_info, &numMarkers );
Source code (not documented)
Trackback URL : http://altruisticrobot.tistory.com/trackback/242