68#include <ARX/AR/config.h>
72# include <android/log.h>
81#define arMalloc(V,T,S) \
82{ if( ((V) = (T *)malloc( sizeof(T) * (S) )) == NULL ) \
83{ARLOGe("Out of memory!!\n"); exit(1);} }
85#define arMallocClear(V,T,S) \
86{ if( ((V) = (T *)calloc( (S), sizeof(T) )) == NULL ) \
87{ARLOGe("Out of memory!!\n"); exit(1);} }
96#ifdef ARDOUBLE_IS_FLOAT
125# define AR_EXTERN __declspec(dllexport)
127# define AR_EXTERN __declspec(dllimport)
202#define AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT 10
248#if !AR_DISABLE_LABELING_DEBUG_MODE
305#define AR_MATRIX_CODE_TYPE_SIZE_MASK 0x000000ff
306#define AR_MATRIX_CODE_TYPE_ECC_NONE 0x00000000
307#define AR_MATRIX_CODE_TYPE_ECC_PARITY 0x00000100
308#define AR_MATRIX_CODE_TYPE_ECC_HAMMING 0x00000200
309#define AR_MATRIX_CODE_TYPE_ECC_BCH___3 0x00000300
310#define AR_MATRIX_CODE_TYPE_ECC_BCH___5 0x00000400
311#define AR_MATRIX_CODE_TYPE_ECC_BCH___7 0x00000500
312#define AR_MATRIX_CODE_TYPE_ECC_BCH___9 0x00000600
313#define AR_MATRIX_CODE_TYPE_ECC_BCH___11 0x00000700
314#define AR_MATRIX_CODE_TYPE_ECC_BCH___19 0x00000b00
388#define AR_TRANS_MAT_IDENTITY ICP_TRANS_MAT_IDENTITY
923 int debugMode,
int labelingMode,
int labelingThresh,
int imageProcMode,
926 int areaMax,
int areaMin,
ARdouble squareFitThresh,
1068 int imageProcMode,
ARMarkerInfo *marker_info,
ARdouble pattRatio,
int pattSize,
const char *filename );
1144#if !AR_DISABLE_NON_CORE_FNS
1146 ARUint8 *image,
int xsize,
int ysize, AR_PIXEL_FORMAT pixelFormat,
1147 int *x_coord,
int *y_coord,
int *vertex,
ARdouble pattRatio,
1150 ARUint8 *image,
int xsize,
int ysize, AR_PIXEL_FORMAT pixelFormat,
1151 int *x_coord,
int *y_coord,
int *vertex,
ARdouble pattRatio,
1178 int *codePatt,
int *dirPatt,
ARdouble *cfPatt,
int *codeMatrix,
int *dirMatrix,
ARdouble *cfMatrix,
1208 int *codePatt,
int *dirPatt,
ARdouble *cfPatt,
int *codeMatrix,
int *dirMatrix,
ARdouble *cfMatrix,
1209 const AR_MATRIX_CODE_TYPE matrixCodeType,
int *errorCorrected, uint64_t *codeGlobalID_p );
1229 ARUint8 *image,
int xsize,
int ysize, AR_PIXEL_FORMAT pixelFormat,
ARParamLTf *arParamLTf,
1247 int overSampleScale,
ARUint8 *outImage );
1496#ifdef ARDOUBLE_IS_FLOAT
1497#define arUtilMatInvf arUtilMatInv
1498#define arUtilMatMulf arUtilMatMul
1499#define arUtilMatMuldff arUtilMatMul
1516 ARdouble pos[][2],
int area[],
int label_num,
1517 int l1,
int x1,
int y1,
1518 int l2,
int x2,
int y2,
1752# define ARPRINT(...) __android_log_print(ANDROID_LOG_INFO, "artoolkitx", __VA_ARGS__)
1753# define ARPRINTE(...) __android_log_print(ANDROID_LOG_ERROR, "artoolkitx", __VA_ARGS__)
1755# define ARPRINT(...) printf(__VA_ARGS__)
1756# define ARPRINTE(...) fprintf(stderr, __VA_ARGS__)
AR_EXTERN AR_MATRIX_CODE_TYPE arGetMatrixCodeType(ARHandle *handle)
Get the size and ECC algorithm being used for matrix code (2D barcode) marker detection.
Definition: arCreateHandle.c:323
AR_EXTERN int arGetMarkerInfo(ARUint8 *image, int xsize, int ysize, int pixelFormat, ARMarkerInfo2 *markerInfo2, int marker2_num, ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARParamLTf *arParamLTf, ARdouble pattRatio, ARMarkerInfo *markerInfo, int *marker_num, const AR_MATRIX_CODE_TYPE matrixCodeType)
Examine a set of detected squares for match with known markers.
Definition: arGetMarkerInfo.c:51
unsigned char ARUint8
Definition: ar.h:92
AR_EXTERN int arUtilGetSquareCenter(ARdouble vertex[4][2], ARdouble *x, ARdouble *y)
Definition: arUtil.c:125
AR_EXTERN ARdouble arGetTransMatStereo(AR3DStereoHandle *handle, ARdouble initConv[3][4], ARdouble pos2dL[][2], ARdouble pos3dL[][3], int numL, ARdouble pos2dR[][2], ARdouble pos3dR[][3], int numR, ARdouble conv[3][4])
Definition: arGetTransMatStereo.c:222
AR_EXTERN ARUint32 arGetVersion(char **versionStringRef)
Get the artoolkitX version information in numberic and string format.
Definition: arUtil.c:102
AR_EXTERN char * arUtilGetDirectoryNameFromPath(char *dir, const char *path, const size_t n, const int addSeparator)
Definition: arUtil.c:532
AR_EXTERN int arGetLabelingMode(ARHandle *handle)
Enquire whether detection is looking for black markers or white markers.
Definition: arCreateHandle.c:160
AR_MATRIX_CODE_TYPE
Values specifying the type of matrix code in use.
Definition: ar.h:319
@ AR_MATRIX_CODE_5x5_BCH_22_12_5
Matrix code in range 0-4095.
Definition: ar.h:326
@ AR_MATRIX_CODE_5x5_BCH_22_7_7
Matrix code in range 0-127.
Definition: ar.h:327
@ AR_MATRIX_CODE_3x3_HAMMING63
Matrix code in range 0-7.
Definition: ar.h:322
@ AR_MATRIX_CODE_4x4_BCH_13_9_3
Matrix code in range 0-511.
Definition: ar.h:324
@ AR_MATRIX_CODE_5x5
Matrix code in range 0-4194303.
Definition: ar.h:328
@ AR_MATRIX_CODE_3x3_PARITY65
Matrix code in range 0-31.
Definition: ar.h:321
@ AR_MATRIX_CODE_6x6
Matrix code in range 0-8589934591.
Definition: ar.h:329
@ AR_MATRIX_CODE_4x4_BCH_13_5_5
Matrix code in range 0-31.
Definition: ar.h:325
@ AR_MATRIX_CODE_3x3
Matrix code in range 0-63.
Definition: ar.h:320
@ AR_MATRIX_CODE_GLOBAL_ID
Definition: ar.h:330
@ AR_MATRIX_CODE_4x4
Matrix code in range 0-8191.
Definition: ar.h:323
AR_EXTERN int arGetLine(int x_coord[], int y_coord[], int coord_num, int vertex[], ARParamLTf *paramLTf, ARdouble line[4][3], ARdouble v[4][2])
Definition: arGetLine.c:66
AR_EXTERN int arPattGetIDGlobal(ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *arParamLTf, ARdouble vertex[4][2], ARdouble pattRatio, int *codePatt, int *dirPatt, ARdouble *cfPatt, int *codeMatrix, int *dirMatrix, ARdouble *cfMatrix, const AR_MATRIX_CODE_TYPE matrixCodeType, int *errorCorrected, uint64_t *codeGlobalID_p)
Match the interior of a detected square against known patterns with variable border width.
Definition: arPattGetID.c:184
AR_EXTERN AR3DHandle * ar3DCreateHandle2(const ARdouble cpara[3][4])
Create handle used for 3D calculation from an intrinsic parameters matrix.
Definition: ar3DCreateHandle.c:57
AR_EXTERN int ar3DStereoChangeTransMat(AR3DStereoHandle *handle, ARdouble transL[3][4], ARdouble transR[3][4])
Definition: ar3DCreateHandle.c:162
AR_EXTERN void arSetMarkerExtractionMode(ARHandle *handle, int mode)
Set the marker extraction mode.
Definition: arCreateHandle.c:337
AR_EXTERN int arPattLoadFromBuffer(ARPattHandle *pattHandle, const char *buffer)
Definition: arPattLoad.c:55
AR_EXTERN int arUtilDivideExt(const char *filename, char *s1, char *s2)
Definition: arUtil.c:1341
AR_EXTERN int arUtilQuatPos2Mat(const ARdouble q[4], const ARdouble p[3], ARdouble m[3][4])
Definition: arUtil.c:323
AR_EXTERN ARdouble arGetTransMatRobust(AR3DHandle *handle, ARdouble initConv[3][4], ARdouble pos2d[][2], ARdouble pos3d[][3], int num, ARdouble conv[3][4])
(description)
Definition: arGetTransMat.c:175
AR_EXTERN int arUtilReplaceExt(char *filename, int n, char *ext)
Definition: arUtil.c:1306
AR_EXTERN ARdouble arGetTransMatSquareStereo(AR3DStereoHandle *handle, ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR, ARdouble width, ARdouble conv[3][4])
Definition: arGetTransMatStereo.c:55
AR_EXTERN void arSetBorderSize(ARHandle *handle, const ARdouble borderSize)
Set the border size.
Definition: arCreateHandle.c:360
AR_EXTERN int arPattGetImage2(int imageProcMode, int pattDetectMode, int patt_size, int sample_size, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *arParamLTf, ARdouble vertex[4][2], ARdouble pattRatio, ARUint8 *ext_patt)
Extract the image (i.e. locate and unwarp) of the pattern-space portion of a detected square.
Definition: arPattGetID.c:841
AR_EXTERN void arSetMatrixCodeType(ARHandle *handle, const AR_MATRIX_CODE_TYPE type)
Set the size and ECC algorithm to be used for matrix code (2D barcode) marker detection.
Definition: arCreateHandle.c:316
AR_EXTERN ARdouble arGetPattRatio(ARHandle *handle)
Get the width/height of the marker pattern space, as a proportion of marker width/height.
Definition: arCreateHandle.c:383
AR_EXTERN AR_PIXEL_FORMAT arGetPixelFormat(ARHandle *handle)
Get the expected pixel format for video frames being passed to arDetectMarker.
Definition: arCreateHandle.c:438
AR_EXTERN int ar3DStereoDeleteHandle(AR3DStereoHandle **handle)
Definition: ar3DCreateHandle.c:129
AR_EXTERN int arUtilMatInv(const ARdouble s[3][4], ARdouble d[3][4])
Definition: arUtil.c:202
AR_EXTERN int arPattGetID2(ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *arParamLTf, ARdouble vertex[4][2], ARdouble pattRatio, int *codePatt, int *dirPatt, ARdouble *cfPatt, int *codeMatrix, int *dirMatrix, ARdouble *cfMatrix, const AR_MATRIX_CODE_TYPE matrixCodeType)
Match the interior of a detected square against known patterns.
Definition: arPattGetID.c:173
AR_EXTERN void arSetPatternDetectionMode(ARHandle *handle, int mode)
Set the pattern detection mode.
Definition: arCreateHandle.c:298
AR_EXTERN int arPattGetID(ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, int *x_coord, int *y_coord, int *vertex, ARdouble pattRatio, int *code, int *dir, ARdouble *cf, const AR_MATRIX_CODE_TYPE matrixCodeType)
Definition: arPattGetID.c:109
AR_EXTERN int arPattAttach(ARHandle *arHandle, ARPattHandle *pattHandle)
Associate a set of patterns with an ARHandle.
Definition: arPattAttach.c:51
float ARfloat
Definition: ar.h:95
AR_EXTERN int ar3DStereoChangeLoopBreakThreshRatio(AR3DStereoHandle *handle, ARdouble loopBreakThreshRatio)
Definition: ar3DCreateHandle.c:150
AR_EXTERN ARPattHandle * arPattCreateHandle2(const int pattSize, const int patternCountMax)
Allocate a pattern handle and set pattern template size and maximum number of patterns loadable.
Definition: arPattCreateHandle.c:58
AR_EXTERN int arPattDeactivate(ARPattHandle *pattHandle, int patno)
Deactivate a previously activated pattern.
Definition: arPattLoad.c:179
AR_EXTERN ARdouble arGetAreaMax(ARHandle *handle)
Definition: arCreateHandle.c:468
AR_EXTERN int arUtilSortLabel(int mask[], int m, int n, ARdouble pos[][2], int area[], int label_num, int l1, int x1, int y1, int l2, int x2, int y2, int label[])
AR_EXTERN int arGetLabelingThresh(ARHandle *handle)
Get the current labeling threshold.
Definition: arCreateHandle.c:176
#define AR_MATRIX_CODE_TYPE_ECC_BCH___5
BCH code with Hamming distance of 5.
Definition: ar.h:310
AR_EXTERN void arSetImageProcMode(ARHandle *handle, int mode)
Set the image processing mode.
Definition: arCreateHandle.c:276
AR_EXTERN int ar3DDeleteHandle(AR3DHandle **handle)
Delete handle used for 3D calculation.
Definition: ar3DCreateHandle.c:72
AR_EXTERN ARMarkerInfo * arGetMarker(ARHandle *arHandle)
Get information on the markers detected in a video frame.
Definition: arCreateHandle.c:519
#define AR_MATRIX_CODE_TYPE_ECC_PARITY
Single-bit parity.
Definition: ar.h:307
AR_EXTERN int arLabeling(ARUint8 *imageLuma, int xsize, int ysize, int debugMode, int labelingMode, int labelingThresh, int imageProcMode, ARLabelInfo *labelInfo, ARUint8 *image_thresh)
Definition: arLabeling.c:55
AR_EXTERN void arSetAreaMin(ARHandle *handle, const ARdouble areaMin)
Definition: arCreateHandle.c:475
AR_EXTERN int arPattFree(ARPattHandle *pattHandle, int patno)
Frees (unloads) a pattern file from memory.
Definition: arPattLoad.c:160
AR_EXTERN ARdouble arGetBorderSize(ARHandle *handle)
Get the border size.
Definition: arCreateHandle.c:368
double ARdouble
Definition: ar.h:99
AR_EXTERN ARdouble arGetTransMat(AR3DHandle *handle, ARdouble initConv[3][4], ARdouble pos2d[][2], ARdouble pos3d[][3], int num, ARdouble conv[3][4])
(description)
Definition: arGetTransMat.c:146
AR_EXTERN int arGetCornerRefinementMode(ARHandle *handle)
Find out whether square tracking subpixel corner refinement is enabled.
Definition: arCreateHandle.c:505
short ARInt16
Definition: ar.h:90
AR_EXTERN const char * arUtilGetFileNameFromPath(const char *path)
Definition: arUtil.c:449
#define AR_MATRIX_CODE_TYPE_ECC_HAMMING
Hamming code with Hamming distance of 3.
Definition: ar.h:308
AR_EXTERN int arUtilQuatNorm(ARdouble q[4])
Definition: arUtil.c:372
AR_EXTERN int ar3DChangeLoopBreakThresh(AR3DHandle *handle, ARdouble loopBreakThresh)
(description)
Definition: ar3DCreateHandle.c:94
AR_EXTERN int arUtilGetPixelSize(const AR_PIXEL_FORMAT arPixelFormat)
Get the size in bytes of a single pixel for a given pixel format.
Definition: arUtil.c:394
AR_EXTERN ARPattHandle * arPattCreateHandle(void)
Allocate a pattern handle.
Definition: arPattCreateHandle.c:53
AR_EXTERN int arGetPatternDetectionMode(ARHandle *handle)
Get the pattern detection mode.
Definition: arCreateHandle.c:330
AR_EXTERN ARdouble arGetTransMatStereoRobust(AR3DStereoHandle *handle, ARdouble initConv[3][4], ARdouble pos2dL[][2], ARdouble pos3dL[][3], int numL, ARdouble pos2dR[][2], ARdouble pos3dR[][3], int numR, ARdouble conv[3][4])
Definition: arGetTransMatStereo.c:281
AR_EXTERN int arGetMarkerNum(ARHandle *arHandle)
Get the number of markers detected in a video frame.
Definition: arCreateHandle.c:512
AR_EXTERN void arSetAreaMax(ARHandle *handle, const ARdouble areaMax)
Definition: arCreateHandle.c:460
AR_EXTERN int arPattDeleteHandle(ARPattHandle *pattHandle)
Free all loaded patterns and pattern handle.
Definition: arPattCreateHandle.c:88
AR_EXTERN ARdouble arGetStereoMatchingError(AR3DStereoHandle *handle, ARdouble pos2dL[2], ARdouble pos2dR[2])
Definition: ar3DUtil.c:90
AR_EXTERN int ar3DStereoChangeMaxLoopCount(AR3DStereoHandle *handle, int maxLoopCount)
Definition: ar3DCreateHandle.c:140
AR_EXTERN char * arUtilGetAndCreateResourcesDirectoryPath(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior)
Get the path to the resources directory using the specified behavior, creating the path if it doesn't...
Definition: arUtil.c:1225
AR_EXTERN char * arUtilGetFileURI(const char *path)
Get a path as a file URI.
Definition: arUtil.c:558
AR_EXTERN AR_LABELING_THRESH_MODE arGetLabelingThreshMode(const ARHandle *handle)
Get the labeling threshold mode (auto/manual).
Definition: arCreateHandle.c:224
AR_EXTERN char * arUtilGetFileExtensionFromPath(const char *path, const int convertToLowercase)
Get file extension from a path.
Definition: arUtil.c:500
AR_EXTERN int arGetDebugMode(ARHandle *handle)
Find out whether artoolkitX's debug mode is enabled.
Definition: arCreateHandle.c:138
AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR
Options for controlling the behavior of arUtilGetResourcesDirectoryPath and arUtilChangeToResourcesDi...
Definition: ar.h:1624
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_BUNDLE_RESOURCES_DIR
Definition: ar.h:1654
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_USER_ROOT
Definition: ar.h:1663
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_BEST
Definition: ar.h:1631
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_APP_CACHE_DIR
Definition: ar.h:1668
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_APP_DATA_DIR
Definition: ar.h:1673
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_CWD
Definition: ar.h:1635
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_EXECUTABLE_DIR
Definition: ar.h:1644
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_SUPPLIED_PATH
Definition: ar.h:1639
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_TMP_DIR
Definition: ar.h:1678
AR_EXTERN int arGetLabelingThreshAutoAdaptiveKernelSize(ARHandle *handle)
Definition: arCreateHandle.c:248
AR_EXTERN void arSetLabelingThresh(ARHandle *handle, int thresh)
Set the labeling threshhold.
Definition: arCreateHandle.c:167
AR_EXTERN int arGetImageProcMode(ARHandle *handle)
Get the image processing mode.
Definition: arCreateHandle.c:291
AR_EXTERN ARdouble arGetAreaMin(ARHandle *handle)
Definition: arCreateHandle.c:483
AR_EXTERN void arSetDebugMode(ARHandle *handle, int mode)
Enable or disable artoolkitX's debug mode.
Definition: arCreateHandle.c:121
AR_EXTERN void arSetCornerRefinementMode(ARHandle *handle, int mode)
Enable or disable square tracking subpixel corner refinement.
Definition: arCreateHandle.c:445
AR_EXTERN int arGetContour(AR_LABELING_LABEL_TYPE *lImage, int xsize, int ysize, int *label_ref, int label, int clip[4], ARMarkerInfo2 *marker_info2)
Definition: arDetectMarker2.c:135
AR_EXTERN void arSetLabelingThreshAutoAdaptiveBias(ARHandle *handle, const int labelingThreshAutoAdaptiveBias)
Definition: arCreateHandle.c:255
AR_EXTERN void arSetLabelingThreshMode(ARHandle *handle, const AR_LABELING_THRESH_MODE mode)
Set the labeling threshold mode (auto/manual).
Definition: arCreateHandle.c:183
AR_EXTERN int arDetectMarker2(int xsize, int ysize, ARLabelInfo *labelInfo, int imageProcMode, int areaMax, int areaMin, ARdouble squareFitThresh, ARMarkerInfo2 *markerInfo2, int *marker2_num)
Definition: arDetectMarker2.c:56
AR_EXTERN int arGetStereoMatching(AR3DStereoHandle *handle, ARdouble pos2dL[2], ARdouble pos2dR[2], ARdouble pos3d[3])
Definition: ar3DUtil.c:178
char ARInt8
Definition: ar.h:89
AR_EXTERN void arSetSquareFitThresh(ARHandle *handle, const ARdouble squareFitThresh)
Definition: arCreateHandle.c:490
#define AR_MATRIX_CODE_TYPE_ECC_BCH___3
BCH code with Hamming distance of 3.
Definition: ar.h:309
AR_EXTERN int arUtilChangeToResourcesDirectory(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior, const char *path)
Change to the resources directory using the specified behavior.
Definition: arUtil.c:1254
AR_EXTERN int arPattDetach(ARHandle *arHandle)
Reset an ARHandle to no pattern association.
Definition: arPattAttach.c:61
AR_LABELING_THRESH_MODE
Values controlling the labeling thresholding mode.
Definition: ar.h:160
@ AR_LABELING_THRESH_MODE_MANUAL
Manual threshold selection via arSetLabelingThresh.
Definition: ar.h:161
@ AR_LABELING_THRESH_MODE_AUTO_MEDIAN
Automatic threshold selection via full-image histogram median.
Definition: ar.h:162
@ AR_LABELING_THRESH_MODE_AUTO_ADAPTIVE
Adaptive thresholding.
Definition: ar.h:164
@ AR_LABELING_THRESH_MODE_AUTO_BRACKETING
Automatic threshold selection via heuristic-based exposure bracketing.
Definition: ar.h:165
@ AR_LABELING_THRESH_MODE_AUTO_OTSU
Automatic threshold selection via Otsu's method for foreground/background selection.
Definition: ar.h:163
AR_EXTERN const char * arUtilGetPixelFormatName(const AR_PIXEL_FORMAT arPixelFormat)
Get a string holding a descriptive name for a given pixel format enumeration.
Definition: arUtil.c:423
AR_EXTERN int ar3DStereoChangeLoopBreakThresh(AR3DStereoHandle *handle, ARdouble loopBreakThresh)
Definition: ar3DCreateHandle.c:145
AR_EXTERN ARdouble arGetTransMatSquareCont(AR3DHandle *handle, ARMarkerInfo *marker_info, ARdouble initConv[3][4], ARdouble width, ARdouble conv[3][4])
(description)
Definition: arGetTransMat.c:101
AR_EXTERN int arPattLoad(ARPattHandle *pattHandle, const char *filename)
Load a pattern file into a pattern handle.
Definition: arPattLoad.c:144
AR_EXTERN int arDeleteHandle(ARHandle *handle)
Delete a handle which holds settings for an artoolkitX tracker instance.
Definition: arCreateHandle.c:102
AR_EXTERN int arUtilMatMuldff(const ARdouble s1[3][4], const float s2[3][4], float d[3][4])
Definition: arUtil.c:169
AR_MARKER_INFO_CUTOFF_PHASE
Result codes returned by arDetectMarker to report state of individual detected trapezoidal regions.
Definition: ar.h:189
@ AR_MARKER_INFO_CUTOFF_PHASE_MATCH_CONFIDENCE
Matching confidence cutoff value not reached.
Definition: ar.h:196
@ AR_MARKER_INFO_CUTOFF_PHASE_POSE_ERROR_MULTI
Multi-marker pose error value exceeded.
Definition: ar.h:198
@ AR_MARKER_INFO_CUTOFF_PHASE_MATCH_CONTRAST
Insufficient contrast during matching.
Definition: ar.h:193
@ AR_MARKER_INFO_CUTOFF_PHASE_MATCH_BARCODE_EDC_FAIL
Barcode matching error detection/correction found unrecoverable error.
Definition: ar.h:195
@ AR_MARKER_INFO_CUTOFF_PHASE_POSE_ERROR
Maximum allowable pose error exceeded.
Definition: ar.h:197
@ AR_MARKER_INFO_CUTOFF_PHASE_PATTERN_EXTRACTION
Failure during pattern extraction.
Definition: ar.h:191
@ AR_MARKER_INFO_CUTOFF_PHASE_MATCH_GENERIC
Generic error during matching phase.
Definition: ar.h:192
@ AR_MARKER_INFO_CUTOFF_PHASE_NONE
Marker OK.
Definition: ar.h:190
@ AR_MARKER_INFO_CUTOFF_PHASE_HEURISTIC_TROUBLESOME_MATRIX_CODES
Heuristic-based rejection of troublesome matrix code which is often generated in error.
Definition: ar.h:199
@ AR_MARKER_INFO_CUTOFF_PHASE_MATCH_BARCODE_NOT_FOUND
Barcode matching could not find correct barcode locator pattern.
Definition: ar.h:194
AR_EXTERN void arSetLabelingThreshModeAutoInterval(ARHandle *handle, const int interval)
Set the number of frames between auto-threshold calculations.
Definition: arCreateHandle.c:231
AR_EXTERN int ar3DChangeMaxLoopCount(AR3DHandle *handle, int maxLoopCount)
(description)
Definition: ar3DCreateHandle.c:89
int ARInt32
Definition: ar.h:91
AR_EXTERN AR3DStereoHandle * ar3DStereoCreateHandle2(const ARdouble cparaL[3][4], const ARdouble cparaR[3][4], const ARdouble transL[3][4], const ARdouble transR[3][4])
Definition: ar3DCreateHandle.c:113
AR_EXTERN int arGetMarkerExtractionMode(ARHandle *handle)
Get the marker extraction mode.
Definition: arCreateHandle.c:353
unsigned short ARUint16
Definition: ar.h:93
AR_EXTERN int arDetectMarker(ARHandle *arHandle, AR2VideoBufferT *frame)
Detect markers in a video frame.
Definition: arDetectMarker.c:62
AR_EXTERN AR3DStereoHandle * ar3DStereoCreateHandle(const ARParam *arParamL, const ARParam *arParamR, const ARdouble transL[3][4], const ARdouble transR[3][4])
Definition: ar3DCreateHandle.c:107
AR_EXTERN void arSetLabelingThreshAutoAdaptiveKernelSize(ARHandle *handle, const int labelingThreshAutoAdaptiveKernelSize)
Definition: arCreateHandle.c:239
AR_EXTERN void arUtilPrintTransMat(const ARdouble trans[3][4])
Prints a transformation matrix via ARPRINT(...).
Definition: arUtil.c:1362
AR_EXTERN int arUtilMat2QuatPos(const ARdouble m[3][4], ARdouble q[4], ARdouble p[3])
Definition: arUtil.c:252
AR_EXTERN ARdouble arGetTransMatSquare(AR3DHandle *handle, ARMarkerInfo *marker_info, ARdouble width, ARdouble conv[3][4])
(description)
Definition: arGetTransMat.c:53
AR_EXTERN int ar3DStereoChangeCpara(AR3DStereoHandle *handle, ARdouble cparaL[3][4], ARdouble cparaR[3][4])
Definition: ar3DCreateHandle.c:155
AR_EXTERN int arPattSave(ARUint8 *image, int xsize, int ysize, int pixelFormat, ARParamLTf *paramLTf, int imageProcMode, ARMarkerInfo *marker_info, ARdouble pattRatio, int pattSize, const char *filename)
Save a pattern to a pattern file.
Definition: arPattSave.c:42
AR_EXTERN void arUtilPrintMtx16(const ARdouble mtx16[16])
Prints a 4x4 row-major matrix via ARPRINT(...).
Definition: arUtil.c:1370
AR_EXTERN int arGetLabelingThreshModeAutoInterval(const ARHandle *handle)
Get the number of frames between auto-threshold calculations.
Definition: arCreateHandle.c:269
AR_EXTERN int ar3DChangeLoopBreakThreshRatio(AR3DHandle *handle, ARdouble loopBreakThreshRatio)
(description)
Definition: ar3DCreateHandle.c:99
AR_EXTERN int arGetLabelingThreshAutoAdaptiveBias(ARHandle *handle)
Definition: arCreateHandle.c:262
AR_EXTERN ARdouble arGetSquareFitThresh(ARHandle *handle)
Definition: arCreateHandle.c:498
AR_EXTERN void arSetPixelFormat(ARHandle *handle, AR_PIXEL_FORMAT pixFormat)
Set the expected pixel format for video frames being passed to arDetectMarker.
Definition: arCreateHandle.c:390
AR_EXTERN int arPattActivate(ARPattHandle *pattHandle, int patno)
Activate a previously deactivated pattern.
Definition: arPattLoad.c:170
AR_EXTERN int arUtilMatMulf(const float s1[3][4], const float s2[3][4], float d[3][4])
Definition: arUtil.c:185
AR_EXTERN void arSetPattRatio(ARHandle *handle, const ARdouble pattRatio)
Set the width/height of the marker pattern space, as a proportion of marker width/height.
Definition: arCreateHandle.c:375
AR_EXTERN const char * arMarkerInfoCutoffPhaseDescriptions[AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT]
Definition: arDetectMarker.c:47
unsigned int ARUint32
Definition: ar.h:94
AR_EXTERN int arUtilMatMul(const ARdouble s1[3][4], const ARdouble s2[3][4], ARdouble d[3][4])
Definition: arUtil.c:152
#define AR_EXTERN
Definition: ar.h:131
AR_EXTERN ARHandle * arCreateHandle(ARParamLT *paramLT)
Create a handle to hold settings for an artoolkitX tracker instance.
Definition: arCreateHandle.c:53
AR_EXTERN void arSetLabelingMode(ARHandle *handle, int mode)
Select between detection of black markers and white markers.
Definition: arCreateHandle.c:145
AR_EXTERN char * arUtilGetFileBasenameFromPath(const char *path, const int convertToLowercase)
Get file base name from a path.
Definition: arUtil.c:469
AR_EXTERN AR3DHandle * ar3DCreateHandle(const ARParam *arParam)
Create handle used for 3D calculation from calibrated camera parameters.
Definition: ar3DCreateHandle.c:52
AR_EXTERN int ar3DChangeCpara(AR3DHandle *handle, const ARdouble cpara[3][4])
(description)
Definition: ar3DCreateHandle.c:83
AR_EXTERN int arPattGetImage3(ARHandle *arHandle, int markerNo, ARUint8 *image, ARPattRectInfo *rect, int xsize, int ysize, int overSampleScale, ARUint8 *outImage)
Extract the image (i.e. locate and unwarp) of an arbitrary portion of a detected square.
Definition: arPattGetID.c:1527
AR_EXTERN int arPattGetImage(int imageProcMode, int pattDetectMode, int patt_size, int sample_size, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, int *x_coord, int *y_coord, int *vertex, ARdouble pattRatio, ARUint8 *ext_patt)
Definition: arPattGetID.c:286
AR_EXTERN int arUtilMatInvf(const float s[3][4], float d[3][4])
Definition: arUtil.c:227
#define AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT
Definition: ar.h:202
AR_EXTERN int arUtilRemoveExt(char *filename)
Definition: arUtil.c:1328
#define AR_MATRIX_CODE_TYPE_ECC_BCH___19
BCH code with Hamming distance of 19.
Definition: ar.h:314
AR_EXTERN ARdouble arGetTransMatSquareContStereo(AR3DStereoHandle *handle, ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR, ARdouble prev_conv[3][4], ARdouble width, ARdouble conv[3][4])
Definition: arGetTransMatStereo.c:153
AR_EXTERN ARdouble arGetStereoMatchingErrorSquare(AR3DStereoHandle *handle, ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR)
Definition: ar3DUtil.c:54
AR_EXTERN char * arUtilGetResourcesDirectoryPath(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior)
Get the path to the resources directory using the specified behavior.
Definition: arUtil.c:721
#define AR_MATRIX_CODE_TYPE_ECC_BCH___7
BCH code with Hamming distance of 7.
Definition: ar.h:311
#define AR_LABELING_LABEL_TYPE
Definition: arConfig.h:111
#define AR_SQUARE_MAX
Definition: arConfig.h:117
#define AR_CHAIN_MAX
Definition: arConfig.h:119
#define AR_LABELING_WORK_SIZE
Definition: arConfig.h:110
artoolkitX functions for 2D luminance image processing.
artoolkitX functions for handling calibrated camera parameters.
Structure holding settings for an instance of the image-processing pipeline.
Definition: arImageProc.h:68
A structure which carries information about a video frame retrieved by the video library.
Definition: ar.h:148
AR2VideoTimestampT time
Time at which buff was filled.
Definition: ar.h:154
unsigned int bufPlaneCount
For multi-planar video frames, this is the number of frame planes. For single-plane formats,...
Definition: ar.h:151
ARUint8 ** bufPlanes
For multi-planar video frames, this must be an array of length bufPlaneCount of (ARUint8*),...
Definition: ar.h:150
int fillFlag
Set non-zero when buff is valid.
Definition: ar.h:153
ARUint8 * buff
A pointer to the packed video data for this video frame. The video data pixel format is as specified ...
Definition: ar.h:149
ARUint8 * buffLuma
A pointer to a luminance-only version of the image. For luminance-only video formats this pointer is ...
Definition: ar.h:152
A structure to hold a timestamp in seconds and microseconds, with arbitrary epoch.
Definition: ar.h:139
uint64_t sec
Definition: ar.h:140
uint32_t usec
Definition: ar.h:141
Structure holding state of an instance of the monocular pose estimator.
Definition: ar.h:384
ICPHandleT * icpHandle
Definition: ar.h:385
Structure holding state of an instance of the stereo pose estimator.
Definition: ar.h:394
ICPStereoHandleT * icpStereoHandle
Definition: ar.h:395
Structure holding state of an instance of the square marker tracker.
Definition: ar.h:341
ARLabelInfo labelInfo
Definition: ar.h:359
ARdouble areaMax
Definition: ar.h:372
int arCornerRefinementMode
Definition: ar.h:371
int arLabelingThreshAutoInterval
Definition: ar.h:362
AR_MATRIX_CODE_TYPE matrixCodeType
When matrix code pattern detection mode is active, indicates the type of matrix code to detect.
Definition: ar.h:370
AR_PIXEL_FORMAT arPixelFormat
Definition: ar.h:343
ARImageProcInfo * arImageProcInfo
Definition: ar.h:368
int arImageProcMode
To query this value, call arGetImageProcMode(). To set this value, call arSetImageProcMode().
Definition: ar.h:347
int arLabelingThresh
Definition: ar.h:346
int arPatternDetectionMode
Definition: ar.h:348
int arLabelingThreshAutoBracketUnder
Definition: ar.h:365
int arLabelingThreshAutoAdaptiveBias
Definition: ar.h:367
ARdouble pattRatio
A value between 0.0 and 1.0, representing the proportion of the marker width which constitutes the pa...
Definition: ar.h:369
int arPixelSize
Definition: ar.h:344
int arLabelingThreshAutoAdaptiveKernelSize
Definition: ar.h:366
ARParamLT * arParamLT
Definition: ar.h:350
int marker2_num
Definition: ar.h:355
int history_num
Definition: ar.h:357
ARdouble areaMin
Definition: ar.h:373
AR_LABELING_THRESH_MODE arLabelingThreshMode
Definition: ar.h:361
int arLabelingMode
Definition: ar.h:345
int arDebug
Definition: ar.h:342
ARPattHandle * pattHandle
Definition: ar.h:360
int xsize
Definition: ar.h:351
int ysize
Definition: ar.h:352
int arMarkerExtractionMode
Definition: ar.h:349
int arLabelingThreshAutoBracketOver
Definition: ar.h:364
ARdouble squareFitThresh
Definition: ar.h:374
int marker_num
Definition: ar.h:353
int arLabelingThreshAutoIntervalTTL
Definition: ar.h:363
(description)
Definition: ar.h:246
ARUint8 * bwImage
Definition: ar.h:249
int label_num
Definition: ar.h:251
AR_LABELING_LABEL_TYPE * labelImage
Definition: ar.h:247
Captures detail of a trapezoidal region which is a candidate for marker detection.
Definition: ar.h:171
int area
Area in pixels.
Definition: ar.h:172
int coord_num
Number of coordinates in x_coord, y_coord.
Definition: ar.h:174
Describes a detected trapezoidal area (a candidate for a marker match).
Definition: ar.h:213
int area
Area in pixels of the largest connected region, comprising the marker border and regions connected to...
Definition: ar.h:214
ARMarkerInfo2 * markerInfo2Ptr
Pointer to source region info for this marker.
Definition: ar.h:227
int dir
If pattern detection mode is either pattern mode OR matrix but not both, and id != -1,...
Definition: ar.h:218
ARdouble cf
If pattern detection mode is either pattern mode OR matrix but not both, will be marker matching conf...
Definition: ar.h:221
int dirMatrix
If pattern detection mode includes a matrix mode, and id != -1, will be marker direction (range 0 to ...
Definition: ar.h:220
int dirPatt
If pattern detection mode includes a pattern mode, and id != -1, will be marker direction (range 0 to...
Definition: ar.h:219
ARdouble cfMatrix
If pattern detection mode includes a matrix mode, will be marker matching confidence (range 0....
Definition: ar.h:223
int errorCorrected
For marker types including error detection and correction, the numbers of errors detected and correct...
Definition: ar.h:229
int id
If pattern detection mode is either pattern mode OR matrix but not both, will be marker ID (>= 0) if ...
Definition: ar.h:215
int idPatt
If pattern detection mode includes a pattern mode, will be marker ID (>= 0) if marker is valid,...
Definition: ar.h:216
int idMatrix
If pattern detection mode includes a matrix mode, will be marker ID (>= 0) if marker is valid,...
Definition: ar.h:217
AR_MARKER_INFO_CUTOFF_PHASE cutoffPhase
If a trapezoidal region is detected, but is eliminated from the candidates for tracking,...
Definition: ar.h:228
uint64_t globalID
If arPattDetectionMode is a matrix mode, matrixCodeType is AR_MATRIX_CODE_GLOBAL_ID,...
Definition: ar.h:230
ARdouble cfPatt
If pattern detection mode includes a pattern mode, will be marker matching confidence (range 0....
Definition: ar.h:222
Structure holding camera parameters, including image size, projection matrix and lens distortion para...
Definition: param.h:99
Structure holding camera parameters, in lookup table form.
Definition: param.h:151
Structure holding camera parameters, in lookup table form; floating point version.
Definition: param.h:120
A structure which holds descriptions of trained patterns for template matching.
Definition: ar.h:267
ARdouble * pattpow
Root-mean-square of the pattern intensities.
Definition: ar.h:272
int patt_num
Number of valid patterns in the structure.
Definition: ar.h:268
int pattSize
Number of rows/columns in the pattern.
Definition: ar.h:276
int ** patt
Array of 4 different orientations of each pattern's colour values, in 1-byte per component BGR order.
Definition: ar.h:271
int ** pattBW
Array of 4 different orientations of each pattern's 1-byte luminosity values.
Definition: ar.h:273
ARdouble * pattpowBW
Root-mean-square of the pattern intensities.
Definition: ar.h:274
int * pattf
0 = no pattern loaded at this position. 1 = pattern loaded and activated. 2 = pattern loaded but deac...
Definition: ar.h:270
int patt_num_max
Maximum number of patterns that may be loaded in this structure.
Definition: ar.h:269
Defines a pattern rectangle as a sub-portion of a marker image.
Definition: ar.h:285
float bottomRightX
Horizontal coordinate of the bottom right corner of the pattern space, in range 0....
Definition: ar.h:288
float bottomRightY
Vertical coordinate of the bottom right corner of the pattern space, in range 0.0f-1....
Definition: ar.h:289
float topLeftY
Vertical coordinate of the top left corner of the pattern space, in range 0.0f-1.0f.
Definition: ar.h:287
float topLeftX
Horizontal coordinate of the top left corner of the pattern space, in range 0.0f-1....
Definition: ar.h:286
(description)
Definition: ar.h:237
int count
Definition: ar.h:239
ARMarkerInfo marker
Definition: ar.h:238