#include <stdio.h>
#include <math.h>
#include <string.h>
#include <sys/time.h>
#include <AR/param.h>
#include <AR/matrix.h>
#include <AR/ar.h>
Go to the source code of this file.
Functions | |
int | arGetLine (int x_coord[], int y_coord[], int coord_num, int vertex[], double line[4][3], double v[4][2]) |
estimate a line from a list of point. | |
static int | arGetLine2 (int x_coord[], int y_coord[], int coord_num, int vertex[], double line[4][3], double v[4][2], double *dist_factor) |
ARUint32 | arGetVersion (char **versionStringRef) |
Get the ARToolKit version information in numberic and string format. | |
int | arInitCparam (ARParam *param) |
initialize camera parameters. | |
int | arsGetLine (int x_coord[], int y_coord[], int coord_num, int vertex[], double line[4][3], double v[4][2], int LorR) |
int | arsInitCparam (ARSParam *sparam) |
int | arUtilMat2QuatPos (double m[3][4], double q[4], double p[3]) |
extract a quaternion/position of matrix. | |
int | arUtilMatInv (double s[3][4], double d[3][4]) |
Inverse a non-square matrix. | |
int | arUtilMatMul (double s1[3][4], double s2[3][4], double d[3][4]) |
Multiplication of two matrix. | |
int | arUtilQuatPos2Mat (double q[4], double p[3], double m[3][4]) |
create a matrix with a quaternion/position. | |
void | arUtilSleep (int msec) |
sleep the actual thread. | |
double | arUtilTimer (void) |
get the time with the ARToolkit timer. | |
void | arUtilTimerReset (void) |
reset the internal timer of ARToolkit. | |
Variables | |
int | arDebug = 0 |
activate artoolkit debug mode | |
int | arFittingMode = DEFAULT_FITTING_MODE |
fitting display mode use by ARToolkit. | |
ARUint8 * | arImage = NULL |
internal image | |
ARUint8 * | arImageL = NULL |
int | arImageProcMode = DEFAULT_IMAGE_PROC_MODE |
define the image size mode for marker detection. | |
ARUint8 * | arImageR = NULL |
int | arImXsize |
internal image size in width. | |
int | arImYsize |
internal image size in heigth | |
int | arMatchingPCAMode = DEFAULT_MATCHING_PCA_MODE |
XXXBK. | |
ARParam | arParam |
internal intrinsic camera parameter | |
double | arsMatR2L [3][4] |
ARSParam | arsParam |
int | arTemplateMatchingMode = DEFAULT_TEMPLATE_MATCHING_MODE |
XXXBK. | |
static int | sms |
static int | ss |
int arGetLine | ( | int | x_coord[], |
int | y_coord[], | ||
int | coord_num, | ||
int | vertex[], | ||
double | line[4][3], | ||
double | v[4][2] | ||
) |
estimate a line from a list of point.
Compute a linear regression from a list of point.
x_coord | X coordinate of points |
y_coord | Y coordinate of points |
coord_num | number of points |
vertex | XXXBK |
line | XXXBK |
v | XXXBK |
Definition at line 86 of file lib/SRC/AR/arUtil.c.
static int arGetLine2 | ( | int | x_coord[], |
int | y_coord[], | ||
int | coord_num, | ||
int | vertex[], | ||
double | line[4][3], | ||
double | v[4][2], | ||
double * | dist_factor | ||
) | [static] |
Definition at line 101 of file lib/SRC/AR/arUtil.c.
ARUint32 arGetVersion | ( | char ** | versionStringRef | ) |
Get the ARToolKit version information in numberic and string format.
As of version 2.72, ARToolKit now allows querying of the version number of the toolkit available at runtime. It is highly recommended that any calling program that depends on features in a certain ARToolKit version, check at runtime that it is linked to a version of ARToolKit that can supply those features. It is NOT sufficient to check the ARToolKit SDK header versions, since with ARToolKit implemented in dynamically-loaded libraries, there is no guarantee that the version of ARToolKit installed on the machine at run-time will as recent as the version of the ARToolKit SDK which the host program was compiled against. The version information is reported in binary-coded decimal format, and optionally in an ASCII string. See the config.h header for more discussion of the definition of major, minor, tiny and build version numbers.
versionStringRef | If non-NULL, the location pointed to will be filled with a pointer to a string containing the version information. Fields in the version string are separated by spaces. As of version 2.72.0, there is only one field implemented, and this field contains the major, minor and tiny version numbers in dotted-decimal format. The string is guaranteed to contain at least this field in all future versions of the toolkit. Later versions of the toolkit may add other fields to this string to report other types of version information. The storage for the string is malloc'ed inside the function. The caller is responsible for free'ing the string. |
Definition at line 40 of file lib/SRC/AR/arUtil.c.
int arInitCparam | ( | ARParam * | param | ) |
initialize camera parameters.
set the camera parameters specified in the camera parameters structure *param to static memory in the AR library. These camera parameters are typically read from a data file at program startup. In the video-see through AR applications, the default camera parameters are sufficient, no camera calibration is needed.
param | the camera parameter structure |
Definition at line 66 of file lib/SRC/AR/arUtil.c.
int arsGetLine | ( | int | x_coord[], |
int | y_coord[], | ||
int | coord_num, | ||
int | vertex[], | ||
double | line[4][3], | ||
double | v[4][2], | ||
int | LorR | ||
) |
Definition at line 92 of file lib/SRC/AR/arUtil.c.
int arsInitCparam | ( | ARSParam * | sparam | ) |
Definition at line 75 of file lib/SRC/AR/arUtil.c.
int arUtilMat2QuatPos | ( | double | m[3][4], |
double | q[4], | ||
double | p[3] | ||
) |
extract a quaternion/position of matrix.
Extract a rotation (quaternion format) and a position (vector format) from a transformation matrix. The precondition is an euclidian matrix.
m | source matrix |
q | a rotation represented by a quaternion. |
p | a translation represented by a vector. |
Definition at line 191 of file lib/SRC/AR/arUtil.c.
int arUtilMatInv | ( | double | s[3][4], |
double | d[3][4] | ||
) |
Inverse a non-square matrix.
Inverse a matrix in a non homogeneous format. The matrix need to be euclidian.
s | matrix input |
d | resulted inverse matrix. |
Definition at line 167 of file lib/SRC/AR/arUtil.c.
int arUtilMatMul | ( | double | s1[3][4], |
double | s2[3][4], | ||
double | d[3][4] | ||
) |
Multiplication of two matrix.
This procedure do a multiplication matrix between s1 and s2 and return the result in d : d=s1*s2. The precondition is the output matrix need to be different of input matrix. The precondition is euclidian matrix.
s1 | first matrix. |
s2 | second matrix. |
d | resulted multiplication matrix. |
Definition at line 151 of file lib/SRC/AR/arUtil.c.
int arUtilQuatPos2Mat | ( | double | q[4], |
double | p[3], | ||
double | m[3][4] | ||
) |
create a matrix with a quaternion/position.
Create a transformation matrix from a quaternion rotation and a vector translation.
q | a rotation represented by a quaternion. |
p | a translation represented by a vector. |
m | destination matrix |
Definition at line 211 of file lib/SRC/AR/arUtil.c.
void arUtilSleep | ( | int | msec | ) |
sleep the actual thread.
Sleep the actual thread.
msec | time to sleep (in millisecond) |
Definition at line 301 of file lib/SRC/AR/arUtil.c.
double arUtilTimer | ( | void | ) |
get the time with the ARToolkit timer.
Give the time elapsed since the reset of the timer.
Definition at line 251 of file lib/SRC/AR/arUtil.c.
void arUtilTimerReset | ( | void | ) |
reset the internal timer of ARToolkit.
Reset the internal timer used by ARToolKit. timer measurement (with arUtilTimer()).
Definition at line 280 of file lib/SRC/AR/arUtil.c.
int arDebug = 0 |
activate artoolkit debug mode
control debug informations in ARToolKit. the possible values are:
Definition at line 26 of file lib/SRC/AR/arUtil.c.
int arFittingMode = DEFAULT_FITTING_MODE |
fitting display mode use by ARToolkit.
Correction mode for the distorsion of the camera. You can enable a correction with a texture mapping. the possible values are:
Definition at line 28 of file lib/SRC/AR/arUtil.c.
internal image
internal image used. (access only for debugging ARToolKit) by default: NULL
Definition at line 27 of file lib/SRC/AR/arUtil.c.
Definition at line 35 of file lib/SRC/AR/arUtil.c.
int arImageProcMode = DEFAULT_IMAGE_PROC_MODE |
define the image size mode for marker detection.
Video image size for marker detection. This control if all the image is analyzed the possible values are :
Definition at line 29 of file lib/SRC/AR/arUtil.c.
Definition at line 36 of file lib/SRC/AR/arUtil.c.
int arImXsize |
internal image size in width.
internal image size in width (generally initialize in arInitCparam)
Definition at line 31 of file lib/SRC/AR/arUtil.c.
int arImYsize |
internal image size in heigth
internal image size in heigth (generally initialize in arInitCparam)
Definition at line 31 of file lib/SRC/AR/arUtil.c.
XXXBK.
XXXBK the possible values are : -AR_MATCHING_WITHOUT_PCA: without PCA -AR_MATCHING_WITH_PCA: with PCA by default: DEFAULT_MATCHING_PCA_MODE in config.h
Definition at line 33 of file lib/SRC/AR/arUtil.c.
internal intrinsic camera parameter
internal variable for camera intrinsic parameters
Definition at line 30 of file lib/SRC/AR/arUtil.c.
double arsMatR2L[3][4] |
Definition at line 38 of file lib/SRC/AR/arUtil.c.
Definition at line 37 of file lib/SRC/AR/arUtil.c.
XXXBK.
XXXBK the possible values are : AR_TEMPLATE_MATCHING_COLOR: Color Template AR_TEMPLATE_MATCHING_BW: BW Template by default: DEFAULT_TEMPLATE_MATCHING_MODE in config.h
Definition at line 32 of file lib/SRC/AR/arUtil.c.
int sms [static] |
Definition at line 249 of file lib/SRC/AR/arUtil.c.
int ss [static] |
Definition at line 249 of file lib/SRC/AR/arUtil.c.