ARX  1.0
The next-generation open source augmented reality toolkit.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
Functions
arPattCreateHandle.c File Reference
#include <ARX/AR/ar.h>
#include <stdio.h>
#include <math.h>
Include dependency graph for arPattCreateHandle.c:

Functions

ARPattHandlearPattCreateHandle (void)
 Allocate a pattern handle. More...
 
ARPattHandlearPattCreateHandle2 (const int pattSize, const int patternCountMax)
 Allocate a pattern handle and set pattern template size and maximum number of patterns loadable. More...
 
int arPattDeleteHandle (ARPattHandle *pattHandle)
 Free all loaded patterns and pattern handle. More...
 

Function Documentation

◆ arPattCreateHandle()

ARPattHandle * arPattCreateHandle ( void  )

Allocate a pattern handle.

@functiongroup "Pattern identification".

Allocates an empty pattern handle, into which patterns can be loaded by calling arPattLoad(). When the pattern handle is no longer needed, it should be freed by calling arPattDeleteHandle().

Note that a pattern handle is NOT required when using only matrix- code (2D barcode) markers.

See also
arPattLoad
arPattDeleteHandle
Returns
The created pattern handle, or NULL in case of error.
Here is the call graph for this function:

◆ arPattCreateHandle2()

ARPattHandle * arPattCreateHandle2 ( const int  pattSize,
const int  patternCountMax 
)

Allocate a pattern handle and set pattern template size and maximum number of patterns loadable.

Allocates an empty pattern handle, into which patterns can be loaded by calling arPattLoad(). When the pattern handle is no longer needed, it should be freed by calling arPattDeleteHandle().

Note that a pattern handle is NOT required when using only matrix- code (2D barcode) markers.

Parameters
pattSizeFor any square template (pattern) markers, the number of rows and columns in the template. May not be less than 16 or more than AR_PATT_SIZE1_MAX.

Pass AR_PATT_SIZE1 for the same behaviour as arPattCreateHandle().

Parameters
patternCountMaxFor any square template (pattern) markers, the maximum number of markers that may be loaded for a single matching pass. Must be > 0.

Pass AR_PATT_NUM_MAX for the same behaviour as arPattCreateHandle().

See also
arPattLoad
arPattDeleteHandle
Returns
The created pattern handle, or NULL in case of error.

◆ arPattDeleteHandle()

int arPattDeleteHandle ( ARPattHandle pattHandle)

Free all loaded patterns and pattern handle.

Frees a pattern handle, freeing (unloading) any patterns loaded into the handle in the process.

Parameters
pattHandleThe handle to free.
Returns
0 on success, or -1 if trying to free a NULL handle.
Here is the call graph for this function: