Functions | Variables
arUtil.c File Reference
#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>
Include dependency graph for backup/lib/SRC/AR/arUtil.c:

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.
ARUint8arImage = NULL
 internal image
ARUint8arImageL = NULL
int arImageProcMode = DEFAULT_IMAGE_PROC_MODE
 define the image size mode for marker detection.
ARUint8arImageR = 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

Function Documentation

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.

Parameters:
x_coordX coordinate of points
y_coordY coordinate of points
coord_numnumber of points
vertexXXXBK
lineXXXBK
vXXXBK
Returns:
XXXBK

Definition at line 86 of file backup/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 backup/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.

Parameters:
versionStringRefIf 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.
Returns:
Returns the full version number of the ARToolKit in binary coded decimal (BCD) format. BCD format allows simple tests of version number in the caller e.g. if ((arGetVersion(NULL) >> 16) > 0x0272) printf("This release is later than 2.72\n"); The major version number is encoded in the most-significant byte (bits 31-24), the minor version number in the second-most-significant byte (bits 23-16), the tiny version number in the third-most-significant byte (bits 15-8), and the build version number in the least-significant byte (bits 7-0).

Definition at line 40 of file backup/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.

Parameters:
paramthe camera parameter structure
Returns:
always 0

Definition at line 66 of file backup/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 backup/lib/SRC/AR/arUtil.c.

int arsInitCparam ( ARSParam sparam)

Definition at line 75 of file backup/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.

Parameters:
msource matrix
qa rotation represented by a quaternion.
pa translation represented by a vector.
Returns:
0 if the extraction success, -1 otherwise (quaternion not normalize)

Definition at line 191 of file backup/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.

Parameters:
smatrix input
dresulted inverse matrix.
Returns:
0 if the inversion success, -1 otherwise
Remarks:
input matrix can be also output matrix

Definition at line 167 of file backup/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.

Parameters:
s1first matrix.
s2second matrix.
dresulted multiplication matrix.
Returns:
0 if the multiplication success, -1 otherwise

Definition at line 151 of file backup/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.

Parameters:
qa rotation represented by a quaternion.
pa translation represented by a vector.
mdestination matrix
Returns:
always 0

Definition at line 211 of file backup/lib/SRC/AR/arUtil.c.

void arUtilSleep ( int  msec)

sleep the actual thread.

Sleep the actual thread.

Parameters:
msectime to sleep (in millisecond)

Definition at line 301 of file backup/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.

Returns:
elapsed time (in milliseconds)

Definition at line 251 of file backup/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 backup/lib/SRC/AR/arUtil.c.


Variable Documentation

int arDebug = 0

activate artoolkit debug mode

control debug informations in ARToolKit. the possible values are:

  • 0: not in debug mode
  • 1: in debug mode by default: 0

Definition at line 26 of file backup/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:

  • AR_FITTING_TO_INPUT: input image
  • AR_FITTING_TO_IDEAL: compensated image by default: DEFAULT_FITTING_MODE in config.h

Definition at line 28 of file backup/lib/SRC/AR/arUtil.c.

ARUint8* arImage = NULL

internal image

internal image used. (access only for debugging ARToolKit) by default: NULL

Definition at line 27 of file backup/lib/SRC/AR/arUtil.c.

ARUint8* arImageL = NULL

Definition at line 35 of file backup/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 :

  • AR_IMAGE_PROC_IN_FULL: full image uses.
  • AR_IMAGE_PROC_IN_HALF: half image uses. by default: DEFAULT_IMAGE_PROC_MODE in config.h

Definition at line 29 of file backup/lib/SRC/AR/arUtil.c.

ARUint8* arImageR = NULL

Definition at line 36 of file backup/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 backup/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 backup/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 backup/lib/SRC/AR/arUtil.c.

internal intrinsic camera parameter

internal variable for camera intrinsic parameters

Definition at line 30 of file backup/lib/SRC/AR/arUtil.c.

double arsMatR2L[3][4]

Definition at line 38 of file backup/lib/SRC/AR/arUtil.c.

Definition at line 37 of file backup/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 backup/lib/SRC/AR/arUtil.c.

int sms [static]

Definition at line 249 of file backup/lib/SRC/AR/arUtil.c.

int ss [static]

Definition at line 249 of file backup/lib/SRC/AR/arUtil.c.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


ar_recog
Author(s): Graylin Trevor Jay and Christopher Crick
autogenerated on Fri Jan 25 2013 12:15:00