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

Loading...
Searching...
No Matches
ARX_c.h
Go to the documentation of this file.
1/*
2 * ARX_c.h
3 * artoolkitX
4 *
5 * This file is part of artoolkitX.
6 *
7 * artoolkitX is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * artoolkitX is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with artoolkitX. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * As a special exception, the copyright holders of this library give you
21 * permission to link this library with independent modules to produce an
22 * executable, regardless of the license terms of these independent modules, and to
23 * copy and distribute the resulting executable under terms of your choice,
24 * provided that you also meet, for each linked independent module, the terms and
25 * conditions of the license of that module. An independent module is a module
26 * which is neither derived from nor based on this library. If you modify this
27 * library, you may extend this exception to your version of the library, but you
28 * are not obligated to do so. If you do not wish to do so, delete this exception
29 * statement from your version.
30 *
31 * Copyright 2018 Realmax, Inc.
32 * Copyright 2015 Daqri, LLC.
33 * Copyright 2010-2015 ARToolworks, Inc.
34 *
35 * Author(s): Philip Lamb, Julian Looser.
36 *
37 */
38
39#ifndef ARX_C_H
40#define ARX_C_H
41
42#include <ARX/Platform.h>
43#include <ARX/Error.h>
44#include <stdint.h>
45
51#ifdef __cplusplus
52 extern "C" {
53#endif
54
60 ARX_EXTERN void arwRegisterLogCallback(PFN_LOGCALLBACK callback);
61
62 ARX_EXTERN void arwSetLogLevel(const int logLevel);
63
64 // ----------------------------------------------------------------------------------------------------
65#pragma mark artoolkitX lifecycle functions
66 // ----------------------------------------------------------------------------------------------------
73 ARX_EXTERN bool arwInitialiseAR();
74
82 ARX_EXTERN bool arwGetARToolKitVersion(char *buffer, int length);
83
105 ARX_EXTERN int arwGetError();
106
113 ARX_EXTERN bool arwChangeToResourcesDir(const char *resourcesDirectoryPath);
114
122 ARX_EXTERN bool arwStartRunning(const char *vconf, const char *cparaName);
123
132 ARX_EXTERN bool arwStartRunningB(const char *vconf, const char *cparaBuff, const int cparaBuffLen);
133
134 ARX_EXTERN bool arwStartRunningStereo(const char *vconfL, const char *cparaNameL, const char *vconfR, const char *cparaNameR, const char *transL2RName);
135
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);
137
142 ARX_EXTERN bool arwIsRunning();
143
148 ARX_EXTERN bool arwIsInited();
149
155 ARX_EXTERN bool arwStopRunning();
156
165 ARX_EXTERN bool arwShutdownAR();
166
167 // ----------------------------------------------------------------------------------------------------
168#pragma mark Video stream management
169 // ----------------------------------------------------------------------------------------------------
170
174 enum {
175 ARW_H_ALIGN_LEFT,
176 ARW_H_ALIGN_CENTRE,
177 ARW_H_ALIGN_RIGHT
178 };
179
183 enum {
184 ARW_V_ALIGN_TOP,
185 ARW_V_ALIGN_CENTRE,
186 ARW_V_ALIGN_BOTTOM
187 };
188
192 enum {
193 ARW_SCALE_MODE_STRETCH,
194 ARW_SCALE_MODE_FIT,
195 ARW_SCALE_MODE_FILL,
196 ARW_SCALE_MODE_1_TO_1
197 };
198
206 ARX_EXTERN bool arwGetProjectionMatrix(const float nearPlane, const float farPlane, float p[16]);
207
216 ARX_EXTERN bool arwGetProjectionMatrixStereo(const float nearPlane, const float farPlane, float pL[16], float pR[16]);
217
218 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]);
219
220 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]);
221
232 ARX_EXTERN bool arwGetVideoParams(int *width, int *height, int *pixelSize, char *pixelFormatStringBuffer, int pixelFormatStringBufferLen);
233
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);
250
255 ARX_EXTERN bool arwCapture();
256
262 ARX_EXTERN bool arwUpdateAR();
263
264 // ----------------------------------------------------------------------------------------------------
265#pragma mark Video push interface.
266 // ----------------------------------------------------------------------------------------------------
267 ARX_EXTERN int arwVideoPushInit(int videoSourceIndex, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition);
268 ARX_EXTERN int arwVideoPush(int videoSourceIndex,
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);
273 ARX_EXTERN int arwVideoPushFinal(int videoSourceIndex);
274
275 // ----------------------------------------------------------------------------------------------------
276#pragma mark Video stream retrieval and/or drawing.
277 // ----------------------------------------------------------------------------------------------------
278
287 ARX_EXTERN bool arwUpdateTexture32(uint32_t *buffer);
288
301 ARX_EXTERN bool arwUpdateTexture32Stereo(uint32_t *bufferL, uint32_t *bufferR);
302
324 ARX_EXTERN bool arwDrawVideoInit(const int videoSourceIndex);
325
371 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]);
372
391 ARX_EXTERN bool arwDrawVideo(const int videoSourceIndex);
392
408 ARX_EXTERN bool arwDrawVideoFinal(const int videoSourceIndex);
409
410 // ----------------------------------------------------------------------------------------------------
411#pragma mark Tracking configuration
412 // ----------------------------------------------------------------------------------------------------
416 enum {
417 ARW_TRACKER_OPTION_NFT_MULTIMODE = 0,
418 ARW_TRACKER_OPTION_SQUARE_THRESHOLD = 1,
419 ARW_TRACKER_OPTION_SQUARE_THRESHOLD_MODE = 2,
420 ARW_TRACKER_OPTION_SQUARE_LABELING_MODE = 3,
421 ARW_TRACKER_OPTION_SQUARE_PATTERN_DETECTION_MODE = 4,
422 ARW_TRACKER_OPTION_SQUARE_BORDER_SIZE = 5,
423 ARW_TRACKER_OPTION_SQUARE_MATRIX_CODE_TYPE = 6,
424 ARW_TRACKER_OPTION_SQUARE_IMAGE_PROC_MODE = 7,
425 ARW_TRACKER_OPTION_SQUARE_DEBUG_MODE = 8,
426 ARW_TRACKER_OPTION_SQUARE_PATTERN_SIZE = 9,
427 ARW_TRACKER_OPTION_SQUARE_PATTERN_COUNT_MAX = 10,
428 ARW_TRACKER_OPTION_2D_TRACKER_FEATURE_TYPE = 11,
429 ARW_TRACKER_OPTION_2D_MAXIMUM_MARKERS_TO_TRACK = 12,
430 ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES = 13,
431 ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES_DEFAULT_WIDTH = 14,
432 ARW_TRACKER_OPTION_2D_THREADED = 15,
433 };
434
440 ARX_EXTERN void arwSetTrackerOptionBool(int option, bool value);
441
447 ARX_EXTERN void arwSetTrackerOptionInt(int option, int value);
448
454 ARX_EXTERN void arwSetTrackerOptionFloat(int option, float value);
455
461 ARX_EXTERN bool arwGetTrackerOptionBool(int option);
462
468 ARX_EXTERN int arwGetTrackerOptionInt(int option);
469
475 ARX_EXTERN float arwGetTrackerOptionFloat(int option);
476
477 // ----------------------------------------------------------------------------------------------------
478#pragma mark Trackable management
479 // ----------------------------------------------------------------------------------------------------
480
494 ARX_EXTERN int arwAddTrackable(const char *cfg);
495
496#pragma pack(push, 4)
497 typedef struct {
498 int uid;
499 bool visible;
500 float matrix[16];
501 float matrixR[16]; // For stereo.
502 } ARWTrackableStatus;
503#pragma pack(pop)
504
509 ARX_EXTERN int arwGetTrackableCount(void);
510
519 ARX_EXTERN bool arwGetTrackableStatuses(ARWTrackableStatus *statuses, int statusesCount);
520
526 ARX_EXTERN bool arwRemoveTrackable(int trackableUID);
527
532 ARX_EXTERN int arwRemoveAllTrackables();
533
544 ARX_EXTERN bool arwQueryTrackableVisibilityAndTransformation(int trackableUID, float matrix[16]);
545
557 ARX_EXTERN bool arwQueryTrackableVisibilityAndTransformationStereo(int trackableUID, float matrixL[16], float matrixR[16]);
558
566 ARX_EXTERN int arwGetTrackablePatternCount(int trackableUID);
567
579 ARX_EXTERN bool arwGetTrackablePatternConfig(int trackableUID, int patternID, float matrix[16], float *width, float *height, int *imageSizeX, int *imageSizeY);
580
594 ARX_EXTERN bool arwGetTrackablePatternImage(int trackableUID, int patternID, uint32_t *buffer);
595
599 enum {
600 ARW_TRACKABLE_OPTION_TYPE = 0,
601 ARW_TRACKABLE_OPTION_FILTERED = 1,
602 ARW_TRACKABLE_OPTION_FILTER_SAMPLE_RATE = 2,
603 ARW_TRACKABLE_OPTION_FILTER_CUTOFF_FREQ = 3,
604 ARW_TRACKABLE_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION = 4,
605 ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE = 5,
606 ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE_CUTOFF = 6,
607 ARW_TRACKABLE_OPTION_NFT_SCALE = 7,
608 ARW_TRACKABLE_OPTION_MULTI_MIN_SUBMARKERS = 8,
609 ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_MATRIX = 9,
610 ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_PATTERN = 10,
611 ARW_TRACKABLE_OPTION_MULTI_MIN_INLIER_PROB = 11,
612 ARW_TRACKABLE_OPTION_SQUARE_WIDTH = 12,
613 ARW_TRACKABLE_OPTION_2D_SCALE = 13,
614 };
615
616 enum
617 {
618 ARW_TRACKABLE_TYPE_Unknown = -1,
619 ARW_TRACKABLE_TYPE_Square = 0,
620 ARW_TRACKABLE_TYPE_SquareBarcode = 1,
621 ARW_TRACKABLE_TYPE_Multimarker = 2,
622 ARW_TRACKABLE_TYPE_NFT = 3,
623 ARW_TRACKABLE_TYPE_TwoD = 4,
624 };
625
632 ARX_EXTERN void arwSetTrackableOptionBool(int trackableUID, int option, bool value);
633
640 ARX_EXTERN void arwSetTrackableOptionInt(int trackableUID, int option, int value);
641
648 ARX_EXTERN void arwSetTrackableOptionFloat(int trackableUID, int option, float value);
649
656 ARX_EXTERN bool arwGetTrackableOptionBool(int trackableUID, int option);
657
664 ARX_EXTERN int arwGetTrackableOptionInt(int trackableUID, int option);
665
672 ARX_EXTERN float arwGetTrackableOptionFloat(int trackableUID, int option);
673
674 enum {
675 ARW_TRACKABLE_EVENT_TYPE_NONE = 0,
676 ARW_TRACKABLE_EVENT_TYPE_AUTOCREATED = 1,
677 ARW_TRACKABLE_EVENT_TYPE_AUTOREMOVED = 2,
678 };
679
680 ARX_EXTERN void arwRegisterTrackableEventCallback(PFN_TRACKABLEEVENTCALLBACK callback);
681
687 ARX_EXTERN bool arwLoad2dTrackableDatabase(const char *databaseFileName);
688
694 ARX_EXTERN bool arwSave2dTrackableDatabase(const char *databaseFileName);
695
696 // ----------------------------------------------------------------------------------------------------
697#pragma mark Utility
698 // ----------------------------------------------------------------------------------------------------
722 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]);
723
724 // ----------------------------------------------------------------------------------------------------
725#pragma mark Video source info list management
726 // ----------------------------------------------------------------------------------------------------
727
743 ARX_EXTERN int arwCreateVideoSourceInfoList(char *config);
744
766 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);
767
771 ARX_EXTERN void arwDeleteVideoSourceInfoList(void);
772
773#ifdef __cplusplus
774}
775#endif
776#endif // !ARX_C_H
arwSave2dTrackableDatabase
ARX_EXTERN bool arwSave2dTrackableDatabase(const char *databaseFileName)
Save the currently loaded 2D trackable set as a trackable database.
arwGetVideoParams
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:256
ARW_TRACKABLE_TYPE_Square
@ ARW_TRACKABLE_TYPE_Square
A square template (pattern) marker.
Definition: ARX_c.h:619
ARW_TRACKABLE_TYPE_TwoD
@ ARW_TRACKABLE_TYPE_TwoD
An artoolkitX 2D textured trackable.
Definition: ARX_c.h:623
ARW_TRACKABLE_TYPE_SquareBarcode
@ ARW_TRACKABLE_TYPE_SquareBarcode
A square matrix (2D barcode) marker.
Definition: ARX_c.h:620
ARW_TRACKABLE_TYPE_Unknown
@ ARW_TRACKABLE_TYPE_Unknown
Type not known, e.g. autocreated trackable.
Definition: ARX_c.h:618
ARW_TRACKABLE_TYPE_Multimarker
@ ARW_TRACKABLE_TYPE_Multimarker
Multiple square markers treated as a single marker.
Definition: ARX_c.h:621
ARW_TRACKABLE_TYPE_NFT
@ ARW_TRACKABLE_TYPE_NFT
A legacy NFT marker.
Definition: ARX_c.h:622
arwSetTrackerOptionBool
ARX_EXTERN void arwSetTrackerOptionBool(int option, bool value)
Set boolean options associated with a tracker.
Definition: ARX_c.cpp:391
arwGetError
ARX_EXTERN int arwGetError()
Return error information Returns the value of the error flag.
Definition: ARX_c.cpp:110
arwGetTrackablePatternConfig
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:644
arwGetVideoSourceInfoListEntry
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)
Get an entry from the video source info list describing the name, model, UID, flags,...
Definition: ARX_c.cpp:946
arwUpdateTexture32Stereo
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:312
arwShutdownAR
ARX_EXTERN bool arwShutdownAR()
Shuts down the artoolkitX and frees all resources.
Definition: ARX_c.cpp:177
arwSetTrackableOptionInt
ARX_EXTERN void arwSetTrackableOptionInt(int trackableUID, int option, int value)
Set integer options associated with a trackable.
Definition: ARX_c.cpp:778
arwVideoPush
ARX_EXTERN 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)
Definition: ARX_c.cpp:338
arwGetTrackerOptionBool
ARX_EXTERN bool arwGetTrackerOptionBool(int option)
Get boolean options associated with a tracker.
Definition: ARX_c.cpp:457
arwIsInited
ARX_EXTERN bool arwIsInited()
Returns true if artoolkitX is initialized and read for adding trackables.
Definition: ARX_c.cpp:165
arwSetTrackableOptionFloat
ARX_EXTERN void arwSetTrackableOptionFloat(int trackableUID, int option, float value)
Set floating-point options associated with a trackable.
Definition: ARX_c.cpp:858
arwGetProjectionMatrixForViewportSizeAndFittingMode
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:225
arwInitialiseAR
ARX_EXTERN bool arwInitialiseAR()
Initialises the artoolkitX.
Definition: ARX_c.cpp:92
arwStartRunning
ARX_EXTERN bool arwStartRunning(const char *vconf, const char *cparaName)
Initialises and starts video capture.
Definition: ARX_c.cpp:135
arwDrawVideo
ARX_EXTERN bool arwDrawVideo(const int videoSourceIndex)
Draws the latest frame from the video source in the active graphics context.
Definition: ARX_c.cpp:373
arwGetProjectionMatrixForViewportSizeAndFittingModeStereo
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:230
arwStartRunningStereoB
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:153
arwGetTrackableOptionFloat
ARX_EXTERN float arwGetTrackableOptionFloat(int trackableUID, int option)
Get floating-point options associated with a trackable.
Definition: ARX_c.cpp:798
ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES_DEFAULT_WIDTH
@ 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:431
ARW_TRACKER_OPTION_SQUARE_BORDER_SIZE
@ ARW_TRACKER_OPTION_SQUARE_BORDER_SIZE
float in range (0-0.5).
Definition: ARX_c.h:422
ARW_TRACKER_OPTION_SQUARE_MATRIX_CODE_TYPE
@ ARW_TRACKER_OPTION_SQUARE_MATRIX_CODE_TYPE
int.
Definition: ARX_c.h:423
ARW_TRACKER_OPTION_NFT_MULTIMODE
@ ARW_TRACKER_OPTION_NFT_MULTIMODE
int.
Definition: ARX_c.h:417
ARW_TRACKER_OPTION_SQUARE_MATRIX_MODE_AUTOCREATE_NEW_TRACKABLES
@ 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:430
ARW_TRACKER_OPTION_SQUARE_THRESHOLD
@ ARW_TRACKER_OPTION_SQUARE_THRESHOLD
Threshold value used for image binarization. int in range [0-255].
Definition: ARX_c.h:418
ARW_TRACKER_OPTION_SQUARE_PATTERN_COUNT_MAX
@ 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:427
ARW_TRACKER_OPTION_2D_MAXIMUM_MARKERS_TO_TRACK
@ 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:429
ARW_TRACKER_OPTION_SQUARE_THRESHOLD_MODE
@ ARW_TRACKER_OPTION_SQUARE_THRESHOLD_MODE
Threshold mode used for image binarization. int.
Definition: ARX_c.h:419
ARW_TRACKER_OPTION_SQUARE_IMAGE_PROC_MODE
@ ARW_TRACKER_OPTION_SQUARE_IMAGE_PROC_MODE
int.
Definition: ARX_c.h:424
ARW_TRACKER_OPTION_2D_TRACKER_FEATURE_TYPE
@ 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:428
ARW_TRACKER_OPTION_SQUARE_DEBUG_MODE
@ 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:425
ARW_TRACKER_OPTION_2D_THREADED
@ ARW_TRACKER_OPTION_2D_THREADED
bool, If false, 2D tracking updates synchronously, and arwUpdateAR will not return until 2D tracking ...
Definition: ARX_c.h:432
ARW_TRACKER_OPTION_SQUARE_PATTERN_SIZE
@ 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:426
ARW_TRACKER_OPTION_SQUARE_PATTERN_DETECTION_MODE
@ ARW_TRACKER_OPTION_SQUARE_PATTERN_DETECTION_MODE
int.
Definition: ARX_c.h:421
ARW_TRACKER_OPTION_SQUARE_LABELING_MODE
@ ARW_TRACKER_OPTION_SQUARE_LABELING_MODE
int.
Definition: ARX_c.h:420
arwGetVideoParamsStereo
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:270
arwStartRunningStereo
ARX_EXTERN bool arwStartRunningStereo(const char *vconfL, const char *cparaNameL, const char *vconfR, const char *cparaNameR, const char *transL2RName)
Definition: ARX_c.cpp:147
arwStopRunning
ARX_EXTERN bool arwStopRunning()
Stops video capture and frees video capture resources.
Definition: ARX_c.cpp:171
arwSetTrackerOptionInt
ARX_EXTERN void arwSetTrackerOptionInt(int option, int value)
Set integer options associated with a tracker.
Definition: ARX_c.cpp:411
arwVideoPushInit
ARX_EXTERN int arwVideoPushInit(int videoSourceIndex, int width, int height, const char *pixelFormat, int cameraIndex, int cameraPosition)
Definition: ARX_c.cpp:331
ARW_TRACKABLE_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION
@ ARW_TRACKABLE_OPTION_SQUARE_USE_CONT_POSE_ESTIMATION
bool, true to use continuous pose estimate.
Definition: ARX_c.h:604
ARW_TRACKABLE_OPTION_TYPE
@ ARW_TRACKABLE_OPTION_TYPE
readonly int enum, trackable type as per ARW_TRACKABLE_TYPE_* enum .
Definition: ARX_c.h:600
ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_MATRIX
@ ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_MATRIX
float, minimum confidence value for submarker matrix tracking to be valid.
Definition: ARX_c.h:609
ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE_CUTOFF
@ ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE_CUTOFF
float, minimum allowable confidence value used in marker matching.
Definition: ARX_c.h:606
ARW_TRACKABLE_OPTION_FILTER_CUTOFF_FREQ
@ ARW_TRACKABLE_OPTION_FILTER_CUTOFF_FREQ
float, cutoff frequency of filter.
Definition: ARX_c.h:603
ARW_TRACKABLE_OPTION_NFT_SCALE
@ ARW_TRACKABLE_OPTION_NFT_SCALE
float, scale factor applied to NFT marker size.
Definition: ARX_c.h:607
ARW_TRACKABLE_OPTION_FILTERED
@ ARW_TRACKABLE_OPTION_FILTERED
bool, true for filtering enabled.
Definition: ARX_c.h:601
ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE
@ ARW_TRACKABLE_OPTION_SQUARE_CONFIDENCE
float, confidence value of most recent marker match
Definition: ARX_c.h:605
ARW_TRACKABLE_OPTION_2D_SCALE
@ ARW_TRACKABLE_OPTION_2D_SCALE
float, 2D trackable scale (i.e. width).
Definition: ARX_c.h:613
ARW_TRACKABLE_OPTION_MULTI_MIN_SUBMARKERS
@ ARW_TRACKABLE_OPTION_MULTI_MIN_SUBMARKERS
int, minimum number of submarkers for tracking to be valid.
Definition: ARX_c.h:608
ARW_TRACKABLE_OPTION_FILTER_SAMPLE_RATE
@ ARW_TRACKABLE_OPTION_FILTER_SAMPLE_RATE
float, sample rate for filter calculations.
Definition: ARX_c.h:602
ARW_TRACKABLE_OPTION_MULTI_MIN_INLIER_PROB
@ ARW_TRACKABLE_OPTION_MULTI_MIN_INLIER_PROB
float, minimum inlier probability value for robust multimarker pose estimation (range 1....
Definition: ARX_c.h:611
ARW_TRACKABLE_OPTION_SQUARE_WIDTH
@ ARW_TRACKABLE_OPTION_SQUARE_WIDTH
float, square marker width
Definition: ARX_c.h:612
ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_PATTERN
@ ARW_TRACKABLE_OPTION_MULTI_MIN_CONF_PATTERN
float, minimum confidence value for submarker pattern tracking to be valid.
Definition: ARX_c.h:610
arwGetTrackableStatuses
ARX_EXTERN bool arwGetTrackableStatuses(ARWTrackableStatus *statuses, int statusesCount)
Gets status of trackables.
Definition: ARX_c.cpp:550
arwDrawVideoSettings
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:366
arwGetTrackableOptionBool
ARX_EXTERN bool arwGetTrackableOptionBool(int trackableUID, int option)
Get boolean options associated with a trackable.
Definition: ARX_c.cpp:685
arwSetTrackerOptionFloat
ARX_EXTERN void arwSetTrackerOptionFloat(int option, float value)
Set floating-point options associated with a tracker.
Definition: ARX_c.cpp:444
arwGetTrackerOptionInt
ARX_EXTERN int arwGetTrackerOptionInt(int option)
Get integer options associated with a tracker.
Definition: ARX_c.cpp:477
arwGetProjectionMatrix
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:199
arwAddTrackable
ARX_EXTERN int arwAddTrackable(const char *cfg)
Adds a trackable as specified in the given configuration string.
Definition: ARX_c.cpp:538
arwUpdateAR
ARX_EXTERN bool arwUpdateAR()
Performs tracking and trackable updates.
Definition: ARX_c.cpp:300
arwGetTrackerOptionFloat
ARX_EXTERN float arwGetTrackerOptionFloat(int option)
Get floating-point options associated with a tracker.
Definition: ARX_c.cpp:509
arwRegisterTrackableEventCallback
ARX_EXTERN void arwRegisterTrackableEventCallback(PFN_TRACKABLEEVENTCALLBACK callback)
Definition: ARX_c.cpp:531
arwGetARToolKitVersion
ARX_EXTERN bool arwGetARToolKitVersion(char *buffer, int length)
Gets the artoolkitX version as a string, such as "10.0.0".
Definition: ARX_c.cpp:98
arwLoadOpticalParams
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:907
arwSetTrackableOptionBool
ARX_EXTERN void arwSetTrackableOptionBool(int trackableUID, int option, bool value)
Set boolean options associated with a trackable.
Definition: ARX_c.cpp:709
arwGetProjectionMatrixStereo
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:204
arwDrawVideoInit
ARX_EXTERN bool arwDrawVideoInit(const int videoSourceIndex)
Initialise drawing of video frames in a graphics context.
Definition: ARX_c.cpp:359
ARW_H_ALIGN_CENTRE
@ 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
@ 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
@ ARW_H_ALIGN_RIGHT
Align the right edge of the video frame with the right edge of the context.
Definition: ARX_c.h:177
arwCreateVideoSourceInfoList
ARX_EXTERN int arwCreateVideoSourceInfoList(char *config)
Create a video source info list using the supplied video configuration string.
Definition: ARX_c.cpp:930
arwChangeToResourcesDir
ARX_EXTERN bool arwChangeToResourcesDir(const char *resourcesDirectoryPath)
Changes the working directory to the resources directory used by artoolkitX.
Definition: ARX_c.cpp:116
arwDrawVideoFinal
ARX_EXTERN bool arwDrawVideoFinal(const int videoSourceIndex)
Finalise drawing of video frames in a graphics context.
Definition: ARX_c.cpp:380
arwRemoveAllTrackables
ARX_EXTERN int arwRemoveAllTrackables()
Clears the collection of trackables.
Definition: ARX_c.cpp:581
arwGetTrackableCount
ARX_EXTERN int arwGetTrackableCount(void)
Gets current number of trackables.
Definition: ARX_c.cpp:544
arwUpdateTexture32
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:306
ARW_V_ALIGN_CENTRE
@ 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
@ 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
@ 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_EVENT_TYPE_AUTOCREATED
@ ARW_TRACKABLE_EVENT_TYPE_AUTOCREATED
Definition: ARX_c.h:676
ARW_TRACKABLE_EVENT_TYPE_AUTOREMOVED
@ ARW_TRACKABLE_EVENT_TYPE_AUTOREMOVED
Definition: ARX_c.h:677
ARW_TRACKABLE_EVENT_TYPE_NONE
@ ARW_TRACKABLE_EVENT_TYPE_NONE
Definition: ARX_c.h:675
arwGetTrackablePatternCount
ARX_EXTERN int arwGetTrackablePatternCount(int trackableUID)
Returns the number of pattern images associated with the specified trackable.
Definition: ARX_c.cpp:632
arwStartRunningB
ARX_EXTERN bool arwStartRunningB(const char *vconf, const char *cparaBuff, const int cparaBuffLen)
Initialises and starts video capture.
Definition: ARX_c.cpp:141
arwDeleteVideoSourceInfoList
ARX_EXTERN void arwDeleteVideoSourceInfoList(void)
Delete a video source info list.
Definition: ARX_c.cpp:988
arwLoad2dTrackableDatabase
ARX_EXTERN bool arwLoad2dTrackableDatabase(const char *databaseFileName)
Load a 2D trackable set from a trackable database.
arwQueryTrackableVisibilityAndTransformation
ARX_EXTERN bool arwQueryTrackableVisibilityAndTransformation(int trackableUID, float matrix[16])
Returns the visibility and pose of the specified trackable.
Definition: ARX_c.cpp:601
ARW_SCALE_MODE_1_TO_1
@ 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
@ 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
@ 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
@ 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
arwRegisterLogCallback
ARX_EXTERN void arwRegisterLogCallback(PFN_LOGCALLBACK callback)
Registers a callback function to use when a message is logged.
Definition: ARX_c.cpp:76
arwCapture
ARX_EXTERN bool arwCapture()
Captures a newest frame from the video source.
Definition: ARX_c.cpp:294
arwIsRunning
ARX_EXTERN bool arwIsRunning()
Returns true if artoolkitX is running, i.e.
Definition: ARX_c.cpp:159
arwVideoPushFinal
ARX_EXTERN int arwVideoPushFinal(int videoSourceIndex)
Definition: ARX_c.cpp:349
arwGetTrackablePatternImage
ARX_EXTERN bool arwGetTrackablePatternImage(int trackableUID, int patternID, uint32_t *buffer)
Gets a pattern image associated with a trackable.
Definition: ARX_c.cpp:668
arwSetLogLevel
ARX_EXTERN void arwSetLogLevel(const int logLevel)
Definition: ARX_c.cpp:81
arwQueryTrackableVisibilityAndTransformationStereo
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:614
arwRemoveTrackable
ARX_EXTERN bool arwRemoveTrackable(int trackableUID)
Removes the trackable with the given unique identifier (UID).
Definition: ARX_c.cpp:575
arwGetTrackableOptionInt
ARX_EXTERN int arwGetTrackableOptionInt(int trackableUID, int option)
Get integer options associated with a trackable.
Definition: ARX_c.cpp:732
Error.h
Defines error codes used in the ARX library.
Platform.h
PFN_LOGCALLBACK
void(CALL_CONV * PFN_LOGCALLBACK)(const char *msg)
Definition: Platform.h:101
PFN_TRACKABLEEVENTCALLBACK
void(CALL_CONV * PFN_TRACKABLEEVENTCALLBACK)(int trackableEventType, int trackableUID)
Definition: Platform.h:103
ARWTrackableStatus
Definition: ARX_c.h:497
ARWTrackableStatus::visible
bool visible
Definition: ARX_c.h:499
ARWTrackableStatus::uid
int uid
Definition: ARX_c.h:498