ARX  1.0
The next-generation open source augmented reality toolkit.
Loading...
Searching...
No Matches
ar.h
Go to the documentation of this file.
1/*
2 * ar.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-2016 Daqri, LLC.
33 * Copyright 2002-2015 ARToolworks, Inc.
34 *
35 * Author(s): Hirokazu Kato, Philip Lamb
36 *
37 */
38/*******************************************************
39 *
40 * Author: Hirokazu Kato
41 *
42 * kato@sys.im.hiroshima-cu.ac.jp
43 *
44 * Revision: 4.01
45 * Date: 2003/11/07
46 *
47 *******************************************************/
48
61#ifndef AR_H
62#define AR_H
63
64#include <stdio.h>
65#include <stdlib.h>
66#include <stdint.h>
67#include <string.h>
68#include <ARX/AR/config.h>
69#include <ARX/AR/arConfig.h>
70#ifdef __ANDROID__
71# include <jni.h>
72# include <android/log.h>
73#endif
74#include <ARX/ARUtil/log.h>
75
76#ifdef __cplusplus
77extern "C" {
78#endif
79
80
81#define arMalloc(V,T,S) \
82{ if( ((V) = (T *)malloc( sizeof(T) * (S) )) == NULL ) \
83{ARLOGe("Out of memory!!\n"); exit(1);} }
84
85#define arMallocClear(V,T,S) \
86{ if( ((V) = (T *)calloc( (S), sizeof(T) )) == NULL ) \
87{ARLOGe("Out of memory!!\n"); exit(1);} }
88
89typedef char ARInt8;
90typedef short ARInt16;
91typedef int ARInt32;
92typedef unsigned char ARUint8;
93typedef unsigned short ARUint16;
94typedef unsigned int ARUint32;
95typedef float ARfloat;
96#ifdef ARDOUBLE_IS_FLOAT
97typedef float ARdouble;
98#else
99typedef double ARdouble;
100#endif
101
102#ifndef TRUE
103# define TRUE 1
104#endif
105#ifndef FALSE
106# define FALSE 0
107#endif
108
109#ifdef __cplusplus
110}
111#endif
112
113#include <ARX/AR/matrix.h>
114#include <ARX/AR/icp.h>
115
116#ifdef __cplusplus
117extern "C" {
118#endif
119
120#ifdef _WIN32
121# ifdef AR_STATIC
122# define AR_EXTERN
123# else
124# ifdef ARX_EXPORTS
125# define AR_EXTERN __declspec(dllexport)
126# else
127# define AR_EXTERN __declspec(dllimport)
128# endif
129# endif
130#else
131# define AR_EXTERN
132#endif
133
134/* --------------------------------------------------*/
135
139typedef struct {
140 uint64_t sec;
141 uint32_t usec;
143
148typedef struct {
151 unsigned int bufPlaneCount;
156
160typedef enum {
167
171typedef struct {
172 int area;
173 ARdouble pos[2];
175 int x_coord[AR_CHAIN_MAX];
176 int y_coord[AR_CHAIN_MAX];
177 int vertex[5];
179
189typedef enum {
201
202#define AR_MARKER_INFO_CUTOFF_PHASE_DESCRIPTION_COUNT 10
204
213typedef struct {
214 int area;
215 int id;
216 int idPatt;
218 int dir;
224 ARdouble pos[2];
225 ARdouble line[4][3];
226 ARdouble vertex[4][2];
230 uint64_t globalID;
232
237typedef struct {
239 int count;
241
246typedef struct {
248#if !AR_DISABLE_LABELING_DEBUG_MODE
250#endif
258
259/* --------------------------------------------------*/
260
267typedef struct {
270 int *pattf;
271 int **patt;
273 int **pattBW;
275 //ARdouble pattRatio; ///<
278
285typedef struct {
286 float topLeftX;
287 float topLeftY;
291
292/* --------------------------------------------------*/
293
294#ifdef __cplusplus
295}
296#endif
297
298#include <ARX/AR/param.h>
299#include <ARX/AR/arImageProc.h>
300
301#ifdef __cplusplus
302extern "C" {
303#endif
304
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
315
319typedef enum {
332
341typedef struct {
343 AR_PIXEL_FORMAT arPixelFormat;
351 int xsize;
352 int ysize;
375} ARHandle;
376
377
378/* --------------------------------------------------*/
379
384typedef struct {
386} AR3DHandle;
387
388#define AR_TRANS_MAT_IDENTITY ICP_TRANS_MAT_IDENTITY
389
394typedef struct {
397
398
399/***********************************/
400/* */
401/* For square detection */
402/* */
403/***********************************/
404
438
447AR_EXTERN int arDeleteHandle( ARHandle *handle );
448
466AR_EXTERN void arSetDebugMode(ARHandle *handle, int mode);
467
477
496AR_EXTERN void arSetLabelingMode(ARHandle *handle, int mode);
497
507
535AR_EXTERN void arSetLabelingThresh(ARHandle *handle, int thresh);
536
556
572
587
601AR_EXTERN void arSetLabelingThreshModeAutoInterval(ARHandle *handle, const int interval);
602
615
616AR_EXTERN void arSetLabelingThreshAutoAdaptiveKernelSize(ARHandle *handle, const int labelingThreshAutoAdaptiveKernelSize);
617
619
620AR_EXTERN void arSetLabelingThreshAutoAdaptiveBias(ARHandle *handle, const int labelingThreshAutoAdaptiveBias);
621
623
647AR_EXTERN void arSetImageProcMode(ARHandle *handle, int mode);
648
659
683AR_EXTERN void arSetPatternDetectionMode(ARHandle *handle, int mode);
684
695
720
730
743AR_EXTERN void arSetMarkerExtractionMode(ARHandle *handle, int mode);
744
753
765AR_EXTERN void arSetBorderSize(ARHandle *handle, const ARdouble borderSize);
766
778
789AR_EXTERN void arSetPattRatio(ARHandle *handle, const ARdouble pattRatio);
790
800
815AR_EXTERN void arSetPixelFormat(ARHandle *handle, AR_PIXEL_FORMAT pixFormat);
816
829AR_EXTERN AR_PIXEL_FORMAT arGetPixelFormat(ARHandle *handle);
830
831AR_EXTERN void arSetAreaMax(ARHandle *handle, const ARdouble areaMax);
832
834
835AR_EXTERN void arSetAreaMin(ARHandle *handle, const ARdouble areaMin);
836
838
839AR_EXTERN void arSetSquareFitThresh(ARHandle *handle, const ARdouble squareFitThresh);
840
842
855AR_EXTERN void arSetCornerRefinementMode(ARHandle *handle, int mode);
856
866
867
894AR_EXTERN int arDetectMarker(ARHandle *arHandle, AR2VideoBufferT *frame);
895
906AR_EXTERN int arGetMarkerNum( ARHandle *arHandle );
907
919
920/* ------------------------------ */
921
922AR_EXTERN int arLabeling( ARUint8 *imageLuma, int xsize, int ysize,
923 int debugMode, int labelingMode, int labelingThresh, int imageProcMode,
924 ARLabelInfo *labelInfo, ARUint8 *image_thresh );
925AR_EXTERN int arDetectMarker2( int xsize, int ysize, ARLabelInfo *labelInfo, int imageProcMode,
926 int areaMax, int areaMin, ARdouble squareFitThresh,
927 ARMarkerInfo2 *markerInfo2, int *marker2_num );
951AR_EXTERN int arGetMarkerInfo( ARUint8 *image, int xsize, int ysize, int pixelFormat,
952 ARMarkerInfo2 *markerInfo2, int marker2_num,
953 ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode, ARParamLTf *arParamLTf, ARdouble pattRatio,
954 ARMarkerInfo *markerInfo, int *marker_num,
955 const AR_MATRIX_CODE_TYPE matrixCodeType );
956
957AR_EXTERN int arGetContour( AR_LABELING_LABEL_TYPE *lImage, int xsize, int ysize, int *label_ref, int label,
958 int clip[4], ARMarkerInfo2 *marker_info2 );
959AR_EXTERN int arGetLine( int x_coord[], int y_coord[], int coord_num, int vertex[], ARParamLTf *paramLTf,
960 ARdouble line[4][3], ARdouble v[4][2] );
961
962
963/***********************************/
964/* */
965/* For pattern identification */
966/* */
967/***********************************/
968
986
1009AR_EXTERN ARPattHandle *arPattCreateHandle2(const int pattSize, const int patternCountMax);
1010
1019
1047AR_EXTERN int arPattLoad( ARPattHandle *pattHandle, const char *filename );
1048
1049AR_EXTERN int arPattLoadFromBuffer(ARPattHandle *pattHandle, const char *buffer);
1050
1067AR_EXTERN int arPattSave( ARUint8 *image, int xsize, int ysize, int pixelFormat, ARParamLTf *paramLTf,
1068 int imageProcMode, ARMarkerInfo *marker_info, ARdouble pattRatio, int pattSize, const char *filename );
1069
1081AR_EXTERN int arPattFree( ARPattHandle *pattHandle, int patno );
1082
1096AR_EXTERN int arPattActivate( ARPattHandle *pattHandle, int patno );
1097
1113AR_EXTERN int arPattDeactivate(ARPattHandle *pattHandle, int patno);
1114
1127AR_EXTERN int arPattAttach(ARHandle *arHandle, ARPattHandle *pattHandle);
1128
1137AR_EXTERN int arPattDetach(ARHandle *arHandle);
1138
1139//int arPattGetPattRatio( ARPattHandle *pattHandle, float *ratio );
1140//int arPattSetPattRatio( ARPattHandle *pattHandle, float ratio );
1141
1142/* ------------------------------ */
1143
1144#if !AR_DISABLE_NON_CORE_FNS
1145AR_EXTERN int arPattGetID( ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode,
1146 ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat,
1147 int *x_coord, int *y_coord, int *vertex, ARdouble pattRatio,
1148 int *code, int *dir, ARdouble *cf, const AR_MATRIX_CODE_TYPE matrixCodeType );
1149AR_EXTERN int arPattGetImage( int imageProcMode, int pattDetectMode, int patt_size, int sample_size,
1150 ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat,
1151 int *x_coord, int *y_coord, int *vertex, ARdouble pattRatio,
1152 ARUint8 *ext_patt );
1153
1176AR_EXTERN int arPattGetID2( ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode,
1177 ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *arParamLTf, ARdouble vertex[4][2], ARdouble pattRatio,
1178 int *codePatt, int *dirPatt, ARdouble *cfPatt, int *codeMatrix, int *dirMatrix, ARdouble *cfMatrix,
1179 const AR_MATRIX_CODE_TYPE matrixCodeType );
1180#endif // !AR_DISABLE_NON_CORE_FNS
1181
1206AR_EXTERN int arPattGetIDGlobal( ARPattHandle *pattHandle, int imageProcMode, int pattDetectMode,
1207 ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *arParamLTf, ARdouble vertex[4][2], ARdouble pattRatio,
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 );
1210
1228AR_EXTERN int arPattGetImage2( int imageProcMode, int pattDetectMode, int patt_size, int sample_size,
1229 ARUint8 *image, int xsize, int ysize, AR_PIXEL_FORMAT pixelFormat, ARParamLTf *arParamLTf,
1230 ARdouble vertex[4][2], ARdouble pattRatio, ARUint8 *ext_patt );
1231
1246AR_EXTERN int arPattGetImage3( ARHandle *arHandle, int markerNo, ARUint8 *image, ARPattRectInfo *rect, int xsize, int ysize,
1247 int overSampleScale, ARUint8 *outImage );
1248
1249
1250/***********************************/
1251/* */
1252/* For 3D calculation */
1253/* */
1254/***********************************/
1255
1272
1285
1294AR_EXTERN int ar3DDeleteHandle( AR3DHandle **handle );
1295
1303AR_EXTERN int ar3DChangeCpara( AR3DHandle *handle, const ARdouble cpara[3][4] );
1304
1312AR_EXTERN int ar3DChangeMaxLoopCount( AR3DHandle *handle, int maxLoopCount );
1313
1321AR_EXTERN int ar3DChangeLoopBreakThresh( AR3DHandle *handle, ARdouble loopBreakThresh );
1322
1330AR_EXTERN int ar3DChangeLoopBreakThreshRatio( AR3DHandle *handle, ARdouble loopBreakThreshRatio );
1331
1342 ARdouble width, ARdouble conv[3][4] );
1343
1355 ARdouble initConv[3][4],
1356 ARdouble width, ARdouble conv[3][4] );
1357
1369AR_EXTERN ARdouble arGetTransMat( AR3DHandle *handle, ARdouble initConv[3][4],
1370 ARdouble pos2d[][2], ARdouble pos3d[][3], int num,
1371 ARdouble conv[3][4] );
1372
1385 ARdouble pos2d[][2], ARdouble pos3d[][3], int num,
1386 ARdouble conv[3][4] );
1387
1388
1389/***********************************/
1390/* */
1391/* For 3D calculation by Stereo */
1392/* */
1393/***********************************/
1394
1399AR_EXTERN AR3DStereoHandle *ar3DStereoCreateHandle(const ARParam *arParamL, const ARParam *arParamR, const ARdouble transL[3][4], const ARdouble transR[3][4]);
1400AR_EXTERN AR3DStereoHandle *ar3DStereoCreateHandle2(const ARdouble cparaL[3][4], const ARdouble cparaR[3][4], const ARdouble transL[3][4], const ARdouble transR[3][4]);
1402AR_EXTERN int ar3DStereoChangeMaxLoopCount( AR3DStereoHandle *handle, int maxLoopCount );
1404AR_EXTERN int ar3DStereoChangeLoopBreakThreshRatio( AR3DStereoHandle *handle, ARdouble loopBreakThreshRatio );
1405AR_EXTERN int ar3DStereoChangeCpara( AR3DStereoHandle *handle, ARdouble cparaL[3][4], ARdouble cparaR[3][4] );
1406AR_EXTERN int ar3DStereoChangeTransMat( AR3DStereoHandle *handle, ARdouble transL[3][4], ARdouble transR[3][4] );
1407
1409 ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR,
1410 ARdouble width, ARdouble conv[3][4] );
1412 ARMarkerInfo *marker_infoL, ARMarkerInfo *marker_infoR,
1413 ARdouble prev_conv[3][4],
1414 ARdouble width, ARdouble conv[3][4] );
1416 ARdouble pos2dL[][2], ARdouble pos3dL[][3], int numL,
1417 ARdouble pos2dR[][2], ARdouble pos3dR[][3], int numR,
1418 ARdouble conv[3][4] );
1420 ARdouble pos2dL[][2], ARdouble pos3dL[][3], int numL,
1421 ARdouble pos2dR[][2], ARdouble pos3dR[][3], int numR,
1422 ARdouble conv[3][4] );
1423
1425 ARMarkerInfo *marker_infoL,
1426 ARMarkerInfo *marker_infoR );
1428 ARdouble pos2dL[2], ARdouble pos2dR[2] );
1430 ARdouble pos2dL[2], ARdouble pos2dR[2], ARdouble pos3d[3] );
1431
1432
1433
1434/***********************************/
1435/* */
1436/* Utility */
1437/* */
1438/***********************************/
1439
1491AR_EXTERN ARUint32 arGetVersion(char **versionStringRef);
1492
1493AR_EXTERN int arUtilMatInv( const ARdouble s[3][4], ARdouble d[3][4] );
1494AR_EXTERN int arUtilMatMul( const ARdouble s1[3][4], const ARdouble s2[3][4], ARdouble d[3][4] );
1495
1496#ifdef ARDOUBLE_IS_FLOAT
1497#define arUtilMatInvf arUtilMatInv
1498#define arUtilMatMulf arUtilMatMul
1499#define arUtilMatMuldff arUtilMatMul
1500#else
1501AR_EXTERN int arUtilMatInvf( const float s[3][4], float d[3][4] );
1502AR_EXTERN int arUtilMatMulf( const float s1[3][4], const float s2[3][4], float d[3][4] );
1503AR_EXTERN int arUtilMatMuldff( const ARdouble s1[3][4], const float s2[3][4], float d[3][4] );
1504#endif
1505AR_EXTERN int arUtilMat2QuatPos( const ARdouble m[3][4], ARdouble q[4], ARdouble p[3] );
1506AR_EXTERN int arUtilQuatPos2Mat( const ARdouble q[4], const ARdouble p[3], ARdouble m[3][4] );
1508
1509AR_EXTERN int arUtilReplaceExt( char *filename, int n, char *ext );
1510AR_EXTERN int arUtilRemoveExt ( char *filename );
1511AR_EXTERN int arUtilDivideExt ( const char *filename, char *s1, char *s2 );
1512
1513AR_EXTERN int arUtilGetSquareCenter( ARdouble vertex[4][2], ARdouble *x, ARdouble *y );
1514
1515AR_EXTERN int arUtilSortLabel( int mask[], int m, int n,
1516 ARdouble pos[][2], int area[], int label_num,
1517 int l1, int x1, int y1,
1518 int l2, int x2, int y2,
1519 int label[] );
1520
1531AR_EXTERN int arUtilGetPixelSize( const AR_PIXEL_FORMAT arPixelFormat );
1532
1544AR_EXTERN const char *arUtilGetPixelFormatName(const AR_PIXEL_FORMAT arPixelFormat);
1545
1546/*
1547 @brief Get the filename portion of a full pathname.
1548 @details
1549 Given a full or partial pathname passed in string path,
1550 returns a pointer to the first char of the filename
1551 portion of path.
1552 */
1553AR_EXTERN const char *arUtilGetFileNameFromPath(const char *path);
1554
1555
1570AR_EXTERN char *arUtilGetFileBasenameFromPath(const char *path, const int convertToLowercase);
1571
1585AR_EXTERN char *arUtilGetFileExtensionFromPath(const char *path, const int convertToLowercase);
1586
1587 /*
1588 @brief Get the directory portion of a full pathname.
1589 @details
1590 Given a full or partial pathname passed in string path,
1591 returns a string with the directory name portion of path.
1592 The string is placed into the buffer of size n pointed to by dir.
1593 If the string and its terminating null byte cannot be accomodated by the
1594 buffer, NULL is returned, otherwise dir is returned.
1595 The string is terminated by the directory separator if addSeparator != 0.
1596 */
1597AR_EXTERN char *arUtilGetDirectoryNameFromPath(char *dir, const char *path, const size_t n, const int addSeparator);
1598
1617AR_EXTERN char *arUtilGetFileURI(const char *path);
1618
1624typedef enum {
1680
1696#ifdef ANDROID
1697char *arUtilGetResourcesDirectoryPath(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior, jobject instanceOfAndroidContext);
1698#else
1700#endif
1701
1717#ifdef ANDROID
1718char *arUtilGetAndCreateResourcesDirectoryPath(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior, jobject instanceOfAndroidContext);
1719#else
1721#endif
1722
1723#ifndef _WINRT
1744#ifdef ANDROID
1745int arUtilChangeToResourcesDirectory(AR_UTIL_RESOURCES_DIRECTORY_BEHAVIOR behavior, const char *path, jobject instanceOfAndroidContext);
1746#else
1748#endif
1749#endif // !_WINRT
1750
1751#ifdef __ANDROID__
1752# define ARPRINT(...) __android_log_print(ANDROID_LOG_INFO, "artoolkitx", __VA_ARGS__)
1753# define ARPRINTE(...) __android_log_print(ANDROID_LOG_ERROR, "artoolkitx", __VA_ARGS__)
1754#else
1755# define ARPRINT(...) printf(__VA_ARGS__)
1756# define ARPRINTE(...) fprintf(stderr, __VA_ARGS__)
1757#endif
1758
1763AR_EXTERN void arUtilPrintTransMat(const ARdouble trans[3][4]);
1764
1769AR_EXTERN void arUtilPrintMtx16(const ARdouble mtx16[16]);
1770
1771#ifdef __cplusplus
1772}
1773#endif //#ifdef __cplusplus
1774
1775#endif //#ifndef AR_H
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.
Logging utilities.
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
Definition: icp.h:75
Definition: icp.h:84