65#pragma mark artoolkitX lifecycle functions
122 ARX_EXTERN
bool arwStartRunning(
const char *vconf,
const char *cparaName);
132 ARX_EXTERN
bool arwStartRunningB(
const char *vconf,
const char *cparaBuff,
const int cparaBuffLen);
134 ARX_EXTERN
bool arwStartRunningStereo(
const char *vconfL,
const char *cparaNameL,
const char *vconfR,
const char *cparaNameR,
const char *transL2RName);
136 ARX_EXTERN
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);
168#pragma mark Video stream management
232 ARX_EXTERN
bool arwGetVideoParams(
int *width,
int *height,
int *pixelSize,
char *pixelFormatStringBuffer,
int pixelFormatStringBufferLen);
249 ARX_EXTERN
bool arwGetVideoParamsStereo(
int *widthL,
int *heightL,
int *pixelSizeL,
char *pixelFormatStringBufferL,
int pixelFormatStringBufferLenL,
int *widthR,
int *heightR,
int *pixelSizeR,
char *pixelFormatStringBufferR,
int pixelFormatStringBufferLenR);
265#pragma mark Video push interface.
267 ARX_EXTERN
int arwVideoPushInit(
int videoSourceIndex,
int width,
int height,
const char *pixelFormat,
int cameraIndex,
int cameraPosition);
269 uint8_t *buf0p,
int buf0Size,
int buf0PixelStride,
int buf0RowStride,
270 uint8_t *buf1p,
int buf1Size,
int buf1PixelStride,
int buf1RowStride,
271 uint8_t *buf2p,
int buf2Size,
int buf2PixelStride,
int buf2RowStride,
272 uint8_t *buf3p,
int buf3Size,
int buf3PixelStride,
int buf3RowStride,
277#pragma mark Video stream retrieval and/or drawing.
372 ARX_EXTERN
bool arwDrawVideoSettings(
int videoSourceIndex,
int width,
int height,
bool rotate90,
bool flipH,
bool flipV,
int hAlign,
int vAlign,
int scalingMode, int32_t viewport[4]);
392 ARX_EXTERN
bool arwDrawVideo(
const int videoSourceIndex);
412#pragma mark Tracking configuration
479#pragma mark Trackable management
580 ARX_EXTERN
bool arwGetTrackablePatternConfig(
int trackableUID,
int patternIndex,
float matrix[16],
float *width,
float *height,
int *imageSizeX,
int *imageSizeY);
743 ARX_EXTERN
bool arwLoadOpticalParams(
const char *optical_param_name,
const char *optical_param_buff,
const int optical_param_buffLen,
const float projectionNearPlane,
const float projectionFarPlane,
float *fovy_p,
float *aspect_p,
float m[16],
float p[16]);
746#pragma mark Video source info list management
787 ARX_EXTERN
bool arwGetVideoSourceInfoListEntry(
int index,
char *nameBuf,
int nameBufLen,
char *modelBuf,
int modelBufLen,
char *UIDBuf,
int UIDBufLen, uint32_t *flags_p,
char *openTokenBuf,
int openTokenBufLen);
bool arwGetTrackableOptionString(int trackableUID, int option, char *buf, int bufLen)
Get string options associated with a trackable.
Definition ARX_c.cpp:930
int arwGetTrackableCount(void)
Gets current number of trackables.
Definition ARX_c.cpp:562
int arwGetTrackablePatternCount(int trackableUID)
Returns the number of pattern images associated with the specified trackable.
Definition ARX_c.cpp:650
bool arwGetTrackableOptionBool(int trackableUID, int option)
Get boolean options associated with a trackable.
Definition ARX_c.cpp:705
bool arwShutdownAR()
Shuts down the artoolkitX and frees all resources.
Definition ARX_c.cpp:178
bool arwUpdateTexture32Stereo(uint32_t *bufferL, uint32_t *bufferR)
Asks the video source to push the most recent stereo frame into the passed-in buffer.
Definition ARX_c.cpp:313
bool arwGetARToolKitVersion(char *buffer, int length)
Gets the artoolkitX version as a string, such as "10.0.0".
Definition ARX_c.cpp:99
int arwGetTrackableOptionInt(int trackableUID, int option)
Get integer options associated with a trackable.
Definition ARX_c.cpp:752
float arwGetTrackerOptionFloat(int option)
Get floating-point options associated with a tracker.
Definition ARX_c.cpp:527
int arwGetTrackerOptionInt(int option)
Get integer options associated with a tracker.
Definition ARX_c.cpp:487
bool arwDrawVideoInit(const int videoSourceIndex)
Initialise drawing of video frames in a graphics context.
Definition ARX_c.cpp:361
bool arwIsInited()
Returns true if artoolkitX is initialized and read for adding trackables.
Definition ARX_c.cpp:166
bool arwGetProjectionMatrix(const float nearPlane, const float farPlane, float p[16])
Populates the given float array with the projection matrix computed from camera parameters for the vi...
Definition ARX_c.cpp:200
bool arwGetProjectionMatrixStereo(const float nearPlane, const float farPlane, float pL[16], float pR[16])
Populates the given float arrays with the projection matrices computed from camera parameters for eac...
Definition ARX_c.cpp:205
void arwSetTrackableOptionBool(int trackableUID, int option, bool value)
Set boolean options associated with a trackable.
Definition ARX_c.cpp:729
bool arwRemoveTrackable(int trackableUID)
Removes the trackable with the given unique identifier (UID).
Definition ARX_c.cpp:593
ARX_EXTERN bool arwGetProjectionMatrixForViewportSizeAndFittingMode(const int width, const int height, const int scaleMode, const int hAlign, const int vAlign, const float nearPlane, const float farPlane, float p[16])
Definition ARX_c.cpp:226
ARX_EXTERN bool arwGetProjectionMatrixForViewportSizeAndFittingModeStereo(const int width, const int height, const int scaleMode, const int hAlign, const int vAlign, const float nearPlane, const float farPlane, float pL[16], float pR[16])
Definition ARX_c.cpp:231
bool arwUpdateAR()
Performs tracking and trackable updates.
Definition ARX_c.cpp:301
void arwSetTrackerOptionBool(int option, bool value)
Set boolean options associated with a tracker.
Definition ARX_c.cpp:393
void arwSetTrackableOptionInt(int trackableUID, int option, int value)
Set integer options associated with a trackable.
Definition ARX_c.cpp:798
bool arwGetTrackerOptionBool(int option)
Get boolean options associated with a tracker.
Definition ARX_c.cpp:467
void arwDeleteVideoSourceInfoList(void)
Delete a video source info list.
Definition ARX_c.cpp:1066
int arwVideoPush(int videoSourceIndex, uint8_t *buf0p, int buf0Size, int buf0PixelStride, int buf0RowStride, uint8_t *buf1p, int buf1Size, int buf1PixelStride, int buf1RowStride, uint8_t *buf2p, int buf2Size, int buf2PixelStride, int buf2RowStride, uint8_t *buf3p, int buf3Size, int buf3PixelStride, int buf3RowStride, PFN_VIDEOPUSHRELEASECALLBACK releaseCallback, void *releaseCallbackUserdata)
Definition ARX_c.cpp:339
void arwSetTrackableOptionString(int trackableUID, int option, char *str)
Set string options associated with a trackable.
Definition ARX_c.cpp:963
float arwGetTrackableOptionFloat(int trackableUID, int option)
Get floating-point options associated with a trackable.
Definition ARX_c.cpp:818
void arwSetTrackerOptionInt(int option, int value)
Set integer options associated with a tracker.
Definition ARX_c.cpp:413
int arwGetError()
Return error information Returns the value of the error flag.
Definition ARX_c.cpp:111
bool arwGetTrackablePatternImage(int trackableUID, int patternIndex, uint32_t *buffer)
Gets a pattern image associated with a trackable.
Definition ARX_c.cpp:688
void arwSetTrackerOptionFloat(int option, float value)
Set floating-point options associated with a tracker.
Definition ARX_c.cpp:454
bool arwDrawVideoFinal(const int videoSourceIndex)
Finalise drawing of video frames in a graphics context.
Definition ARX_c.cpp:382
bool arwStartRunningStereo(const char *vconfL, const char *cparaNameL, const char *vconfR, const char *cparaNameR, const char *transL2RName)
Definition ARX_c.cpp:148
bool arwUpdateTexture32(uint32_t *buffer)
Asks the video source to push the most recent frame into the passed-in buffer.
Definition ARX_c.cpp:307
bool arwCapture()
Captures a newest frame from the video source.
Definition ARX_c.cpp:295
void arwSetLogLevel(const int logLevel)
Definition ARX_c.cpp:82
int arwVideoPushInit(int videoSourceIndex, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition)
Definition ARX_c.cpp:332
void arwRegisterTrackableEventCallback(PFN_TRACKABLEEVENTCALLBACK callback)
Definition ARX_c.cpp:549
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)
Definition ARX_c.cpp:154
bool arwStartRunning(const char *vconf, const char *cparaName)
Initialises and starts video capture.
Definition ARX_c.cpp:136
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.
Definition ARX_c.cpp:271
bool arwGetVideoSourceInfoListEntry(int index, char *nameBuf, int nameBufLen, char *modelBuf, int modelBufLen, char *UIDBuf, int UIDBufLen, uint32_t *flags_p, char *openTokenBuf, int openTokenBufLen)
Get an entry from the video source info list describing the name, model, UID, flags,...
Definition ARX_c.cpp:1024
bool arwInitialiseAR()
Initialises the artoolkitX.
Definition ARX_c.cpp:93
bool arwStopRunning()
Stops video capture and frees video capture resources.
Definition ARX_c.cpp:172
bool arwIsRunning()
Returns true if artoolkitX is running, i.e.
Definition ARX_c.cpp:160
bool arwDrawVideoSettings(int videoSourceIndex, int width, int height, bool rotate90, bool flipH, bool flipV, int hAlign, int vAlign, int scalingMode, int32_t viewport[4])
Specify the layout of the graphics context in which drawing of video frames will occur.
Definition ARX_c.cpp:368
bool arwLoadOpticalParams(const char *optical_param_name, const char *optical_param_buff, const int optical_param_buffLen, const float projectionNearPlane, const float projectionFarPlane, float *fovy_p, float *aspect_p, float m[16], float p[16])
Loads an optical parameters structure from file or from buffer.
Definition ARX_c.cpp:985
bool arwGetTrackablePatternConfig(int trackableUID, int patternIndex, float matrix[16], float *width, float *height, int *imageSizeX, int *imageSizeY)
Gets configuration of a pattern associated with a trackable.
Definition ARX_c.cpp:662
void arwRegisterLogCallback(PFN_LOGCALLBACK callback)
Registers a callback function to use when a message is logged.
Definition ARX_c.cpp:77
bool arwDrawVideo(const int videoSourceIndex)
Draws the latest frame from the video source in the active graphics context.
Definition ARX_c.cpp:375
void arwSetTrackableOptionFloat(int trackableUID, int option, float value)
Set floating-point options associated with a trackable.
Definition ARX_c.cpp:882
bool arwQueryTrackableVisibilityAndTransformation(int trackableUID, float matrix[16])
Returns the visibility and pose of the specified trackable.
Definition ARX_c.cpp:619
bool arwChangeToResourcesDir(const char *resourcesDirectoryPath)
Changes the working directory to the resources directory used by artoolkitX.
Definition ARX_c.cpp:117
bool arwGetTrackableStatuses(ARWTrackableStatus *statuses, int statusesCount)
Gets status of trackables.
Definition ARX_c.cpp:568
bool arwGetVideoParams(int *width, int *height, int *pixelSize, char *pixelFormatStringBuffer, int pixelFormatStringBufferLen)
Returns the parameters of the video source frame.
Definition ARX_c.cpp:257
bool arwQueryTrackableVisibilityAndTransformationStereo(int trackableUID, float matrixL[16], float matrixR[16])
Returns the visibility and stereo pose of the specified trackable.
Definition ARX_c.cpp:632
int arwAddTrackable(const char *cfg)
Adds a trackable as specified in the given configuration string.
Definition ARX_c.cpp:556
int arwVideoPushFinal(int videoSourceIndex)
Definition ARX_c.cpp:351
int arwCreateVideoSourceInfoList(const char *config)
Create a video source info list using the supplied video configuration string.
Definition ARX_c.cpp:1008
int arwRemoveAllTrackables()
Clears the collection of trackables.
Definition ARX_c.cpp:599
bool arwStartRunningB(const char *vconf, const char *cparaBuff, const int cparaBuffLen)
Initialises and starts video capture.
Definition ARX_c.cpp:142
ARX_EXTERN bool arwSave2dTrackableDatabase(const char *databaseFileName)
Save the currently loaded 2D trackable set as a trackable database.
@ ARW_TRACKABLE_TYPE_Square
A square template (pattern) marker.
Definition ARX_c.h:621
@ ARW_TRACKABLE_TYPE_TwoD
An artoolkitX 2D textured trackable.
Definition ARX_c.h:625
@ ARW_TRACKABLE_TYPE_SquareBarcode
A square matrix (2D barcode) marker.
Definition ARX_c.h:622
@ ARW_TRACKABLE_TYPE_Unknown
Type not known, e.g. autocreated trackable.
Definition ARX_c.h:620
@ ARW_TRACKABLE_TYPE_Multimarker
Multiple square markers treated as a single marker.
Definition ARX_c.h:623
@ ARW_TRACKABLE_TYPE_NFT
A legacy NFT marker.
Definition ARX_c.h:624
@ ARW_TRACKABLE_EVENT_TYPE_AUTOCREATED
Definition ARX_c.h:697
@ ARW_TRACKABLE_EVENT_TYPE_AUTOREMOVED
Definition ARX_c.h:698
@ ARW_TRACKABLE_EVENT_TYPE_NONE
Definition ARX_c.h:696
@ ARW_SCALE_MODE_1_TO_1
Do not scale the video frame. One pixel of the video frame will be represented by one pixel of the gr...
Definition ARX_c.h:196
@ ARW_SCALE_MODE_FIT
Scale the video frame proportionally up or down so that it fits visible in its entirety in the graphi...
Definition ARX_c.h:194
@ ARW_SCALE_MODE_FILL
Scale the video frame proportionally up or down so that it fills the entire in the graphics context....
Definition ARX_c.h:195
@ ARW_SCALE_MODE_STRETCH
Scale the video frame non-proportionally up or down so that it matches exactly the size of the graphi...
Definition ARX_c.h:193
@ ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES_DEFAULT_WIDTH
If ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES is true, this value will be used f...
Definition ARX_c.h:432
@ ARW_TRACKER_OPTION_SQUARE_BORDER_SIZE
float in range (0-0.5).
Definition ARX_c.h:423
@ ARW_TRACKER_OPTION_SQUARE_MATRIX_CODE_TYPE
int.
Definition ARX_c.h:424
@ ARW_TRACKER_OPTION_NFT_MULTIMODE
bool.
Definition ARX_c.h:418
@ ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES
If true, when the square tracker is detecting matrix (barcode) markers, new trackables will be create...
Definition ARX_c.h:431
@ ARW_TRACKER_OPTION_SQUARE_THRESHOLD
Threshold value used for image binarization. int in range [0-255].
Definition ARX_c.h:419
@ ARW_TRACKER_OPTION_SQUARE_PATTERN_COUNT_MAX
Maximum number of square template (pattern) markers that may be loaded at once. Defaults to AR_PATT_N...
Definition ARX_c.h:428
@ ARW_TRACKER_OPTION_2D_MAXIMUM_MARKERS_TO_TRACK
Maximum number of markers able to be tracked simultaneously. Defaults to 1. Should not be set higher ...
Definition ARX_c.h:430
@ ARW_TRACKER_OPTION_SQUARE_THRESHOLD_MODE
Threshold mode used for image binarization. int.
Definition ARX_c.h:420
@ ARW_TRACKER_OPTION_SQUARE_IMAGE_PROC_MODE
int.
Definition ARX_c.h:425
@ ARW_TRACKER_OPTION_2D_TRACKER_FEATURE_TYPE
Feature detector type used in the 2d Tracker - 0 AKAZE, 1 ORB, 2 BRISK, 3 KAZE, 4 SIFT.
Definition ARX_c.h:429
@ ARW_TRACKER_OPTION_SQUARE_DEBUG_MODE
Enables or disable state of debug mode in the tracker. When enabled, a black and white debug image is...
Definition ARX_c.h:426
@ ARW_TRACKER_OPTION_2D_THREADED
bool, If false, 2D tracking updates synchronously, and arwUpdateAR will not return until 2D tracking ...
Definition ARX_c.h:433
@ ARW_TRACKER_OPTION_SQUARE_PATTERN_SIZE
Number of rows and columns in square template (pattern) markers. Defaults to AR_PATT_SIZE1,...
Definition ARX_c.h:427
@ ARW_TRACKER_OPTION_SQUARE_PATTERN_DETECTION_MODE
int.
Definition ARX_c.h:422
@ ARW_TRACKER_OPTION_SQUARE_LABELING_MODE
int.
Definition ARX_c.h:421
@ ARW_V_ALIGN_CENTRE
Align the centre of the video frame with the centre of the context.
Definition ARX_c.h:185
@ ARW_V_ALIGN_TOP
Align the top edge of the video frame with the top edge of the context.
Definition ARX_c.h:184
@ ARW_V_ALIGN_BOTTOM
Align the bottom edge of the video frame with the bottom edge of the context.
Definition ARX_c.h:186
@ ARW_TRACKABLE_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION
bool, true to use continuous pose estimate.
Definition ARX_c.h:605
@ ARW_TRACKABLE_OPTION_TYPE
readonly int enum, trackable type as per ARW_TRACKABLE_TYPE_* enum .
Definition ARX_c.h:601
@ ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_MATRIX
float, minimum confidence value for submarker matrix tracking to be valid.
Definition ARX_c.h:610
@ ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE_CUTOFF
float, minimum allowable confidence value used in marker matching.
Definition ARX_c.h:607
@ ARW_TRACKABLE_OPTION_FILTER_CUTOFF_FREQ
float, cutoff frequency of filter.
Definition ARX_c.h:604
@ ARW_TRACKABLE_OPTION_SQUARE_BARCODE_ID
readonly string, for square matrix (barcode) markers, the uint64_t barcodeID converted to a string.
Definition ARX_c.h:615
@ ARW_TRACKABLE_OPTION_NFT_SCALE
float, scale factor applied to NFT marker size.
Definition ARX_c.h:608
@ ARW_TRACKABLE_OPTION_FILTERED
bool, true for filtering enabled.
Definition ARX_c.h:602
@ ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE
float, confidence value of most recent marker match
Definition ARX_c.h:606
@ ARW_TRACKABLE_OPTION_2D_SCALE
float, 2D trackable scale (i.e. width).
Definition ARX_c.h:614
@ ARW_TRACKABLE_OPTION_MULTI_MIN_SUBMARKERS
int, minimum number of submarkers for tracking to be valid.
Definition ARX_c.h:609
@ ARW_TRACKABLE_OPTION_FILTER_SAMPLE_RATE
float, sample rate for filter calculations.
Definition ARX_c.h:603
@ ARW_TRACKABLE_OPTION_MULTI_MIN_INLIER_PROB
float, minimum inlier probability value for robust multimarker pose estimation (range 1....
Definition ARX_c.h:612
@ ARW_TRACKABLE_OPTION_SQUARE_WIDTH
float, square marker width
Definition ARX_c.h:613
@ ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_PATTERN
float, minimum confidence value for submarker pattern tracking to be valid.
Definition ARX_c.h:611
@ ARW_H_ALIGN_CENTRE
Align the centre of the video frame with the centre of the context.
Definition ARX_c.h:176
@ ARW_H_ALIGN_LEFT
Align the left edge of the video frame with the left edge of the context.
Definition ARX_c.h:175
@ ARW_H_ALIGN_RIGHT
Align the right edge of the video frame with the right edge of the context.
Definition ARX_c.h:177
ARX_EXTERN bool arwLoad2dTrackableDatabase(const char *databaseFileName)
Load a 2D trackable set from a trackable database.
Defines error codes used in the ARX library.
bool visible
Definition ARX_c.h:500
int uid
Definition ARX_c.h:499
float matrix[16]
Definition ARX_c.h:501
float matrixR[16]
Definition ARX_c.h:502