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
249#if !AR_DISABLE_LABELING_DEBUG_MODE
306#define AR_MATRIX_CODE_TYPE_SIZE_MASK 0x000000ff
307#define AR_MATRIX_CODE_TYPE_ECC_NONE 0x00000000
308#define AR_MATRIX_CODE_TYPE_ECC_PARITY 0x00000100
309#define AR_MATRIX_CODE_TYPE_ECC_HAMMING 0x00000200
310#define AR_MATRIX_CODE_TYPE_ECC_BCH___3 0x00000300
311#define AR_MATRIX_CODE_TYPE_ECC_BCH___5 0x00000400
312#define AR_MATRIX_CODE_TYPE_ECC_BCH___7 0x00000500
313#define AR_MATRIX_CODE_TYPE_ECC_BCH___9 0x00000600
314#define AR_MATRIX_CODE_TYPE_ECC_BCH___11 0x00000700
315#define AR_MATRIX_CODE_TYPE_ECC_BCH___19 0x00000b00
389#define AR_TRANS_MAT_IDENTITY ICP_TRANS_MAT_IDENTITY
924 int debugMode,
int labelingMode,
int labelingThresh,
int imageProcMode,
927 int areaMax,
int areaMin,
ARdouble squareFitThresh,
1069 int imageProcMode,
ARMarkerInfo *marker_info,
ARdouble pattRatio,
int pattSize,
const char *filename );
1145#if !AR_DISABLE_NON_CORE_FNS
1147 ARUint8 *image,
int xsize,
int ysize, AR_PIXEL_FORMAT pixelFormat,
1148 int *x_coord,
int *y_coord,
int *vertex,
ARdouble pattRatio,
1151 ARUint8 *image,
int xsize,
int ysize, AR_PIXEL_FORMAT pixelFormat,
1152 int *x_coord,
int *y_coord,
int *vertex,
ARdouble pattRatio,
1179 int *codePatt,
int *dirPatt,
ARdouble *cfPatt,
int *codeMatrix,
int *dirMatrix,
ARdouble *cfMatrix,
1209 int *codePatt,
int *dirPatt,
ARdouble *cfPatt,
int *codeMatrix,
int *dirMatrix,
ARdouble *cfMatrix,
1210 const AR_MATRIX_CODE_TYPE matrixCodeType,
int *errorCorrected, uint64_t *codeGlobalID_p );
1230 ARUint8 *image,
int xsize,
int ysize, AR_PIXEL_FORMAT pixelFormat,
ARParamLTf *arParamLTf,
1248 int overSampleScale,
ARUint8 *outImage );
1497#ifdef ARDOUBLE_IS_FLOAT
1498#define arUtilMatInvf arUtilMatInv
1499#define arUtilMatMulf arUtilMatMul
1500#define arUtilMatMuldff arUtilMatMul
1517 ARdouble pos[][2],
int area[],
int label_num,
1518 int l1,
int x1,
int y1,
1519 int l2,
int x2,
int y2,
1696jobject arUtilGetGlobalContext(
void);
1770# define ARPRINT(...) __android_log_print(ANDROID_LOG_INFO, "artoolkitx", __VA_ARGS__)
1771# define ARPRINTE(...) __android_log_print(ANDROID_LOG_ERROR, "artoolkitx", __VA_ARGS__)
1773# define ARPRINT(...) printf(__VA_ARGS__)
1774# define ARPRINTE(...) fprintf(stderr, __VA_ARGS__)
int ar3DChangeLoopBreakThreshRatio(AR3DHandle *handle, ARdouble loopBreakThreshRatio)
(description)
Definition ar3DCreateHandle.c:99
AR3DHandle * ar3DCreateHandle(const ARParam *arParam)
Create handle used for 3D calculation from calibrated camera parameters.
Definition ar3DCreateHandle.c:52
int ar3DChangeLoopBreakThresh(AR3DHandle *handle, ARdouble loopBreakThresh)
(description)
Definition ar3DCreateHandle.c:94
int ar3DStereoChangeLoopBreakThreshRatio(AR3DStereoHandle *handle, ARdouble loopBreakThreshRatio)
Definition ar3DCreateHandle.c:150
int ar3DDeleteHandle(AR3DHandle **handle)
Delete handle used for 3D calculation.
Definition ar3DCreateHandle.c:72
AR3DStereoHandle * ar3DStereoCreateHandle(const ARParam *arParamL, const ARParam *arParamR, const ARdouble transL[3][4], const ARdouble transR[3][4])
Definition ar3DCreateHandle.c:107
int ar3DChangeMaxLoopCount(AR3DHandle *handle, int maxLoopCount)
(description)
Definition ar3DCreateHandle.c:89
int ar3DStereoChangeMaxLoopCount(AR3DStereoHandle *handle, int maxLoopCount)
Definition ar3DCreateHandle.c:140
int ar3DStereoChangeTransMat(AR3DStereoHandle *handle, ARdouble transL[3][4], ARdouble transR[3][4])
Definition ar3DCreateHandle.c:162
int ar3DStereoChangeLoopBreakThresh(AR3DStereoHandle *handle, ARdouble loopBreakThresh)
Definition ar3DCreateHandle.c:145
int ar3DStereoChangeCpara(AR3DStereoHandle *handle, ARdouble cparaL[3][4], ARdouble cparaR[3][4])
Definition ar3DCreateHandle.c:155
AR3DHandle * ar3DCreateHandle2(const ARdouble cpara[3][4])
Create handle used for 3D calculation from an intrinsic parameters matrix.
Definition ar3DCreateHandle.c:57
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
int ar3DChangeCpara(AR3DHandle *handle, const ARdouble cpara[3][4])
(description)
Definition ar3DCreateHandle.c:83
int ar3DStereoDeleteHandle(AR3DStereoHandle **handle)
Definition ar3DCreateHandle.c:129
ARdouble arGetStereoMatchingError(AR3DStereoHandle *handle, ARdouble pos2dL[2], ARdouble pos2dR[2])
Definition ar3DUtil.c:90
ARdouble arGetStereoMatchingErrorSquare(AR3DStereoHandle *handle, ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR)
Definition ar3DUtil.c:54
int arGetStereoMatching(AR3DStereoHandle *handle, ARdouble pos2dL[2], ARdouble pos2dR[2], ARdouble pos3d[3])
Definition ar3DUtil.c:178
unsigned char ARUint8
Definition ar.h:92
AR_MATRIX_CODE_TYPE
Values specifying the type of matrix code in use.
Definition ar.h:320
@ AR_MATRIX_CODE_5x5_BCH_22_12_5
Matrix code in range 0-4095.
Definition ar.h:327
@ AR_MATRIX_CODE_5x5_BCH_22_7_7
Matrix code in range 0-127.
Definition ar.h:328
@ AR_MATRIX_CODE_3x3_HAMMING63
Matrix code in range 0-7.
Definition ar.h:323
@ AR_MATRIX_CODE_4x4_BCH_13_9_3
Matrix code in range 0-511.
Definition ar.h:325
@ AR_MATRIX_CODE_5x5
Matrix code in range 0-4194303.
Definition ar.h:329
@ AR_MATRIX_CODE_3x3_PARITY65
Matrix code in range 0-31.
Definition ar.h:322
@ AR_MATRIX_CODE_6x6
Matrix code in range 0-8589934591.
Definition ar.h:330
@ AR_MATRIX_CODE_4x4_BCH_13_5_5
Matrix code in range 0-31.
Definition ar.h:326
@ AR_MATRIX_CODE_3x3
Matrix code in range 0-63.
Definition ar.h:321
@ AR_MATRIX_CODE_GLOBAL_ID
Definition ar.h:331
@ AR_MATRIX_CODE_4x4
Matrix code in range 0-8191.
Definition ar.h:324
float ARfloat
Definition ar.h:95
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[])
#define AR_MATRIX_CODE_TYPE_ECC_BCH___5
BCH code with Hamming distance of 5.
Definition ar.h:311
#define AR_MATRIX_CODE_TYPE_ECC_PARITY
Single-bit parity.
Definition ar.h:308
double ARdouble
Definition ar.h:99
short ARInt16
Definition ar.h:90
#define AR_MATRIX_CODE_TYPE_ECC_HAMMING
Hamming code with Hamming distance of 3.
Definition ar.h:309
AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR
Options for controlling the behavior of arUtilGetResourcesDirectoryPath and arUtilChangeToResourcesDi...
Definition ar.h:1625
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_BUNDLE_RESOURCES_DIR
Definition ar.h:1655
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_USER_ROOT
Definition ar.h:1666
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_BEST
Definition ar.h:1632
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_APP_CACHE_DIR
Definition ar.h:1672
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_APP_DATA_DIR
Definition ar.h:1678
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_CWD
Definition ar.h:1636
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_EXECUTABLE_DIR
Definition ar.h:1645
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_APP_EXTERNAL_DATA_DIR
Definition ar.h:1691
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_SUPPLIED_PATH
Definition ar.h:1640
@ AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR_USE_TMP_DIR
Definition ar.h:1684
char ARInt8
Definition ar.h:89
#define AR_MATRIX_CODE_TYPE_ECC_BCH___3
BCH code with Hamming distance of 3.
Definition ar.h:310
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_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
int ARInt32
Definition ar.h:91
unsigned short ARUint16
Definition ar.h:93
unsigned int ARUint32
Definition ar.h:94
#define AR_EXTERN
Definition ar.h:131
#define AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT
Definition ar.h:202
#define AR_MATRIX_CODE_TYPE_ECC_BCH___19
BCH code with Hamming distance of 19.
Definition ar.h:315
#define AR_MATRIX_CODE_TYPE_ECC_BCH___7
BCH code with Hamming distance of 7.
Definition ar.h:312
#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
void arSetDebugMode(ARHandle *handle, int mode)
Enable or disable artoolkitX's debug mode.
Definition arCreateHandle.c:121
int arGetMarkerNum(ARHandle *handle)
Get the number of markers detected in a video frame.
Definition arCreateHandle.c:512
void arSetCornerRefinementMode(ARHandle *handle, int mode)
Enable or disable square tracking subpixel corner refinement.
Definition arCreateHandle.c:445
void arSetLabelingThreshAutoAdaptiveBias(ARHandle *handle, const int labelingThreshAutoAdaptiveBias)
Definition arCreateHandle.c:255
int arGetLabelingThreshModeAutoInterval(const ARHandle *handle)
Get the number of frames between auto-threshold calculations.
Definition arCreateHandle.c:269
void arSetImageProcMode(ARHandle *handle, int mode)
Set the image processing mode.
Definition arCreateHandle.c:276
int arGetCornerRefinementMode(ARHandle *handle)
Find out whether square tracking subpixel corner refinement is enabled.
Definition arCreateHandle.c:505
int arGetLabelingMode(ARHandle *handle)
Enquire whether detection is looking for black markers or white markers.
Definition arCreateHandle.c:160
AR_LABELING_THRESH_MODE arGetLabelingThreshMode(const ARHandle *handle)
Get the labeling threshold mode (auto/manual).
Definition arCreateHandle.c:224
ARdouble arGetAreaMax(ARHandle *handle)
Definition arCreateHandle.c:468
void arSetAreaMax(ARHandle *handle, const ARdouble areaMax)
Definition arCreateHandle.c:460
int arGetLabelingThresh(ARHandle *handle)
Get the current labeling threshold.
Definition arCreateHandle.c:176
ARdouble arGetBorderSize(ARHandle *handle)
Get the border size.
Definition arCreateHandle.c:368
void arSetMarkerExtractionMode(ARHandle *handle, int mode)
Set the marker extraction mode.
Definition arCreateHandle.c:337
ARdouble arGetSquareFitThresh(ARHandle *handle)
Definition arCreateHandle.c:498
int arGetDebugMode(ARHandle *handle)
Find out whether artoolkitX's debug mode is enabled.
Definition arCreateHandle.c:138
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
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
void arSetLabelingThreshModeAutoInterval(ARHandle *handle, const int interval)
Set the number of frames between auto-threshold calculations.
Definition arCreateHandle.c:231
void arSetPatternDetectionMode(ARHandle *handle, int mode)
Set the pattern detection mode.
Definition arCreateHandle.c:298
int arGetMarkerExtractionMode(ARHandle *handle)
Get the marker extraction mode.
Definition arCreateHandle.c:353
int arGetLabelingThreshAutoAdaptiveKernelSize(ARHandle *handle)
Definition arCreateHandle.c:248
int arDeleteHandle(ARHandle *handle)
Delete a handle which holds settings for an artoolkitX tracker instance.
Definition arCreateHandle.c:102
int arGetPatternDetectionMode(ARHandle *handle)
Get the pattern detection mode.
Definition arCreateHandle.c:330
void arSetPixelFormat(ARHandle *handle, AR_PIXEL_FORMAT pixFormat)
Set the expected pixel format for video frames being passed to arDetectMarker.
Definition arCreateHandle.c:390
void arSetSquareFitThresh(ARHandle *handle, const ARdouble squareFitThresh)
Definition arCreateHandle.c:490
void arSetLabelingMode(ARHandle *handle, int mode)
Select between detection of black markers and white markers.
Definition arCreateHandle.c:145
void arSetLabelingThresh(ARHandle *handle, int thresh)
Set the labeling threshhold.
Definition arCreateHandle.c:167
void arSetAreaMin(ARHandle *handle, const ARdouble areaMin)
Definition arCreateHandle.c:475
void arSetBorderSize(ARHandle *handle, const ARdouble borderSize)
Set the border size.
Definition arCreateHandle.c:360
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
ARMarkerInfo * arGetMarker(ARHandle *handle)
Get information on the markers detected in a video frame.
Definition arCreateHandle.c:519
void arSetLabelingThreshAutoAdaptiveKernelSize(ARHandle *handle, const int labelingThreshAutoAdaptiveKernelSize)
Definition arCreateHandle.c:239
int arGetPixelFormat(ARHandle *handle)
Get the expected pixel format for video frames being passed to arDetectMarker.
Definition arCreateHandle.c:438
ARdouble arGetAreaMin(ARHandle *handle)
Definition arCreateHandle.c:483
ARdouble arGetPattRatio(ARHandle *handle)
Get the width/height of the marker pattern space, as a proportion of marker width/height.
Definition arCreateHandle.c:383
void arSetLabelingThreshMode(ARHandle *handle, const AR_LABELING_THRESH_MODE mode)
Set the labeling threshold mode (auto/manual).
Definition arCreateHandle.c:183
int arGetLabelingThreshAutoAdaptiveBias(ARHandle *handle)
Definition arCreateHandle.c:262
int arGetImageProcMode(ARHandle *handle)
Get the image processing mode.
Definition arCreateHandle.c:291
ARHandle * arCreateHandle(ARParamLT *paramLT)
Create a handle to hold settings for an artoolkitX tracker instance.
Definition arCreateHandle.c:53
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:138
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
const char * arMarkerInfoCutoffPhaseDescriptions[AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT]
Definition arDetectMarker.c:47
int arDetectMarker(ARHandle *arHandle, AR2VideoBufferT *frame)
Detect markers in a video frame.
Definition arDetectMarker.c:62
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
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
ARdouble arGetTransMatSquareCont(AR3DHandle *handle, ARMarkerInfo *marker_info, ARdouble initConv[3][4], ARdouble width, ARdouble conv[3][4])
(description)
Definition arGetTransMat.c:101
ARdouble arGetTransMatSquare(AR3DHandle *handle, ARMarkerInfo *marker_info, ARdouble width, ARdouble conv[3][4])
(description)
Definition arGetTransMat.c:53
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
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
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
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
ARdouble arGetTransMatSquareStereo(AR3DStereoHandle *handle, ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR, ARdouble width, ARdouble conv[3][4])
Definition arGetTransMatStereo.c:55
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
artoolkitX functions for 2D luminance image processing.
struct _ARImageProcInfo ARImageProcInfo
Definition arImageProc.h:80
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
int arPattAttach(ARHandle *arHandle, ARPattHandle *arPattHandle)
Associate a set of patterns with an ARHandle.
Definition arPattAttach.c:51
int arPattDetach(ARHandle *arHandle)
Reset an ARHandle to no pattern association.
Definition arPattAttach.c:61
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
int arPattDeleteHandle(ARPattHandle *pattHandle)
Free all loaded patterns and pattern handle.
Definition arPattCreateHandle.c:88
ARPattHandle * arPattCreateHandle(void)
Allocate a pattern handle.
Definition arPattCreateHandle.c:53
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
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
int arPattGetImage2(int imageProcMode, int pattDetectMode, int patt_size, int sample_size, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *paramLTf, 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
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
int arPattGetID2(ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *paramLTf, 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
int arPattGetIDGlobal(ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *paramLTf, 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
int arPattLoadFromBuffer(ARPattHandle *pattHandle, const char *buffer)
Definition arPattLoad.c:55
int arPattLoad(ARPattHandle *pattHandle, const char *filename)
Load a pattern file into a pattern handle.
Definition arPattLoad.c:144
int arPattFree(ARPattHandle *pattHandle, int patno)
Frees (unloads) a pattern file from memory.
Definition arPattLoad.c:160
int arPattActivate(ARPattHandle *pattHandle, int patno)
Activate a previously deactivated pattern.
Definition arPattLoad.c:170
int arPattDeactivate(ARPattHandle *pattHandle, int patno)
Deactivate a previously activated pattern.
Definition arPattLoad.c:179
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
int arUtilQuatPos2Mat(const ARdouble q[4], const ARdouble p[3], ARdouble m[3][4])
Definition arUtil.c:323
char * arUtilGetFileExtensionFromPath(const char *path, const int convertToLowercase)
Get file extension from a path.
Definition arUtil.c:500
int arUtilMatMulf(const float s1[3][4], const float s2[3][4], float d[3][4])
Definition arUtil.c:185
void arUtilPrintTransMat(const ARdouble trans[3][4])
Prints a transformation matrix via ARPRINT(...).
Definition arUtil.c:1411
int arUtilGetSquareCenter(ARdouble vertex[4][2], ARdouble *x, ARdouble *y)
Definition arUtil.c:125
int arUtilRemoveExt(char *filename)
Definition arUtil.c:1377
ARUint32 arGetVersion(char **versionStringRef)
Get the artoolkitX version information in numberic and string format.
Definition arUtil.c:102
int arUtilMatInvf(const float s[3][4], float d[3][4])
Definition arUtil.c:227
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
int arUtilMatMuldff(const ARdouble s1[3][4], const float s2[3][4], float d[3][4])
Definition arUtil.c:169
char * arUtilGetFileURI(const char *path)
Get a path as a file URI.
Definition arUtil.c:558
char * arUtilGetResourcesDirectoryPath(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior)
Get the path to the resources directory using the specified behavior.
Definition arUtil.c:746
char * arUtilGetFileBasenameFromPath(const char *path, const int convertToLowercase)
Get file base name from a path.
Definition arUtil.c:469
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:1274
int arUtilMatInv(const ARdouble s[3][4], ARdouble d[3][4])
Definition arUtil.c:202
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
int arUtilDivideExt(const char *filename, char *s1, char *s2)
Definition arUtil.c:1390
int arUtilQuatNorm(ARdouble q[4])
Definition arUtil.c:372
const char * arUtilGetFileNameFromPath(const char *path)
Definition arUtil.c:449
int arUtilReplaceExt(char *filename, int n, char *ext)
Definition arUtil.c:1355
char * arUtilGetDirectoryNameFromPath(char *dir, const char *path, const size_t n, const int addSeparator)
Definition arUtil.c:532
void arUtilPrintMtx16(const ARdouble mtx16[16])
Prints a 4x4 row-major matrix via ARPRINT(...).
Definition arUtil.c:1419
int arUtilChangeToResourcesDirectory(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior, const char *path)
Change to the resources directory using the specified behavior.
Definition arUtil.c:1303
int arUtilMat2QuatPos(const ARdouble m[3][4], ARdouble q[4], ARdouble p[3])
Definition arUtil.c:252
int arUtilMatMul(const ARdouble s1[3][4], const ARdouble s2[3][4], ARdouble d[3][4])
Definition arUtil.c:152
artoolkitX functions for handling calibrated camera parameters.
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:385
ICPHandleT * icpHandle
Definition ar.h:386
Structure holding state of an instance of the stereo pose estimator.
Definition ar.h:395
ICPStereoHandleT * icpStereoHandle
Definition ar.h:396
Structure holding state of an instance of the square marker tracker.
Definition ar.h:342
ARLabelInfo labelInfo
Definition ar.h:360
ARdouble areaMax
Definition ar.h:373
int arCornerRefinementMode
Definition ar.h:372
int arLabelingThreshAutoInterval
Definition ar.h:363
AR_MATRIX_CODE_TYPE matrixCodeType
When matrix code pattern detection mode is active, indicates the type of matrix code to detect.
Definition ar.h:371
AR_PIXEL_FORMAT arPixelFormat
Definition ar.h:344
ARImageProcInfo * arImageProcInfo
Definition ar.h:369
int arImageProcMode
To query this value, call arGetImageProcMode(). To set this value, call arSetImageProcMode().
Definition ar.h:348
int arLabelingThresh
Definition ar.h:347
ARMarkerInfo2 markerInfo2[AR_SQUARE_MAX]
Definition ar.h:357
int arPatternDetectionMode
Definition ar.h:349
int arLabelingThreshAutoBracketUnder
Definition ar.h:366
int arLabelingThreshAutoAdaptiveBias
Definition ar.h:368
ARdouble pattRatio
A value between 0.0 and 1.0, representing the proportion of the marker width which constitutes the pa...
Definition ar.h:370
int arPixelSize
Definition ar.h:345
int arLabelingThreshAutoAdaptiveKernelSize
Definition ar.h:367
ARParamLT * arParamLT
Definition ar.h:351
int marker2_num
Definition ar.h:356
int history_num
Definition ar.h:358
ARdouble areaMin
Definition ar.h:374
AR_LABELING_THRESH_MODE arLabelingThreshMode
Definition ar.h:362
int arLabelingMode
Definition ar.h:346
int arDebug
Definition ar.h:343
ARPattHandle * pattHandle
Definition ar.h:361
int xsize
Definition ar.h:352
ARTrackingHistory history[AR_SQUARE_MAX]
Definition ar.h:359
int ysize
Definition ar.h:353
int arMarkerExtractionMode
Definition ar.h:350
int arLabelingThreshAutoBracketOver
Definition ar.h:365
ARdouble squareFitThresh
Definition ar.h:375
ARMarkerInfo markerInfo[AR_SQUARE_MAX]
Definition ar.h:355
int marker_num
Definition ar.h:354
int arLabelingThreshAutoIntervalTTL
Definition ar.h:364
(description)
Definition ar.h:247
ARdouble pos[AR_LABELING_WORK_SIZE][2]
Definition ar.h:255
int work[AR_LABELING_WORK_SIZE]
Definition ar.h:256
ARUint8 * bwImage
Definition ar.h:250
int clip[AR_LABELING_WORK_SIZE][4]
Definition ar.h:254
int area[AR_LABELING_WORK_SIZE]
Definition ar.h:253
int label_num
Definition ar.h:252
AR_LABELING_LABEL_TYPE * labelImage
Definition ar.h:248
int work2[AR_LABELING_WORK_SIZE *7]
area, pos[2], clip[4].
Definition ar.h:257
Captures detail of a trapezoidal region which is a candidate for marker detection.
Definition ar.h:171
ARdouble pos[2]
Center.
Definition ar.h:173
int y_coord[AR_CHAIN_MAX]
Y values of coordinates.
Definition ar.h:176
int x_coord[AR_CHAIN_MAX]
X values of coordinates.
Definition ar.h:175
int area
Area in pixels.
Definition ar.h:172
int vertex[5]
Vertices.
Definition ar.h:177
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
ARdouble vertex[4][2]
2D positions (in camera image coordinates, origin at top-left) of the corners of the marker....
Definition ar.h:226
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
ARdouble line[4][3]
Line equations for the 4 sides of the marker.
Definition ar.h:225
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
int matched
Initialised to 0 during marker detection, a non-zero value indicates that this marker has already bee...
Definition ar.h:231
ARdouble pos[2]
2D position (in camera image coordinates, origin at top-left) of the centre of the marker.
Definition ar.h:224
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:268
ARdouble * pattpow
Root-mean-square of the pattern intensities.
Definition ar.h:273
int patt_num
Number of valid patterns in the structure.
Definition ar.h:269
int pattSize
Number of rows/columns in the pattern.
Definition ar.h:277
int ** patt
Array of 4 different orientations of each pattern's colour values, in 1-byte per component BGR order.
Definition ar.h:272
int ** pattBW
Array of 4 different orientations of each pattern's 1-byte luminosity values.
Definition ar.h:274
ARdouble * pattpowBW
Root-mean-square of the pattern intensities.
Definition ar.h:275
int * pattf
0 = no pattern loaded at this position. 1 = pattern loaded and activated. 2 = pattern loaded but deac...
Definition ar.h:271
int patt_num_max
Maximum number of patterns that may be loaded in this structure.
Definition ar.h:270
Defines a pattern rectangle as a sub-portion of a marker image.
Definition ar.h:286
float bottomRightX
Horizontal coordinate of the bottom right corner of the pattern space, in range 0....
Definition ar.h:289
float bottomRightY
Vertical coordinate of the bottom right corner of the pattern space, in range 0.0f-1....
Definition ar.h:290
float topLeftY
Vertical coordinate of the top left corner of the pattern space, in range 0.0f-1.0f.
Definition ar.h:288
float topLeftX
Horizontal coordinate of the top left corner of the pattern space, in range 0.0f-1....
Definition ar.h:287
(description)
Definition ar.h:238
int count
Definition ar.h:240
ARMarkerInfo marker
Definition ar.h:239