63#pragma mark artoolkitX lifecycle functions
120 ARX_EXTERN
bool arwStartRunning(
const char *vconf,
const char *cparaName);
130 ARX_EXTERN
bool arwStartRunningB(
const char *vconf,
const char *cparaBuff,
const int cparaBuffLen);
132 ARX_EXTERN
bool arwStartRunningStereo(
const char *vconfL,
const char *cparaNameL,
const char *vconfR,
const char *cparaNameR,
const char *transL2RName);
134 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);
166#pragma mark Video stream management
198 ARX_EXTERN
bool arwGetVideoParams(
int *width,
int *height,
int *pixelSize,
char *pixelFormatStringBuffer,
int pixelFormatStringBufferLen);
215 ARX_EXTERN
bool arwGetVideoParamsStereo(
int *widthL,
int *heightL,
int *pixelSizeL,
char *pixelFormatStringBufferL,
int pixelFormatStringBufferLenL,
int *widthR,
int *heightR,
int *pixelSizeR,
char *pixelFormatStringBufferR,
int pixelFormatStringBufferLenR);
231#pragma mark Video stream retrieval and/or drawing.
354 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]);
374 ARX_EXTERN
bool arwDrawVideo(
const int videoSourceIndex);
394#pragma mark Tracking configuration
457#pragma mark Trackable management
546 ARX_EXTERN
bool arwGetTrackablePatternConfig(
int trackableUID,
int patternID,
float matrix[16],
float *width,
float *height,
int *imageSizeX,
int *imageSizeY);
654 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]);
ARX_EXTERN bool arwGetVideoParams(int *width, int *height, int *pixelSize, char *pixelFormatStringBuffer, int pixelFormatStringBufferLen)
Returns the parameters of the video source frame.
Definition: ARX_c.cpp:225
ARX_EXTERN void arwSetTrackerOptionBool(int option, bool value)
Set boolean options associated with a tracker.
Definition: ARX_c.cpp:318
ARX_EXTERN int arwGetError()
Return error information Returns the value of the error flag.
Definition: ARX_c.cpp:108
ARX_EXTERN bool arwGetTrackables(int *count_p, ARWTrackableStatus **statuses_p)
Gets all current trackables and their status.
Definition: ARX_c.cpp:435
ARX_EXTERN bool arwGetTrackablePatternConfig(int trackableUID, int patternID, float matrix[16], float *width, float *height, int *imageSizeX, int *imageSizeY)
Gets configuration of a pattern associated with a trackable.
Definition: ARX_c.cpp:538
ARX_EXTERN 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:277
ARX_EXTERN bool arwShutdownAR()
Shuts down the artoolkitX and frees all resources.
Definition: ARX_c.cpp:175
ARX_EXTERN void arwSetTrackableOptionInt(int trackableUID, int option, int value)
Set integer options associated with a trackable.
Definition: ARX_c.cpp:661
ARX_EXTERN bool arwGetTrackerOptionBool(int option)
Get boolean options associated with a tracker.
Definition: ARX_c.cpp:374
ARX_EXTERN bool arwIsInited()
Returns true if artoolkitX is initialized and read for adding trackables.
Definition: ARX_c.cpp:163
ARX_EXTERN void arwSetTrackableOptionFloat(int trackableUID, int option, float value)
Set floating-point options associated with a trackable.
Definition: ARX_c.cpp:733
ARX_EXTERN bool arwInitialiseAR()
Initialises the artoolkitX.
Definition: ARX_c.cpp:90
ARX_EXTERN bool arwStartRunning(const char *vconf, const char *cparaName)
Initialises and starts video capture.
Definition: ARX_c.cpp:133
ARX_EXTERN bool arwDrawVideo(const int videoSourceIndex)
Draws the latest frame from the video source in the active graphics context.
Definition: ARX_c.cpp:300
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)
Definition: ARX_c.cpp:151
ARX_EXTERN float arwGetTrackableOptionFloat(int trackableUID, int option)
Get floating-point options associated with a trackable.
Definition: ARX_c.cpp:681
@ ARW_TRACKABLE_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION
bool, true to use continuous pose estimate.
Definition: ARX_c.h:570
@ ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_MATRIX
float, minimum confidence value for submarker matrix tracking to be valid.
Definition: ARX_c.h:575
@ ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE_CUTOFF
float, minimum allowable confidence value used in marker matching.
Definition: ARX_c.h:572
@ ARW_TRACKABLE_OPTION_FILTER_CUTOFF_FREQ
float, cutoff frequency of filter.
Definition: ARX_c.h:569
@ ARW_TRACKABLE_OPTION_NFT_SCALE
float, scale factor applied to NFT marker size.
Definition: ARX_c.h:573
@ ARW_TRACKABLE_OPTION_FILTERED
bool, true for filtering enabled.
Definition: ARX_c.h:567
@ ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE
float, confidence value of most recent marker match
Definition: ARX_c.h:571
@ ARW_TRACKABLE_OPTION_MULTI_MIN_SUBMARKERS
int, minimum number of submarkers for tracking to be valid.
Definition: ARX_c.h:574
@ ARW_TRACKABLE_OPTION_FILTER_SAMPLE_RATE
float, sample rate for filter calculations.
Definition: ARX_c.h:568
@ ARW_TRACKABLE_OPTION_MULTI_MIN_INLIER_PROB
float, minimum inlier probability value for robust multimarker pose estimation (range 1....
Definition: ARX_c.h:577
@ ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_PATTERN
float, minimum confidence value for submarker pattern tracking to be valid.
Definition: ARX_c.h:576
ARX_EXTERN 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:239
ARX_EXTERN bool arwStartRunningStereo(const char *vconfL, const char *cparaNameL, const char *vconfR, const char *cparaNameR, const char *transL2RName)
Definition: ARX_c.cpp:145
ARX_EXTERN bool arwStopRunning()
Stops video capture and frees video capture resources.
Definition: ARX_c.cpp:169
ARX_EXTERN void arwSetTrackerOptionInt(int option, int value)
Set integer options associated with a tracker.
Definition: ARX_c.cpp:333
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])
Specify the layout of the graphics context in which drawing of video frames will occur.
Definition: ARX_c.cpp:293
ARX_EXTERN bool arwGetTrackableOptionBool(int trackableUID, int option)
Get boolean options associated with a trackable.
Definition: ARX_c.cpp:593
ARX_EXTERN void arwSetTrackerOptionFloat(int option, float value)
Set floating-point options associated with a tracker.
Definition: ARX_c.cpp:364
ARX_EXTERN int arwGetTrackerOptionInt(int option)
Get integer options associated with a tracker.
Definition: ARX_c.cpp:390
ARX_EXTERN 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:190
ARX_EXTERN int arwAddTrackable(const char *cfg)
Adds a trackable as specified in the given configuration string.
Definition: ARX_c.cpp:429
ARX_EXTERN bool arwUpdateAR()
Performs tracking and trackable updates.
Definition: ARX_c.cpp:265
ARX_EXTERN float arwGetTrackerOptionFloat(int option)
Get floating-point options associated with a tracker.
Definition: ARX_c.cpp:414
ARX_EXTERN bool arwGetARToolKitVersion(char *buffer, int length)
Gets the artoolkitX version as a string, such as "10.0.0".
Definition: ARX_c.cpp:96
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])
Loads an optical parameters structure from file or from buffer.
Definition: ARX_c.cpp:776
ARX_EXTERN void arwSetTrackableOptionBool(int trackableUID, int option, bool value)
Set boolean options associated with a trackable.
Definition: ARX_c.cpp:617
ARX_EXTERN 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:206
ARX_EXTERN bool arwDrawVideoInit(const int videoSourceIndex)
Initialise drawing of video frames in a graphics context.
Definition: ARX_c.cpp:286
@ ARW_V_ALIGN_CENTRE
Align the centre of the video frame with the centre of the context.
Definition: ARX_c.h:295
@ ARW_V_ALIGN_TOP
Align the top edge of the video frame with the top edge of the context.
Definition: ARX_c.h:294
@ ARW_V_ALIGN_BOTTOM
Align the bottom edge of the video frame with the bottom edge of the context.
Definition: ARX_c.h:296
ARX_EXTERN bool arwChangeToResourcesDir(const char *resourcesDirectoryPath)
Changes the working directory to the resources directory used by artoolkitX.
Definition: ARX_c.cpp:114
ARX_EXTERN bool arwDrawVideoFinal(const int videoSourceIndex)
Finalise drawing of video frames in a graphics context.
Definition: ARX_c.cpp:307
ARX_EXTERN int arwRemoveAllTrackables()
Clears the collection of trackables.
Definition: ARX_c.cpp:475
ARX_EXTERN bool arwUpdateTexture32(uint32_t *buffer)
Asks the video source to push the most recent frame into the passed-in buffer.
Definition: ARX_c.cpp:271
@ 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:306
@ 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:303
@ 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:304
@ 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:305
ARX_EXTERN int arwGetTrackablePatternCount(int trackableUID)
Returns the number of pattern images associated with the specified trackable.
Definition: ARX_c.cpp:526
ARX_EXTERN bool arwStartRunningB(const char *vconf, const char *cparaBuff, const int cparaBuffLen)
Initialises and starts video capture.
Definition: ARX_c.cpp:139
ARX_EXTERN bool arwQueryTrackableVisibilityAndTransformation(int trackableUID, float matrix[16])
Returns the visibility and pose of the specified trackable.
Definition: ARX_c.cpp:495
@ ARW_TRACKER_OPTION_SQUARE_BORDER_SIZE
float in range (0-0.5).
Definition: ARX_c.h:405
@ ARW_TRACKER_OPTION_SQUARE_MATRIX_CODE_TYPE
int.
Definition: ARX_c.h:406
@ ARW_TRACKER_OPTION_NFT_MULTIMODE
int.
Definition: ARX_c.h:400
@ ARW_TRACKER_OPTION_SQUARE_THRESHOLD
Threshold value used for image binarization. int in range [0-255].
Definition: ARX_c.h:401
@ 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:410
@ ARW_TRACKER_OPTION_SQUARE_THRESHOLD_MODE
Threshold mode used for image binarization. int.
Definition: ARX_c.h:402
@ ARW_TRACKER_OPTION_SQUARE_IMAGE_PROC_MODE
int.
Definition: ARX_c.h:407
@ ARW_TRACKER_OPTION_2D_TRACKER_FEATURE_TYPE
Feature detector type used in the 2d Tracker - 0 AKAZE, 1 ORB, 2 BRISK, 3 KAZE.
Definition: ARX_c.h:411
@ 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:408
@ 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:409
@ ARW_TRACKER_OPTION_SQUARE_PATTERN_DETECTION_MODE
int.
Definition: ARX_c.h:404
@ ARW_TRACKER_OPTION_SQUARE_LABELING_MODE
int.
Definition: ARX_c.h:403
ARX_EXTERN void arwRegisterLogCallback(PFN_LOGCALLBACK callback)
Registers a callback function to use when a message is logged.
Definition: ARX_c.cpp:74
@ ARW_H_ALIGN_CENTRE
Align the centre of the video frame with the centre of the context.
Definition: ARX_c.h:286
@ ARW_H_ALIGN_LEFT
Align the left edge of the video frame with the left edge of the context.
Definition: ARX_c.h:285
@ ARW_H_ALIGN_RIGHT
Align the right edge of the video frame with the right edge of the context.
Definition: ARX_c.h:287
ARX_EXTERN bool arwCapture()
Captures a newest frame from the video source.
Definition: ARX_c.cpp:259
ARX_EXTERN bool arwIsRunning()
Returns true if artoolkitX is running, i.e.
Definition: ARX_c.cpp:157
ARX_EXTERN bool arwGetTrackablePatternImage(int trackableUID, int patternID, uint32_t *buffer)
Gets a pattern image associated with a trackable.
Definition: ARX_c.cpp:564
ARX_EXTERN void arwSetLogLevel(const int logLevel)
Definition: ARX_c.cpp:79
ARX_EXTERN bool arwQueryTrackableVisibilityAndTransformationStereo(int trackableUID, float matrixL[16], float matrixR[16])
Returns the visibility and stereo pose of the specified trackable.
Definition: ARX_c.cpp:508
ARX_EXTERN bool arwRemoveTrackable(int trackableUID)
Removes the trackable with the given unique identifier (UID).
Definition: ARX_c.cpp:469
ARX_EXTERN int arwGetTrackableOptionInt(int trackableUID, int option)
Get integer options associated with a trackable.
Definition: ARX_c.cpp:640
Defines error codes used in the ARX library.
bool visible
Definition: ARX_c.h:475
int uid
Definition: ARX_c.h:474