arDetectMarker.c File Reference

#include <stdio.h>
#include <AR/ar.h>
Include dependency graph for arDetectMarker.c:

Go to the source code of this file.

Functions

int arDetectMarker (ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num)
 main function to detect the square markers in the video input frame.
int arDetectMarkerLite (ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num)
 main function to detect rapidly the square markers in the video input frame.
int arSavePatt (ARUint8 *image, ARMarkerInfo *marker_info, char *filename)
 save a marker.
int arsDetectMarker (ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num, int LorR)
int arsDetectMarkerLite (ARUint8 *dataPtr, int thresh, ARMarkerInfo **marker_info, int *marker_num, int LorR)

Variables

static ARMarkerInfo2marker_info2
static arPrevInfo prev_info [AR_SQUARE_MAX]
static int prev_num = 0
static arPrevInfo sprev_info [2][AR_SQUARE_MAX]
static int sprev_num [2] = {0,0}
static ARMarkerInfowmarker_info
static int wmarker_num = 0

Function Documentation

int arDetectMarker ( ARUint8 dataPtr,
int  thresh,
ARMarkerInfo **  marker_info,
int *  marker_num 
)

main function to detect the square markers in the video input frame.

This function proceeds to thresholding, labeling, contour extraction and line corner estimation (and maintains an history). It's one of the main function of the detection routine with arGetTransMat.

Parameters:
dataPtr a pointer to the color image which is to be searched for square markers. The pixel format depend of your architecture. Generally ABGR, but the images are treated as a gray scale, so the order of BGR components does not matter. However the ordering of the alpha comp, A, is important.
thresh specifies the threshold value (between 0-255) to be used to convert the input image into a binary image.
marker_info a pointer to an array of ARMarkerInfo structures returned which contain all the information about the detected squares in the image
marker_num the number of detected markers in the image.
Returns:
0 when the function completes normally, -1 otherwise

Definition at line 58 of file arDetectMarker.c.

int arDetectMarkerLite ( ARUint8 dataPtr,
int  thresh,
ARMarkerInfo **  marker_info,
int *  marker_num 
)

main function to detect rapidly the square markers in the video input frame.

this function is a simpler version of arDetectMarker that does not have the same error correction functions and so runs a little faster, but is more error prone

Parameters:
dataPtr a pointer to the color image which is to be searched for square markers. The pixel format depend of your architecture. Generally ABGR, but the images are treated as a gray scale, so the order of BGR components does not matter. However the ordering of the alpha component, A, is important.
thresh specifies the threshold value (between 0-255) to be used to convert the input image into a binary image.
marker_info a pointer to an array of ARMarkerInfo structures returned which contain all the information about the detected squares in the image
marker_num the number of detected markers in the image.
Returns:
0 when the function completes normally, -1 otherwise

Definition at line 175 of file arDetectMarker.c.

int arSavePatt ( ARUint8 image,
ARMarkerInfo marker_info,
char *  filename 
)

save a marker.

used in mk_patt to save a bitmap of the pattern of the currently detected marker. The saved image is a table of the normalized viewed pattern.

Parameters:
image a pointer to the image containing the marker pattern to be trained.
marker_info a pointer to the ARMarkerInfo structure of the pattern to be trained.
filename The name of the file where the bitmap image is to be saved.
Returns:
0 if the bitmap image is successfully saved, -1 otherwise.

Definition at line 14 of file arDetectMarker.c.

int arsDetectMarker ( ARUint8 dataPtr,
int  thresh,
ARMarkerInfo **  marker_info,
int *  marker_num,
int  LorR 
)

Definition at line 209 of file arDetectMarker.c.

int arsDetectMarkerLite ( ARUint8 dataPtr,
int  thresh,
ARMarkerInfo **  marker_info,
int *  marker_num,
int  LorR 
)

Definition at line 291 of file arDetectMarker.c.


Variable Documentation

Definition at line 4 of file arDetectMarker.c.

arPrevInfo prev_info[AR_SQUARE_MAX] [static]

Definition at line 8 of file arDetectMarker.c.

int prev_num = 0 [static]

Definition at line 9 of file arDetectMarker.c.

arPrevInfo sprev_info[2][AR_SQUARE_MAX] [static]

Definition at line 11 of file arDetectMarker.c.

int sprev_num[2] = {0,0} [static]

Definition at line 12 of file arDetectMarker.c.

Definition at line 5 of file arDetectMarker.c.

int wmarker_num = 0 [static]

Definition at line 6 of file arDetectMarker.c.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines


artoolkit
Author(s): Gautier Dumonteil
autogenerated on Fri Jan 11 10:05:45 2013