ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
Macros | Functions
matching.c File Reference
#include <ARX/AR/ar.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <ARX/AR2/tracking.h>
#include <ARX/AR2/config.h>
#include <ARX/AR2/template.h>
Include dependency graph for matching.c:

Macros

#define USE_SEARCH1   1
 
#define USE_SEARCH2   1
 
#define USE_SEARCH3   1
 
#define SKIP_INTERVAL   3
 
#define KEEP_NUM   3
 

Functions

int ar2GetBestMatching (ARUint8 *img, ARUint8 *mfImage, int xsize, int ysize, AR_PIXEL_FORMAT pixFormat, AR2TemplateT *mtemp, int rx, int ry, int search[3][2], int *bx, int *by, float *val)
 Get best match for a candidate feature template. More...
 

Macro Definition Documentation

◆ KEEP_NUM

#define KEEP_NUM   3

◆ SKIP_INTERVAL

#define SKIP_INTERVAL   3

◆ USE_SEARCH1

#define USE_SEARCH1   1

◆ USE_SEARCH2

#define USE_SEARCH2   1

◆ USE_SEARCH3

#define USE_SEARCH3   1

Function Documentation

◆ ar2GetBestMatching()

int ar2GetBestMatching ( ARUint8 img,
ARUint8 mfImage,
int  xsize,
int  ysize,
AR_PIXEL_FORMAT  pixFormat,
AR2TemplateT mtemp,
int  rx,
int  ry,
int  search[3][2],
int *  bx,
int *  by,
float *  val 
)

Get best match for a candidate feature template.

Parameters
imgIncoming image to match against.
mfImageBuffer same size as img, to provide working memory for status of matched features.
xsizeHorizontal size of img and mfImage.
ysizeVertical size of img and mfImage.
pixFormatPixel format of img.
mtempTemplate undergoing matching.
rxsearch radius in x dimension.
rysearch radius in y dimension.
searchscreen coordinates (second dimension is x and y) for up to three previous positions of this feature.
bxOn return, x position of best candidate.
byOn return, y position of best candidate.
valOn return, the quality of the match of the best candidate.
Returns
-1 in case of error or no match, or 0 otherwise.