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

Loading...
Searching...
No Matches
arConfig.h
Go to the documentation of this file.
1/*
2 * arConfig.h
3 * artoolkitX
4 *
5 * This file is part of artoolkitX.
6 *
7 * artoolkitX is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU Lesser General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * artoolkitX is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public License
18 * along with artoolkitX. If not, see <http://www.gnu.org/licenses/>.
19 *
20 * As a special exception, the copyright holders of this library give you
21 * permission to link this library with independent modules to produce an
22 * executable, regardless of the license terms of these independent modules, and to
23 * copy and distribute the resulting executable under terms of your choice,
24 * provided that you also meet, for each linked independent module, the terms and
25 * conditions of the license of that module. An independent module is a module
26 * which is neither derived from nor based on this library. If you modify this
27 * library, you may extend this exception to your version of the library, but you
28 * are not obligated to do so. If you do not wish to do so, delete this exception
29 * statement from your version.
30 *
31 * Copyright 2018 Realmax, Inc.
32 * Copyright 2015 Daqri, LLC.
33 * Copyright 2002-2015 ARToolworks, Inc.
34 *
35 * Author(s): Hirokazu Kato, Philip Lamb
36 *
37 */
38
39#ifndef AR_AR_CONFIG_H
40#define AR_AR_CONFIG_H
41
42
43/* for arDebug */
44#define AR_DEBUG_DISABLE 0
45#define AR_DEBUG_ENABLE 1
46#define AR_DEFAULT_DEBUG_MODE AR_DEBUG_DISABLE
47
48/* for arLabelingMode */
49#define AR_LABELING_WHITE_REGION 0
50#define AR_LABELING_BLACK_REGION 1
51#define AR_DEFAULT_LABELING_MODE AR_LABELING_BLACK_REGION
52
53/* for arlabelingThresh */
54#define AR_DEFAULT_LABELING_THRESH 100
55
56/* for arImageProcMode */
57#define AR_IMAGE_PROC_FRAME_IMAGE 0
58#define AR_IMAGE_PROC_FIELD_IMAGE 1
59#define AR_DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_FRAME_IMAGE
60
61/* for arPatternDetectionMode */
62#define AR_TEMPLATE_MATCHING_COLOR 0
63#define AR_TEMPLATE_MATCHING_MONO 1
64#define AR_MATRIX_CODE_DETECTION 2
65#define AR_TEMPLATE_MATCHING_COLOR_AND_MATRIX 3
66#define AR_TEMPLATE_MATCHING_MONO_AND_MATRIX 4
67#define AR_DEFAULT_PATTERN_DETECTION_MODE AR_TEMPLATE_MATCHING_COLOR
68
69/* for arMarkerExtractionMode */
70#define AR_USE_TRACKING_HISTORY 0
71#define AR_NOUSE_TRACKING_HISTORY 1
72#define AR_USE_TRACKING_HISTORY_V2 2
73#define AR_DEFAULT_MARKER_EXTRACTION_MODE AR_USE_TRACKING_HISTORY_V2
74
75/* for arCornerRefinementMode */
76#define AR_CORNER_REFINEMENT_DISABLE 0
77#define AR_CORNER_REFINEMENT_ENABLE 1
78#define AR_DEFAULT_CORNER_REFINEMENT_MODE AR_CORNER_REFINEMENT_DISABLE
79
80/* for arGetTransMat */
81#define AR_MAX_LOOP_COUNT 5
82#define AR_LOOP_BREAK_THRESH 0.5
83
84/* for arPatt** */
85#if AR_ENABLE_MINIMIZE_MEMORY_FOOTPRINT
86#define AR_PATT_NUM_MAX 25
87#else
88#define AR_PATT_NUM_MAX 50
89#endif
90#define AR_PATT_SIZE1 16 // Default number of rows and columns in pattern when pattern detection mode is not AR_MATRIX_CODE_DETECTION. Must be 16 in order to be compatible with ARToolKit versions 1.0 to 5.1.6.
91#define AR_PATT_SIZE1_MAX 64 // Maximum number of rows and columns allowed in pattern when pattern detection mode is not AR_MATRIX_CODE_DETECTION.
92#define AR_PATT_SIZE2_MAX 32 // Maximum number of rows and columns allowed in pattern when pattern detection mode is AR_MATRIX_CODE_DETECTION.
93#define AR_PATT_SAMPLE_FACTOR1 4 // Maximum number of samples per pattern pixel row / column when pattern detection mode is not AR_MATRIX_CODE_DETECTION.
94#define AR_PATT_SAMPLE_FACTOR2 3 // Maximum number of samples per pattern pixel row / column when detection mode is AR_MATRIX_CODE_DETECTION.
95#define AR_PATT_CONTRAST_THRESH1 15.0 // Required contrast over pattern space when pattern detection mode is AR_TEMPLATE_MATCHING_MONO or AR_TEMPLATE_MATCHING_COLOR.
96#define AR_PATT_CONTRAST_THRESH2 30.0 // Required contrast between black and white barcode segments when pattern detection mode is AR_MATRIX_CODE_DETECTION.
97#define AR_PATT_RATIO 0.5 // Default value for percentage of marker width or height considered to be pattern space. Equal to 1.0 - 2*borderSize. Must be 0.5 in order to be compatible with ARToolKit versions 1.0 to 4.4.
98
99
100
101#define AR_AREA_MAX 1000000 // Maximum area (in pixels) of connected regions considered valid candidate for marker detection.
102#define AR_AREA_MIN 70 // Minimum area (in pixels) of connected regions considered valid candidate for marker detection.
103#define AR_SQUARE_FIT_THRESH 1.0 // Tolerance value for accepting connected region as square. Greater value = more tolerant.
104
105#define AR_LABELING_32_BIT 0 // 0 = 16 bits per label, 1 = 32 bits per label.
106#if AR_LABELING_32_BIT
107# define AR_LABELING_WORK_SIZE 1024*32*16
108# define AR_LABELING_LABEL_TYPE ARInt32
109#else
110# define AR_LABELING_WORK_SIZE 1024*32 // This number may not exceed 65535 when using 16-bits labels.
111# define AR_LABELING_LABEL_TYPE ARInt16
112#endif
113
114#if AR_ENABLE_MINIMIZE_MEMORY_FOOTPRINT
115#define AR_SQUARE_MAX 30 // Maxiumum number of marker squares per frame.
116#else
117#define AR_SQUARE_MAX 60 // Maxiumum number of marker squares per frame.
118#endif
119#define AR_CHAIN_MAX 10000
120
121#define AR_LABELING_THRESH_AUTO_INTERVAL_DEFAULT 7 // Number of frames between auto-threshold calculations.
122#define AR_LABELING_THRESH_MODE_DEFAULT AR_LABELING_THRESH_MODE_MANUAL
123#define AR_LABELING_THRESH_ADAPTIVE_KERNEL_SIZE_DEFAULT 9
124#define AR_LABELING_THRESH_ADAPTIVE_BIAS_DEFAULT (-7)
125
126#define AR_CONFIDENCE_CUTOFF_DEFAULT 0.5
127#define AR_MATRIX_CODE_TYPE_DEFAULT AR_MATRIX_CODE_3x3
128
129#endif