ARWrapper Provides a C++ wrapper around ARToolKit and exposes a C and JNI API

- Main Page
- Classes
- Files

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Enumerator
Enumerations | Functions
ARToolKitWrapperExportedAPI.h File Reference

Defines functions that provide a C-compatible API. More...

Go to the source code of this file.

## Enumerations
enum | { ARW_UNITY_RENDER_EVENTID_NOP = 0, ARW_UNITY_RENDER_EVENTID_UPDATE_TEXTURE_GL = 1, ARW_UNITY_RENDER_EVENTID_UPDATE_TEXTURE_GL_STEREO = 2 }
enum | { ARW_MARKER_OPTION_FILTERED = 1, ARW_MARKER_OPTION_FILTER_SAMPLE_RATE = 2, ARW_MARKER_OPTION_FILTER_CUTOFF_FREQ = 3, ARW_MARKER_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION = 4, ARW_MARKER_OPTION_SQUARE_CONFIDENCE = 5, ARW_MARKER_OPTION_SQUARE_CONFIDENCE_CUTOFF = 6, ARW_MARKER_OPTION_NFT_SCALE = 7 }
| Constants for use with marker option setters/getters. More...

## Functions
EXPORT_API void | arwRegisterLogCallback (PFN_LOGCALLBACK callback)
| Registers a callback function to use when a message is logged. More...
EXPORT_API bool | arwInitialiseAR ()
| Initialises the ARToolKit. More...
EXPORT_API bool | arwInitialiseARWithOptions (const int pattSize, const int pattCountMax)
| Initialises the ARToolKit with non-default options for size and number of square markers. More...
EXPORT_API bool | arwGetARToolKitVersion (char *buffer, int length)
| Gets the ARToolKit version as a string, such as "4.5.1". More...
EXPORT_API int | arwGetError ()
| Return error information Returns the value of the error flag. More...
EXPORT_API bool | arwChangeToResourcesDir (const char *resourcesDirectoryPath)
| Changes the working directory to the resources directory used by ARToolKit. More...
EXPORT_API bool | arwStartRunning (const char *vconf, const char *cparaName, const float nearPlane, const float farPlane)
| Initialises and starts video capture. More...
EXPORT_API bool | arwStartRunningB (const char *vconf, const char *cparaBuff, const int cparaBuffLen, const float nearPlane, const float farPlane)
| Initialises and starts video capture. More...
EXPORT_API bool | arwStartRunningStereo (const char *vconfL, const char *cparaNameL, const char *vconfR, const char *cparaNameR, const char *transL2RName, const float nearPlane, const float farPlane)
EXPORT_API bool | arwStartRunningStereoB (const char *vconfL, const char *cparaBuffL, const int cparaBuffLenL, const char *vconfR, const char *cparaBuffR, int cparaBuffLenR, const char *transL2RBuff, const int transL2RBuffLen, const float nearPlane, const float farPlane)
EXPORT_API bool | arwIsRunning ()
| Returns true if ARToolKit is running, i.e. More...
EXPORT_API bool | arwStopRunning ()
| Stops video capture and frees video capture resources. More...
EXPORT_API bool | arwShutdownAR ()
| Shuts down the ARToolKit and frees all resources. More...
EXPORT_API bool | arwGetProjectionMatrix (float p[16])
| Populates the given float array with the projection matrix computed from camera parameters for the video source. More...
EXPORT_API bool | arwGetProjectionMatrixStereo (float pL[16], float pR[16])
| Populates the given float arrays with the projection matrices computed from camera parameters for each of the stereo video sources. More...
EXPORT_API bool | arwGetVideoParams (int *width, int *height, int *pixelSize, char *pixelFormatStringBuffer, int pixelFormatStringBufferLen)
| Returns the parameters of the video source frame. More...
EXPORT_API bool | arwGetVideoParamsStereo (int *widthL, int *heightL, int *pixelSizeL, char *pixelFormatStringBufferL, int pixelFormatStringBufferLenL, int *widthR, int *heightR, int *pixelSizeR, char *pixelFormatStringBufferR, int pixelFormatStringBufferLenR)
| Returns the parameters of the video source frames. More...
EXPORT_API bool | arwCapture ()
| Captures a newest frame from the video source. More...
EXPORT_API bool | arwUpdateAR ()
| Performs detection and marker updates. More...
EXPORT_API bool | arwUpdateTexture (Color *buffer)
| Populates the provided floating-point color buffer with the current video frame. More...
EXPORT_API bool | arwUpdateTexture32 (unsigned int *buffer)
EXPORT_API bool | arwUpdateTextureStereo (Color *bufferL, Color *bufferR)
EXPORT_API bool | arwUpdateTexture32Stereo (unsigned int *bufferL, unsigned int *bufferR)
EXPORT_API void | arwSetVideoDebugMode (bool debug)
| Enables or disables debug mode in the tracker. More...
EXPORT_API bool | arwGetVideoDebugMode ()
| Returns whether debug mode is currently enabled. More...
EXPORT_API bool | arwUpdateDebugTexture (Color *buffer)
| Populates the provided color buffer with the current contents of the debug image. More...
EXPORT_API bool | arwUpdateDebugTexture32 (unsigned int *buffer)
| Populates the provided buffer with the current contents of the debug image. More...
EXPORT_API bool | arwUpdateTextureGL (const int textureID)
| Uses OpenGL to directly updated the specified texture with the current video frame. More...
EXPORT_API bool | arwUpdateTextureGLStereo (const int textureID_L, const int textureID_R)
EXPORT_API void | UnityRenderEvent (int eventID)
| When ARWrapper is loaded as a plugin into the Unity 3D environment, this function will be called for Unity GL.IssuePluginEvent script calls. More...
EXPORT_API void | arwSetUnityRenderEventUpdateTextureGLTextureID (int textureID)
| Uses OpenGL to directly updated the specified texture with the current video frame. More...
EXPORT_API void | arwSetUnityRenderEventUpdateTextureGLStereoTextureIDs (int textureID_L, int textureID_R)
EXPORT_API void | arwSetVideoThreshold (int threshold)
| Sets the threshold value used for image binarization. More...
EXPORT_API int | arwGetVideoThreshold ()
| Returns the current threshold value used for image binarization. More...
EXPORT_API void | arwSetVideoThresholdMode (int mode)
| Sets the current threshold mode used for image binarization. More...
EXPORT_API int | arwGetVideoThresholdMode ()
| Gets the current threshold mode used for image binarization. More...
EXPORT_API void | arwSetLabelingMode (int mode)
EXPORT_API int | arwGetLabelingMode ()
EXPORT_API void | arwSetPatternDetectionMode (int mode)
EXPORT_API int | arwGetPatternDetectionMode ()
EXPORT_API void | arwSetBorderSize (float size)
EXPORT_API float | arwGetBorderSize ()
EXPORT_API void | arwSetMatrixCodeType (int type)
EXPORT_API int | arwGetMatrixCodeType ()
EXPORT_API void | arwSetImageProcMode (int mode)
EXPORT_API int | arwGetImageProcMode ()
EXPORT_API void | arwSetNFTMultiMode (bool on)
EXPORT_API bool | arwGetNFTMultiMode ()
EXPORT_API int | arwAddMarker (const char *cfg)
| Adds a marker as specified in the given configuration string. More...
EXPORT_API bool | arwRemoveMarker (int markerUID)
| Removes the marker with the given unique identifier (UID). More...
EXPORT_API int | arwRemoveAllMarkers ()
| Clears the collection of markers. More...
EXPORT_API bool | arwQueryMarkerVisibility (int markerUID)
| Returns the visibility status of the specified marker. More...
EXPORT_API bool | arwQueryMarkerTransformation (int markerUID, float matrix[16])
| Populates the provided float array with the current transformation for the specified marker. More...
EXPORT_API bool | arwQueryMarkerTransformationStereo (int markerUID, float matrixL[16], float matrixR[16])
| Populates the provided float arrays with the current transformations for the specified marker. More...
EXPORT_API int | arwGetMarkerPatternCount (int markerUID)
| Returns the number of pattern images associated with the specified marker. More...
EXPORT_API bool | arwGetMarkerPatternConfig (int markerUID, int patternID, float matrix[16], float *width, float *height, int *imageSizeX, int *imageSizeY)
| Gets configuration of a pattern associated with a marker. More...
EXPORT_API bool | arwGetMarkerPatternImage (int markerUID, int patternID, Color *buffer)
| Gets a pattern image associated with a marker. More...
EXPORT_API void | arwSetMarkerOptionBool (int markerUID, int option, bool value)
| Set boolean options associated with a marker. More...
EXPORT_API void | arwSetMarkerOptionInt (int markerUID, int option, int value)
| Set integer options associated with a marker. More...
EXPORT_API void | arwSetMarkerOptionFloat (int markerUID, int option, float value)
| Set floating-point options associated with a marker. More...
EXPORT_API bool | arwGetMarkerOptionBool (int markerUID, int option)
| Get boolean options associated with a marker. More...
EXPORT_API int | arwGetMarkerOptionInt (int markerUID, int option)
| Get integer options associated with a marker. More...
EXPORT_API float | arwGetMarkerOptionFloat (int markerUID, int option)
| Get floating-point options associated with a marker. More...
EXPORT_API bool | arwLoadOpticalParams (const char *optical_param_name, const char *optical_param_buff, const int optical_param_buffLen, float *fovy_p, float *aspect_p, float m[16], float p[16])
| Loads an optical parameters structure from file or from buffer. More...

## Detailed Description

Defines functions that provide a C-compatible API.

These functions are accessible to other C applications, as well as languages like C#.

## Enumeration Type Documentation

anonymous enum

Enumerator
ARW_UNITY_RENDER_EVENTID_NOP |
ARW_UNITY_RENDER_EVENTID_UPDATE_TEXTURE_GL |
ARW_UNITY_RENDER_EVENTID_UPDATE_TEXTURE_GL_STEREO |

anonymous enum

Constants for use with marker option setters/getters.

Enumerator
ARW_MARKER_OPTION_FILTERED | bool, true for filtering enabled.
ARW_MARKER_OPTION_FILTER_SAMPLE_RATE | float, sample rate for filter calculations.
ARW_MARKER_OPTION_FILTER_CUTOFF_FREQ | float, cutoff frequency of filter.
ARW_MARKER_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION | bool, true to use continuous pose estimate.
ARW_MARKER_OPTION_SQUARE_CONFIDENCE | float, confidence value of most recent marker match
ARW_MARKER_OPTION_SQUARE_CONFIDENCE_CUTOFF | float, minimum allowable confidence value used in marker matching.
ARW_MARKER_OPTION_NFT_SCALE | float, scale factor applied to NFT marker size.

## Function Documentation

EXPORT_API int arwAddMarker | ( | const char * | cfg | ) |

Adds a marker as specified in the given configuration string.

The format of the string can be one of:

- Single marker: "single;pattern_file;pattern_width", e.g. "single;data/patt.hiro;80"
- Multi marker: "multi;config_file", e.g. "multi;data/multi/marker.dat"
- NFT marker: "nft;nft_dataset_pathname", e.g. "nft;gibraltar"
  Parameters

    cfg | The configuration string

  Returns
    The unique identifier (UID) of the marker instantiated based on the configuration string, or -1 if an error occurred

EXPORT_API bool arwCapture | ( |  | ) |

Captures a newest frame from the video source.

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwChangeToResourcesDir | ( | const char * | resourcesDirectoryPath | ) |

Changes the working directory to the resources directory used by ARToolKit.

Normally, this would be called immediately after arwInitialiseAR()

Returns
  true if successful, false if an error occurred

See Also
  arwInitialiseAR()

EXPORT_API bool arwGetARToolKitVersion | ( | char * | buffer,
|  | int | length
| ) |  |

Gets the ARToolKit version as a string, such as "4.5.1".

Must not be called prior to arwInitialiseAR().

Parameters

  buffer | The character buffer to populate
  length | The maximum number of characters to set in buffer

Returns
  true if successful, false if an error occurred

EXPORT_API float arwGetBorderSize | ( |  | ) |

EXPORT_API int arwGetError | ( |  | ) |

Return error information Returns the value of the error flag.

Each detectable error is assigned a numeric code and symbolic name. When an error occurs, the error flag is set to the appropriate error code value. No other errors are recorded until arwGetError is called, the error code is returned, and the flag is reset to AR_ERROR_NONE. If a call to arwGetError returns AR_ERROR_NONE, there has been no detectable error since the last call to arwGetError, or since the the library was initialized.

To allow for distributed implementations, there may be several error flags. If any single error flag has recorded an error, the value of that flag is returned and that flag is reset to AR_ERROR_NONE when arwGetError is called. If more than one flag has recorded an error, arwGetError returns and clears an arbitrary error flag value. Thus, arwGetError should always be called in a loop, until it returns AR_ERROR_NONE, if all error flags are to be reset.

Initially, all error flags are set to AR_ERROR_NONE.

Returns
  enum with error code.

EXPORT_API int arwGetImageProcMode | ( |  | ) |

EXPORT_API int arwGetLabelingMode | ( |  | ) |

EXPORT_API bool arwGetMarkerOptionBool | ( | int | markerUID,
|  | int | option
| ) |  |

Get boolean options associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  option | Symbolic constant identifying marker option to get.

Returns
  true if option is set, false if option is not set or an error occurred.

EXPORT_API float arwGetMarkerOptionFloat | ( | int | markerUID,
|  | int | option
| ) |  |

Get floating-point options associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  option | Symbolic constant identifying marker option to get.

Returns
  floating-point value of option, or NAN if an error occurred.

EXPORT_API int arwGetMarkerOptionInt | ( | int | markerUID,
|  | int | option
| ) |  |

Get integer options associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  option | Symbolic constant identifying marker option to get.

Returns
  integer value of option, or INT_MIN if an error occurred.

EXPORT_API bool arwGetMarkerPatternConfig | ( | int | markerUID,
|  | int | patternID,
|  | float | matrix[16],
|  | float * | width,
|  | float * | height,
|  | int * | imageSizeX,
|  | int * | imageSizeY
| ) |  |

Gets configuration of a pattern associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  patternID | The id of the pattern within the marker, in range from 0 to arwGetMarkerPatternCount() - 1, inclusive. Ignored for single markers and NFT markers (i.e. 0 assumed).
  matrix | The float array to populate with the 4x4 transformation matrix of the pattern (column-major order).
  width | Float value to set to the width of the pattern
  height | Float value to set to the height of the pattern.
  imageSizeX | Int value to set to the width of the pattern image (in pixels).
  imageSizeY | Int value to set to the height of the pattern image (in pixels).

Returns
  true if successful, false if an error occurred

EXPORT_API int arwGetMarkerPatternCount | ( | int | markerUID | ) |

Returns the number of pattern images associated with the specified marker.

A single marker has one pattern image. A multimarker has one or more pattern images. Images of NFT markers are not currently supported, so at present this function will return 0 for NFT markers.

Parameters

  markerUID | The unique identifier (UID) of the marker

Returns
  The number of pattern images

EXPORT_API bool arwGetMarkerPatternImage | ( | int | markerUID,
|  | int | patternID,
|  | Color * | buffer
| ) |  |

Gets a pattern image associated with a marker.

The provided color buffer is populated with the image of the pattern for the specified marker. If the marker is a multimarker, then the pattern image specified by patternID is used. Images of NFT markers are not currently supported, so at present this function will return no image for NFT markers.

Parameters

  markerUID | The unique identifier (UID) of the marker
  patternID | The id for the pattern within that marker. Ignored for single markers and NFT markers.
  buffer | Color array to populate with pattern image. Use arwGetMarkerPatternConfig to get the required size of this array (imageSizeX * imageSizeY elements).

Returns
  true if successful, false if an error occurred

EXPORT_API int arwGetMatrixCodeType | ( |  | ) |

EXPORT_API bool arwGetNFTMultiMode | ( |  | ) |

EXPORT_API int arwGetPatternDetectionMode | ( |  | ) |

EXPORT_API bool arwGetProjectionMatrix | ( | float | p[16] | ) |

Populates the given float array with the projection matrix computed from camera parameters for the video source.

Parameters

  p | Float array to populate with OpenGL compatible projection matrix.

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwGetProjectionMatrixStereo | ( | float | pL[16],
|  | float | pR[16]
| ) |  |

Populates the given float arrays with the projection matrices computed from camera parameters for each of the stereo video sources.

Parameters

  pL | Float array to populate with OpenGL compatible projection matrix for the left camera of the stereo video pair.
  pR | Float array to populate with OpenGL compatible projection matrix for the right camera of the stereo video pair.

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwGetVideoDebugMode | ( |  | ) |

Returns whether debug mode is currently enabled.

Returns
  true when debug mode is enabled, false when debug mode is disabled

See Also
  arwSetVideoDebugMode()

EXPORT_API bool arwGetVideoParams | ( | int * | width,
|  | int * | height,
|  | int * | pixelSize,
|  | char * | pixelFormatStringBuffer,
|  | int | pixelFormatStringBufferLen
| ) |  |

Returns the parameters of the video source frame.

Parameters

  width | Pointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required.
  height | Pointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required.
  pixelSize | Pointer to an int which will be filled with the numbers of bytes per pixel of the source frame.
  pixelFormatStringBuffer | Pointer to a buffer which will be filled with the symolic name of the pixel format (as a nul-terminated C-string) of the video frame, or NULL if this information is not required. The name will be of the form "AR_PIXEL_FORMAT_xxx".
  pixelFormatStringBufferLen | Length (in bytes) of pixelFormatStringBuffer, or 0 if this information is not required.

Returns
  True if the values were returned OK, false if there is currently no video source or an error int[] .

See Also
  arwGetVideoParamsStereo

EXPORT_API bool arwGetVideoParamsStereo | ( | int * | widthL,
|  | int * | heightL,
|  | int * | pixelSizeL,
|  | char * | pixelFormatStringBufferL,
|  | int | pixelFormatStringBufferLenL,
|  | int * | widthR,
|  | int * | heightR,
|  | int * | pixelSizeR,
|  | char * | pixelFormatStringBufferR,
|  | int | pixelFormatStringBufferLenR
| ) |  |

Returns the parameters of the video source frames.

Parameters

  widthL | Pointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required.
  widthR | Pointer to an int which will be filled with the width (in pixels) of the video frame, or NULL if this information is not required.
  heightL | Pointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required.
  heightR | Pointer to an int which will be filled with the height (in pixels) of the video frame, or NULL if this information is not required.
  pixelSizeL | Pointer to an int which will be filled with the numbers of bytes per pixel of the source frame, or NULL if this information is not required.
  pixelSizeR | Pointer to an int which will be filled with the numbers of bytes per pixel of the source frame, or NULL if this information is not required.
  pixelFormatStringBufferL | Pointer to a buffer which will be filled with the symbolic name of the pixel format (as a nul-terminated C-string) of the video frame, or NULL if this information is not required. The name will be of the form "AR_PIXEL_FORMAT_xxx".
  pixelFormatStringBufferR | Pointer to a buffer which will be filled with the symbolic name of the pixel format (as a nul-terminated C-string) of the video frame, or NULL if this information is not required. The name will be of the form "AR_PIXEL_FORMAT_xxx".
  pixelFormatStringBufferLenL | Length (in bytes) of pixelFormatStringBufferL, or 0 if this information is not required.
  pixelFormatStringBufferLenR | Length (in bytes) of pixelFormatStringBufferR, or 0 if this information is not required.

Returns
  True if the values were returned OK, false if there is currently no stereo video source or an error int[] .

See Also
  arwGetVideoParams

EXPORT_API int arwGetVideoThreshold | ( |  | ) |

Returns the current threshold value used for image binarization.

Returns
  The current threshold value

See Also
  arwSetVideoThreshold()

EXPORT_API int arwGetVideoThresholdMode | ( |  | ) |

Gets the current threshold mode used for image binarization.

Returns
  The current threshold mode

See Also
  arwGetVideoThresholdMode()

EXPORT_API bool arwInitialiseAR | ( |  | ) |

Initialises the ARToolKit.

For any square template (pattern) markers, the number of rows and columns in the template defaults to AR_PATT_SIZE1 and the maximum number of markers that may be loaded for a single matching pass defaults to AR_PATT_NUM_MAX.

Returns
  true if successful, false if an error occurred

See Also
  arwShutdownAR()

EXPORT_API bool arwInitialiseARWithOptions | ( | const int | pattSize,
|  | const int | pattCountMax
| ) |  |

Initialises the ARToolKit with non-default options for size and number of square markers.

Parameters

  pattSize | For 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 arwInitialiseAR().
  pattCountMax | For 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 arwInitialiseAR().

Returns
  true if successful, false if an error occurred

See Also
  arwShutdownAR()

EXPORT_API bool arwIsRunning | ( |  | ) |

Returns true if ARToolKit is running, i.e.

detecting markers.

Returns
  true when running, otherwise false

EXPORT_API bool arwLoadOpticalParams | ( | const char * | optical_param_name,
|  | const char * | optical_param_buff,
|  | const int | optical_param_buffLen,
|  | float * | fovy_p,
|  | float * | aspect_p,
|  | float | m[16],
|  | float | p[16]
| ) |  |

Loads an optical parameters structure from file or from buffer.

Parameters

  optical_param_name | If supplied, points to a buffer specifying the path to the optical parameters file (as generated by the calib_optical utility.)
  optical_param_buff | If optical_param_name is NULL, the contents of this buffer will be interpreted as containing the contents of an optical parameters file.
  optical_param_buffLen | Length of the buffer specified in optical_param_buff. Ignored if optical_param_buff is NULL.
  fovy_p | Pointer to a float, which will be filled with the field-of-view (Y axis) component of the optical parameters, in degrees.
  aspect_p | Pointer to a float, which will be filled with the aspect ratio (width / height) component of the optical parameters.
  m | Pointer to an array of 16 floats, which will be filled with the transformation matrix component of the optical parameters.
  p | (Optional) May be NULL, or a pointer to an array of 16 floats, which will be filled with the perspective matrix calculated from fovy and aspect combined with the near and far projection values supplied in arwStartRunning().

EXPORT_API bool arwQueryMarkerTransformation | ( | int | markerUID,
|  | float | matrix[16]
| ) |  |

Populates the provided float array with the current transformation for the specified marker.

After a call to arwUpdate, all marker information will be current. Marker transformations can then be checked. If the specified marker is not found the last good transformation is used, and false is returned.

Parameters

  markerUID | The unique identifier (UID) of the marker to query
  matrix | The float array to populate with an OpenGL compatible transformation matrix

Returns
  true if the specified marker is visible, false if not, or an error occurred

EXPORT_API bool arwQueryMarkerTransformationStereo | ( | int | markerUID,
|  | float | matrixL[16],
|  | float | matrixR[16]
| ) |  |

Populates the provided float arrays with the current transformations for the specified marker.

After a call to arwUpdate, all marker information will be current. Marker transformations can then be checked. If the specified marker is not found the last good transformation is used, and false is returned.

Parameters

  markerUID | The unique identifier (UID) of the marker to query
  matrixL | The float array to populate with an OpenGL compatible transformation matrix for the left camera.
  matrixR | The float array to populate with an OpenGL compatible transformation matrix for the right camera.

Returns
  true if the specified marker is visible, false if not, or an error occurred

EXPORT_API bool arwQueryMarkerVisibility | ( | int | markerUID | ) |

Returns the visibility status of the specified marker.

After a call to arwUpdate, all marker information will be current. Any marker can then be checked for visibility in the current frame.

Parameters

  markerUID | The unique identifier (UID) of the marker to query

Returns
  true if the specified marker is visible, false if not, or an error occurred

EXPORT_API void arwRegisterLogCallback | ( | PFN_LOGCALLBACK | callback | ) |

Registers a callback function to use when a message is logged.

If the callback is to become invalid, be sure to call this function with NULL first so that the callback is unregistered.

EXPORT_API int arwRemoveAllMarkers | ( |  | ) |

Clears the collection of markers.

Returns
  The number of markers removed

EXPORT_API bool arwRemoveMarker | ( | int | markerUID | ) |

Removes the marker with the given unique identifier (UID).

Parameters

  markerUID | The unique identifier (UID) of the marker to remove

Returns
  true if the marker was removed, false if an error occurred

EXPORT_API void arwSetBorderSize | ( | float | size | ) |

EXPORT_API void arwSetImageProcMode | ( | int | mode | ) |

EXPORT_API void arwSetLabelingMode | ( | int | mode | ) |

EXPORT_API void arwSetMarkerOptionBool | ( | int | markerUID,
|  | int | option,
|  | bool | value
| ) |  |

Set boolean options associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  option | Symbolic constant identifying marker option to set.
  value | The value to set it to.

EXPORT_API void arwSetMarkerOptionFloat | ( | int | markerUID,
|  | int | option,
|  | float | value
| ) |  |

Set floating-point options associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  option | Symbolic constant identifying marker option to set.
  value | The value to set it to.

EXPORT_API void arwSetMarkerOptionInt | ( | int | markerUID,
|  | int | option,
|  | int | value
| ) |  |

Set integer options associated with a marker.

Parameters

  markerUID | The unique identifier (UID) of the marker
  option | Symbolic constant identifying marker option to set.
  value | The value to set it to.

EXPORT_API void arwSetMatrixCodeType | ( | int | type | ) |

EXPORT_API void arwSetNFTMultiMode | ( | bool | on | ) |

EXPORT_API void arwSetPatternDetectionMode | ( | int | mode | ) |

EXPORT_API void arwSetUnityRenderEventUpdateTextureGLStereoTextureIDs | ( | int | textureID_L,
|  | int | textureID_R
| ) |  |

EXPORT_API void arwSetUnityRenderEventUpdateTextureGLTextureID | ( | int | textureID | ) |

Uses OpenGL to directly updated the specified texture with the current video frame.

Parameters

  textureID | The OpenGL texture ID to upload texture data to

Returns
  true if successful, false if an error occurred

EXPORT_API void arwSetVideoDebugMode | ( | bool | debug | ) |

Enables or disables debug mode in the tracker.

When enabled, a black and white debug image is generated during marker detection. The debug image is useful for visualising the binarization process and choosing a threshold value.

Parameters

  debug | true to enable debug mode, false to disable debug mode

See Also
  arwGetVideoDebugMode()

EXPORT_API void arwSetVideoThreshold | ( | int | threshold | ) |

Sets the threshold value used for image binarization.

Parameters

  threshold | The new threshold value to use

See Also
  arwGetVideoThreshold()

EXPORT_API void arwSetVideoThresholdMode | ( | int | mode | ) |

Sets the current threshold mode used for image binarization.

Parameters

  mode | The new threshold mode

See Also
  arwSetVideoThresholdMode()

EXPORT_API bool arwShutdownAR | ( |  | ) |

Shuts down the ARToolKit and frees all resources.

N.B.: If this is being called from the destructor of the same module which supplied the log callback, be sure to set the logCallback = NULL prior to calling this function.

Returns
  true if successful, false if an error occurred

See Also
  arwInitialiseAR()

EXPORT_API bool arwStartRunning | ( | const char * | vconf,
|  | const char * | cparaName,
|  | const float | nearPlane,
|  | const float | farPlane
| ) |  |

Initialises and starts video capture.

Parameters

  vconf | The video configuration string
  cparaName | The camera parameter file, which is used to form the projection matrix
  nearPlane | The distance to the near plane of the viewing frustum formed by the camera parameters.
  farPlane | The distance to the far plane of the viewing frustum formed by the camera parameters.

Returns
  true if successful, false if an error occurred

See Also
  arwStopRunning()

EXPORT_API bool arwStartRunningB | ( | const char * | vconf,
|  | const char * | cparaBuff,
|  | const int | cparaBuffLen,
|  | const float | nearPlane,
|  | const float | farPlane
| ) |  |

Initialises and starts video capture.

Parameters

  vconf | The video configuration string
  cparaBuff | A string containing the contents of a camera parameter file, which is used to form the projection matrix.
  cparaBuffLen | Number of characters in cparaBuff.
  nearPlane | The distance to the near plane of the viewing frustum formed by the camera parameters.
  farPlane | The distance to the far plane of the viewing frustum formed by the camera parameters.

Returns
  true if successful, false if an error occurred

See Also
  arwStopRunning()

EXPORT_API bool arwStartRunningStereo | ( | const char * | vconfL,
|  | const char * | cparaNameL,
|  | const char * | vconfR,
|  | const char * | cparaNameR,
|  | const char * | transL2RName,
|  | const float | nearPlane,
|  | const float | farPlane
| ) |  |

EXPORT_API bool arwStartRunningStereoB | ( | const char * | vconfL,
|  | const char * | cparaBuffL,
|  | const int | cparaBuffLenL,
|  | const char * | vconfR,
|  | const char * | cparaBuffR,
|  | int | cparaBuffLenR,
|  | const char * | transL2RBuff,
|  | const int | transL2RBuffLen,
|  | const float | nearPlane,
|  | const float | farPlane
| ) |  |

EXPORT_API bool arwStopRunning | ( |  | ) |

Stops video capture and frees video capture resources.

Returns
  true if successful, false if an error occurred

See Also
  arwStartRunning()

EXPORT_API bool arwUpdateAR | ( |  | ) |

Performs detection and marker updates.

The newest frame from the video source is retrieved and analysed. All loaded markers are updated.

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwUpdateDebugTexture | ( | Color * | buffer | ) |

Populates the provided color buffer with the current contents of the debug image.

Parameters

  buffer | Pointer to a buffer of pixels (of type 'Color') to be filled. It is the caller's responsibility to ensure that the buffer is of sufficient size.

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwUpdateDebugTexture32 | ( | unsigned int * | buffer | ) |

Populates the provided buffer with the current contents of the debug image.

Parameters

  buffer | Pointer to a buffer of pixels (of type 'uint32_t') to be filled. It is the caller's responsibility to ensure that the buffer is of sufficient size. The pixels are RGBA in little-endian systems, or ABGR in big-endian systems.

EXPORT_API bool arwUpdateTexture | ( | Color * | buffer | ) |

Populates the provided floating-point color buffer with the current video frame.

Parameters

  buffer | The color buffer to fill with video

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwUpdateTexture32 | ( | unsigned int * | buffer | ) |

EXPORT_API bool arwUpdateTexture32Stereo | ( | unsigned int * | bufferL,
|  | unsigned int * | bufferR
| ) |  |

EXPORT_API bool arwUpdateTextureGL | ( | const int | textureID | ) |

Uses OpenGL to directly updated the specified texture with the current video frame.

Parameters

  textureID | The OpenGL texture ID to upload texture data to

Returns
  true if successful, false if an error occurred

EXPORT_API bool arwUpdateTextureGLStereo | ( | const int | textureID_L,
|  | const int | textureID_R
| ) |  |

EXPORT_API bool arwUpdateTextureStereo | ( | Color * | bufferL,
|  | Color * | bufferR
| ) |  |

EXPORT_API void UnityRenderEvent | ( | int | eventID | ) |

When ARWrapper is loaded as a plugin into the Unity 3D environment, this function will be called for Unity GL.IssuePluginEvent script calls.

The function will be called on a rendering thread; note that when multithreaded rendering is used, the rendering thread WILL BE DIFFERENT from the thread that all scripts & other game logic happens. It is up to the user to ensure any synchronization with other plugin script calls.