ARWrapper
Provides a C++ wrapper around ARToolKit and exposes a C and JNI API
|
Functions | |
void CALL_CONV | log (const char *msg) |
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, const 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, float alpha) |
Populates the provided color buffer with the 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 bool | arwGetMarkerOptionBool (int markerUID, int option) |
Get boolean options 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 int | arwGetMarkerOptionInt (int markerUID, int option) |
Get integer 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 float | arwGetMarkerOptionFloat (int markerUID, int option) |
Get floating-point 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 | 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... | |
jfloatArray | glArrayToJava (JNIEnv *env, ARdouble *arr, int len) |
JNIEXPORT jstring JNICALL | JNIFUNCTION (arwGetARToolKitVersion(JNIEnv *env, jobject obj)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetError(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwInitialiseAR(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwInitialiseARWithOptions(JNIEnv *env, jobject obj, jint pattSize, jint pattCountMax)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwChangeToResourcesDir(JNIEnv *env, jobject obj, jstring resourcesDirectoryPath)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwShutdownAR(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwStartRunning(JNIEnv *env, jobject obj, jstring vconf, jstring cparaName, float nearPlane, float farPlane)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwStartRunningStereo(JNIEnv *env, jobject obj, jstring vconfL, jstring cparaNameL, jstring vconfR, jstring cparaNameR, jstring transL2RName, float nearPlane, float farPlane)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwIsRunning(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwStopRunning(JNIEnv *env, jobject obj)) |
JNIEXPORT jfloatArray JNICALL | JNIFUNCTION (arwGetProjectionMatrix(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetProjectionMatrixStereo(JNIEnv *env, jobject obj, jfloatArray projL, jfloatArray projR)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetVideoParams(JNIEnv *env, jobject obj, jintArray width, jintArray height, jintArray pixelSize, jobjectArray pixelFormatStringBuffer)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetVideoParamsStereo(JNIEnv *env, jobject obj, jintArray widthL, jintArray heightL, jintArray pixelSizeL, jobjectArray pixelFormatStringL, jintArray widthR, jintArray heightR, jintArray pixelSizeR, jobjectArraypixelFormatStringR)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwCapture(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwUpdateAR(JNIEnv *env, jobject obj)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwAddMarker(JNIEnv *env, jobject obj, jstring cfg)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwRemoveMarker(JNIEnv *env, jobject obj, jint markerUID)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwRemoveAllMarkers(JNIEnv *env, jobject obj)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwQueryMarkerVisibility(JNIEnv *env, jobject obj, jint markerUID)) |
JNIEXPORT jfloatArray JNICALL | JNIFUNCTION (arwQueryMarkerTransformation(JNIEnv *env, jobject obj, jint markerUID)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwQueryMarkerTransformationStereo(JNIEnv *env, jobject obj, jint markerUID, jfloatArray matrixL, jfloatArray matrixR)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetMarkerPatternCount(JNIEnv *env, jobject obj, int markerUID)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetVideoDebugMode(JNIEnv *env, jobject obj, jboolean debug)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetVideoDebugMode(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetVideoThreshold(JNIEnv *env, jobject obj, jint threshold)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetVideoThreshold(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetLabelingMode(JNIEnv *env, jobject obj, jint mode)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetLabelingMode(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetPatternDetectionMode(JNIEnv *env, jobject obj, jint mode)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetPatternDetectionMode(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetBorderSize(JNIEnv *env, jobject obj, jfloat size)) |
JNIEXPORT jfloat JNICALL | JNIFUNCTION (arwGetBorderSize(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetMatrixCodeType(JNIEnv *env, jobject obj, jint type)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetMatrixCodeType(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetImageProcMode(JNIEnv *env, jobject obj, jint mode)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetImageProcMode(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetNFTMultiMode(JNIEnv *env, jobject obj, jboolean on)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetNFTMultiMode(JNIEnv *env, jobject obj)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetMarkerOptionBool(JNIEnv *env, jobject obj, jint markerUID, jint option, jboolean value)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetMarkerOptionInt(JNIEnv *env, jobject obj, jint markerUID, jint option, jint value)) |
JNIEXPORT void JNICALL | JNIFUNCTION (arwSetMarkerOptionFloat(JNIEnv *env, jobject obj, jint markerUID, jint option, jfloat value)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetMarkerOptionBool(JNIEnv *env, jobject obj, jint markerUID, jint option)) |
JNIEXPORT jint JNICALL | JNIFUNCTION (arwGetMarkerOptionInt(JNIEnv *env, jobject obj, jint markerUID, jint option)) |
JNIEXPORT jfloat JNICALL | JNIFUNCTION (arwGetMarkerOptionFloat(JNIEnv *env, jobject obj, jint markerUID, jint option)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwAcceptVideoImage(JNIEnv *env, jobject obj, jbyteArray pinArray, jint width, jint height, jint cameraIndex, jboolean cameraIsFrontFacing)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwAcceptVideoImageStereo(JNIEnv *env, jobject obj, jbyteArray pinArrayL, jint widthL, jint heightL, jint cameraIndexL, jboolean cameraIsFrontFacingL, jbyteArray pinArrayR, jint widthR, jint heightR, jint cameraIndexR, jboolean cameraIsFrontFacingR)) |
JNIEXPORT bool JNICALL | JNIFUNCTION (arwUpdateDebugTexture(JNIEnv *env, jobject obj, jbyteArray pinArray, bool flipY)) |
JNIEXPORT jboolean JNICALL | JNIFUNCTION (arwGetVideoParams(JNIEnv *env, jobject obj, jintArray width, jintArray height, jintArray pixelSize, jobjectArray pixelFormatString)) |
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:
cfg | The configuration string |
EXPORT_API bool arwCapture | ( | ) |
Captures a newest frame from the video source.
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()
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().
buffer | The character buffer to populate |
length | The maximum number of characters to set in buffer |
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.
EXPORT_API int arwGetImageProcMode | ( | ) |
EXPORT_API int arwGetLabelingMode | ( | ) |
EXPORT_API bool arwGetMarkerOptionBool | ( | int | markerUID, |
int | option | ||
) |
Get boolean options associated with a marker.
markerUID | The unique identifier (UID) of the marker |
option | Symbolic constant identifying marker option to get. |
EXPORT_API float arwGetMarkerOptionFloat | ( | int | markerUID, |
int | option | ||
) |
Get floating-point options associated with a marker.
markerUID | The unique identifier (UID) of the marker |
option | Symbolic constant identifying marker option to get. |
EXPORT_API int arwGetMarkerOptionInt | ( | int | markerUID, |
int | option | ||
) |
Get integer options associated with a marker.
markerUID | The unique identifier (UID) of the marker |
option | Symbolic constant identifying marker option to get. |
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.
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). |
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.
markerUID | The unique identifier (UID) of the marker |
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.
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). |
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.
p | Float array to populate with OpenGL compatible projection matrix. |
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.
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. |
EXPORT_API bool arwGetVideoDebugMode | ( | ) |
Returns whether debug mode is currently enabled.
EXPORT_API bool arwGetVideoParams | ( | int * | width, |
int * | height, | ||
int * | pixelSize, | ||
char * | pixelFormatStringBuffer, | ||
int | pixelFormatStringBufferLen | ||
) |
Returns the parameters of the video source frame.
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. |
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.
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. |
EXPORT_API int arwGetVideoThreshold | ( | ) |
Returns the current threshold value used for image binarization.
EXPORT_API int arwGetVideoThresholdMode | ( | ) |
Gets the current threshold mode used for image binarization.
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.
EXPORT_API bool arwInitialiseARWithOptions | ( | const int | pattSize, |
const int | pattCountMax | ||
) |
Initialises the ARToolKit with non-default options for size and number of square markers.
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. |
pattCountMax | For any square template (pattern) markers, the maximum number of markers that may be loaded for a single matching pass. Must be > 0. |
EXPORT_API bool arwIsRunning | ( | ) |
Returns true if ARToolKit is running, i.e.
detecting markers.
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.
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.
markerUID | The unique identifier (UID) of the marker to query |
matrix | The float array to populate with an OpenGL compatible transformation matrix |
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.
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. |
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.
markerUID | The unique identifier (UID) of the marker to query |
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.
EXPORT_API bool arwRemoveMarker | ( | int | markerUID | ) |
Removes the marker with the given unique identifier (UID).
markerUID | The unique identifier (UID) of the marker to remove |
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.
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.
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.
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.
textureID | The OpenGL texture ID to upload texture data to |
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.
debug | true to enable debug mode, false to disable debug mode |
EXPORT_API void arwSetVideoThreshold | ( | int | threshold | ) |
Sets the threshold value used for image binarization.
threshold | The new threshold value to use |
EXPORT_API void arwSetVideoThresholdMode | ( | int | mode | ) |
Sets the current threshold mode used for image binarization.
mode | The new threshold mode |
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.
EXPORT_API bool arwStartRunning | ( | const char * | vconf, |
const char * | cparaName, | ||
const float | nearPlane, | ||
const float | farPlane | ||
) |
Initialises and starts video capture.
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. |
EXPORT_API bool arwStartRunningB | ( | const char * | vconf, |
const char * | cparaBuff, | ||
const int | cparaBuffLen, | ||
const float | nearPlane, | ||
const float | farPlane | ||
) |
Initialises and starts video capture.
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. |
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, | ||
const 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.
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.
EXPORT_API bool arwUpdateDebugTexture | ( | Color * | buffer, |
float | alpha | ||
) |
Populates the provided color buffer with the contents of the debug image.
buffer | The color buffer to fill with the debug image |
alpha | The alpha value to apply to each pixel |
EXPORT_API bool arwUpdateTexture | ( | Color * | buffer | ) |
Populates the provided floating-point color buffer with the current video frame.
buffer | The color buffer to fill with video |
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.
textureID | The OpenGL texture ID to upload texture data to |
EXPORT_API bool arwUpdateTextureGLStereo | ( | const int | textureID_L, |
const int | textureID_R | ||
) |
jfloatArray glArrayToJava | ( | JNIEnv * | env, |
ARdouble * | arr, | ||
int | len | ||
) |
JNIEXPORT jstring JNICALL JNIFUNCTION | ( | arwGetARToolKitVersion(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetError(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwInitialiseAR(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwInitialiseARWithOptions(JNIEnv *env, jobject obj, jint pattSize, jint pattCountMax) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwChangeToResourcesDir(JNIEnv *env, jobject obj, jstring resourcesDirectoryPath) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwShutdownAR(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwStartRunning(JNIEnv *env, jobject obj, jstring vconf, jstring cparaName, float nearPlane, float farPlane) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwStartRunningStereo(JNIEnv *env, jobject obj, jstring vconfL, jstring cparaNameL, jstring vconfR, jstring cparaNameR, jstring transL2RName, float nearPlane, float farPlane) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwIsRunning(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwStopRunning(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jfloatArray JNICALL JNIFUNCTION | ( | arwGetProjectionMatrix(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetProjectionMatrixStereo(JNIEnv *env, jobject obj, jfloatArray projL, jfloatArray projR) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetVideoParams(JNIEnv *env, jobject obj, jintArray width, jintArray height, jintArray pixelSize, jobjectArray pixelFormatStringBuffer) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetVideoParamsStereo(JNIEnv *env, jobject obj, jintArray widthL, jintArray heightL, jintArray pixelSizeL, jobjectArray pixelFormatStringL, jintArray widthR, jintArray heightR, jintArray pixelSizeR, jobjectArraypixelFormatStringR) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwCapture(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwUpdateAR(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwAddMarker(JNIEnv *env, jobject obj, jstring cfg) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwRemoveMarker(JNIEnv *env, jobject obj, jint markerUID) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwRemoveAllMarkers(JNIEnv *env, jobject obj) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwQueryMarkerVisibility(JNIEnv *env, jobject obj, jint markerUID) | ) |
JNIEXPORT jfloatArray JNICALL JNIFUNCTION | ( | arwQueryMarkerTransformation(JNIEnv *env, jobject obj, jint markerUID) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwQueryMarkerTransformationStereo(JNIEnv *env, jobject obj, jint markerUID, jfloatArray matrixL, jfloatArray matrixR) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetMarkerPatternCount(JNIEnv *env, jobject obj, int markerUID) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetVideoDebugMode(JNIEnv *env, jobject obj, jboolean debug) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetVideoDebugMode(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetVideoThreshold(JNIEnv *env, jobject obj, jint threshold) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetVideoThreshold(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetLabelingMode(JNIEnv *env, jobject obj, jint mode) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetLabelingMode(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetPatternDetectionMode(JNIEnv *env, jobject obj, jint mode) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetPatternDetectionMode(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetBorderSize(JNIEnv *env, jobject obj, jfloat size) | ) |
JNIEXPORT jfloat JNICALL JNIFUNCTION | ( | arwGetBorderSize(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetMatrixCodeType(JNIEnv *env, jobject obj, jint type) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetMatrixCodeType(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetImageProcMode(JNIEnv *env, jobject obj, jint mode) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetImageProcMode(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetNFTMultiMode(JNIEnv *env, jobject obj, jboolean on) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetNFTMultiMode(JNIEnv *env, jobject obj) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetMarkerOptionBool(JNIEnv *env, jobject obj, jint markerUID, jint option, jboolean value) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetMarkerOptionInt(JNIEnv *env, jobject obj, jint markerUID, jint option, jint value) | ) |
JNIEXPORT void JNICALL JNIFUNCTION | ( | arwSetMarkerOptionFloat(JNIEnv *env, jobject obj, jint markerUID, jint option, jfloat value) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetMarkerOptionBool(JNIEnv *env, jobject obj, jint markerUID, jint option) | ) |
JNIEXPORT jint JNICALL JNIFUNCTION | ( | arwGetMarkerOptionInt(JNIEnv *env, jobject obj, jint markerUID, jint option) | ) |
JNIEXPORT jfloat JNICALL JNIFUNCTION | ( | arwGetMarkerOptionFloat(JNIEnv *env, jobject obj, jint markerUID, jint option) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwAcceptVideoImage(JNIEnv *env, jobject obj, jbyteArray pinArray, jint width, jint height, jint cameraIndex, jboolean cameraIsFrontFacing) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwAcceptVideoImageStereo(JNIEnv *env, jobject obj, jbyteArray pinArrayL, jint widthL, jint heightL, jint cameraIndexL, jboolean cameraIsFrontFacingL, jbyteArray pinArrayR, jint widthR, jint heightR, jint cameraIndexR, jboolean cameraIsFrontFacingR) | ) |
JNIEXPORT bool JNICALL JNIFUNCTION | ( | arwUpdateDebugTexture(JNIEnv *env, jobject obj, jbyteArray pinArray, bool flipY) | ) |
JNIEXPORT jboolean JNICALL JNIFUNCTION | ( | arwGetVideoParams(JNIEnv *env, jobject obj, jintArray width, jintArray height, jintArray pixelSize, jobjectArray pixelFormatString) | ) |
void CALL_CONV log | ( | const char * | msg | ) |
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.
unsigned char __c[4] |
float __d |