| ARX 1.0 The next-generation open source augmented reality toolkit.

Loading...
Searching...
No Matches
Functions | Variables
arDetectMarker.c File Reference
`#include <stdio.h>`
`#include <ARX/AR/ar.h>`
`#include <ARX/AR/arImageProc.h>`
`#include "arRefineCorners.h"`
Include dependency graph for arDetectMarker.c:

## Functions
int | arDetectMarker (ARHandle *arHandle, AR2VideoBufferT *frame)
| Detect markers in a video frame.

## Variables
const char * | arMarkerInfoCutoffPhaseDescriptions [AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT]

## Function Documentation

## ◆ arDetectMarker()

int arDetectMarker | ( | ARHandle * | arHandle,
|  | AR2VideoBufferT * | frame
| ) |  |

Detect markers in a video frame.

This is the core artoolkitX marker detection function. It calls through to a set of internal functions to perform the key marker detection steps of binarization and labelling, contour extraction, and template matching and/or matrix code extraction.

Typically, the resulting set of detected markers is retrieved by calling arGetMarkerNum to get the number of markers detected and arGetMarker to get an array of ARMarkerInfo structures with information on each detected marker, followed by a step in which detected markers are possibly examined for some measure of goodness of match (e.g. by examining the match confidence value) and pose extraction.

Parameters

  arHandle | Handle to initialised settings, including camera parameters, incoming video image size and pixel format, markers, detection modes and other information.
  frame | Pointer to an AR2VideoBufferT structure which contains the pixel data for the image frame which is to be processed for marker detection. The format of pixels in the frame is specified by arSetPixelFormat(). The width and height of the image are specified by the xsize and ysize parameters of the camera parameters held in arHandle.

Returns
  0 if the function proceeded without error, or a value less than 0 in case of error. A result of 0 does not however, imply any markers were detected.

See also
  arCreateHandle
  arGetMarkerNum
  arGetMarker

Here is the call graph for this function:

## Variable Documentation

## ◆ arMarkerInfoCutoffPhaseDescriptions

const char* arMarkerInfoCutoffPhaseDescriptions[AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT]

Initial value:
= {
"Marker OK.",
"Pattern extraction failed.",
"Generic error during matching phase.",
"Insufficient contrast during matching.",
"Barcode matching could not find correct barcode locator pattern.",
"Barcode matching error detection/correction found unrecoverable error.",
"Matching confidence cutoff value not reached.",
"Maximum allowable pose error exceeded.",
"Multi-marker pose error value exceeded.",
"Rejected frequently misrecognised matrix marker."
}