00001 #ifndef AR_CONFIG_H
00002 #define AR_CONFIG_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #define AR_HEADER_VERSION_MAJOR 2
00014
00015
00016
00017
00018 #define AR_HEADER_VERSION_MINOR 72
00019
00020
00021
00022 #define AR_HEADER_VERSION_TINY 1
00023
00024
00025
00026
00027 #define AR_HEADER_VERSION_BUILD 0
00028
00029
00030
00031 #define AR_HEADER_VERSION_STRING "2.72.1"
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #define AR_HAVE_HEADER_VERSION_2
00044 #define AR_HAVE_HEADER_VERSION_2_72
00045
00046
00047
00048
00049
00050 #define AR_PIXEL_FORMAT_RGB 1
00051 #define AR_PIXEL_FORMAT_BGR 2
00052 #define AR_PIXEL_FORMAT_RGBA 3
00053 #define AR_PIXEL_FORMAT_BGRA 4
00054 #define AR_PIXEL_FORMAT_ABGR 5
00055 #define AR_PIXEL_FORMAT_MONO 6
00056 #define AR_PIXEL_FORMAT_ARGB 7
00057 #define AR_PIXEL_FORMAT_2vuy 8
00058 #define AR_PIXEL_FORMAT_UYVY AR_PIXEL_FORMAT_2vuy
00059 #define AR_PIXEL_FORMAT_yuvs 9
00060 #define AR_PIXEL_FORMAT_YUY2 AR_PIXEL_FORMAT_yuvs
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 #ifdef __linux
00072 #define AR_INPUT_V4L
00073 #undef AR_INPUT_DV
00074 #undef AR_INPUT_1394CAM
00075 #undef AR_INPUT_GSTREAMER
00076
00077 # ifdef AR_INPUT_V4L
00078 # ifdef USE_EYETOY
00079 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_RGB
00080 # else
00081 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_BGR
00082 # endif
00083 # endif
00084
00085 # ifdef AR_INPUT_DV
00086 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_RGB
00087 # endif
00088
00089 # ifdef AR_INPUT_1394CAM
00090 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_RGB
00091 # endif
00092
00093 # ifdef AR_INPUT_GSTREAMER
00094 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_RGB
00095 # endif
00096
00097 # undef AR_BIG_ENDIAN
00098 # define AR_LITTLE_ENDIAN
00099 #endif
00100
00101
00102
00103
00104
00105 #ifdef __sgi
00106 # define AR_BIG_ENDIAN
00107 # undef AR_LITTLE_ENDIAN
00108 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_ABGR
00109 #endif
00110
00111
00112
00113
00114 #ifdef _WIN32
00115 # undef AR_BIG_ENDIAN
00116 # define AR_LITTLE_ENDIAN
00117 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_BGRA
00118 #endif
00119
00120
00121
00122
00123 #ifdef __APPLE__
00124 # if defined(__BIG_ENDIAN__) // Check architecture endianess using gcc's macro.
00125 # define AR_BIG_ENDIAN // Most Significant Byte has greatest address in memory (ppc).
00126 # undef AR_LITTLE_ENDIAN
00127 # elif defined (__LITTLE_ENDIAN__)
00128 # undef AR_BIG_ENDIAN // Least significant Byte has greatest address in memory (i386).
00129 # define AR_LITTLE_ENDIAN
00130 # endif
00131 # define AR_DEFAULT_PIXEL_FORMAT AR_PIXEL_FORMAT_ARGB
00132 #endif
00133
00134
00135
00136
00137 #define AR_DRAW_BY_GL_DRAW_PIXELS 0
00138 #define AR_DRAW_BY_TEXTURE_MAPPING 1
00139 #define AR_DRAW_TEXTURE_FULL_IMAGE 0
00140 #define AR_DRAW_TEXTURE_HALF_IMAGE 1
00141 #define AR_IMAGE_PROC_IN_FULL 0
00142 #define AR_IMAGE_PROC_IN_HALF 1
00143 #define AR_FITTING_TO_IDEAL 0
00144 #define AR_FITTING_TO_INPUT 1
00145
00146 #define AR_TEMPLATE_MATCHING_COLOR 0
00147 #define AR_TEMPLATE_MATCHING_BW 1
00148 #define AR_MATCHING_WITHOUT_PCA 0
00149 #define AR_MATCHING_WITH_PCA 1
00150 #define DEFAULT_TEMPLATE_MATCHING_MODE AR_TEMPLATE_MATCHING_COLOR
00151 #define DEFAULT_MATCHING_PCA_MODE AR_MATCHING_WITHOUT_PCA
00152
00153
00154 #ifdef __linux
00155 # ifdef AR_INPUT_V4L
00156 # define VIDEO_MODE_PAL 0
00157 # define VIDEO_MODE_NTSC 1
00158 # define VIDEO_MODE_SECAM 2
00159 # define DEFAULT_VIDEO_DEVICE "/dev/video0"
00160 # define DEFAULT_VIDEO_WIDTH 640
00161 # define DEFAULT_VIDEO_HEIGHT 480
00162 # define DEFAULT_VIDEO_CHANNEL 1
00163 # define DEFAULT_VIDEO_MODE VIDEO_MODE_NTSC
00164 # endif
00165
00166 # ifdef AR_INPUT_DV
00167
00168 # endif
00169
00170 # ifdef AR_INPUT_1394CAM
00171
00172 # endif
00173
00174 # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_FULL
00175 # define DEFAULT_FITTING_MODE AR_FITTING_TO_IDEAL
00176 # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING
00177 # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_HALF_IMAGE
00178 #endif
00179
00180 #ifdef __sgi
00181 # define VIDEO_FULL 0
00182 # define VIDEO_HALF 1
00183 # define DEFAULT_VIDEO_SIZE VIDEO_FULL
00184 # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_FULL
00185 # define DEFAULT_FITTING_MODE AR_FITTING_TO_INPUT
00186 # define DEFAULT_DRAW_MODE AR_DRAW_BY_GL_DRAW_PIXELS
00187 # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_HALF_IMAGE
00188 #endif
00189
00190 #ifdef _WIN32
00191 # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_FULL
00192 # define DEFAULT_FITTING_MODE AR_FITTING_TO_INPUT
00193 # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING
00194 # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_FULL_IMAGE
00195 #endif
00196
00197 #ifdef __APPLE__
00198 # define DEFAULT_VIDEO_WIDTH 640
00199 # define DEFAULT_VIDEO_HEIGHT 480
00200 # define DEFAULT_IMAGE_PROC_MODE AR_IMAGE_PROC_IN_FULL
00201 # define DEFAULT_FITTING_MODE AR_FITTING_TO_IDEAL
00202 # define DEFAULT_DRAW_MODE AR_DRAW_BY_TEXTURE_MAPPING
00203 # define DEFAULT_DRAW_TEXTURE_IMAGE AR_DRAW_TEXTURE_FULL_IMAGE
00204 #undef APPLE_TEXTURE_FAST_TRANSFER
00205 #endif
00206
00207
00208
00209 #undef AR_OPENGL_TEXTURE_RECTANGLE
00210
00211
00212
00213 #if (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_ABGR) || (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_BGRA) || (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_RGBA) || (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_ARGB)
00214 # define AR_PIX_SIZE_DEFAULT 4
00215 #elif (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_BGR) || (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_RGB)
00216 # define AR_PIX_SIZE_DEFAULT 3
00217 #elif (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_2vuy) || (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_yuvs)
00218 # define AR_PIX_SIZE_DEFAULT 2
00219 #elif (AR_DEFAULT_PIXEL_FORMAT == AR_PIXEL_FORMAT_MONO)
00220 # define AR_PIX_SIZE_DEFAULT 1
00221 #else
00222 # error Unknown default pixel format defined in config.h.
00223 #endif
00224
00225
00226 #define AR_GET_TRANS_MAT_MAX_LOOP_COUNT 5
00227 #define AR_GET_TRANS_MAT_MAX_FIT_ERROR 1.0
00228 #define AR_GET_TRANS_CONT_MAT_MAX_FIT_ERROR 1.0
00229
00230 #define AR_AREA_MAX 100000
00231 #define AR_AREA_MIN 70
00232
00233
00234 #define AR_SQUARE_MAX 30
00235 #define AR_CHAIN_MAX 10000
00236 #define AR_PATT_NUM_MAX 50
00237 #define AR_PATT_SIZE_X 16
00238 #define AR_PATT_SIZE_Y 16
00239 #define AR_PATT_SAMPLE_NUM 64
00240
00241 #define AR_GL_CLIP_NEAR 50.0
00242 #define AR_GL_CLIP_FAR 5000.0
00243
00244 #define AR_HMD_XSIZE 640
00245 #define AR_HMD_YSIZE 480
00246
00247 #define AR_PARAM_NMIN 6
00248 #define AR_PARAM_NMAX 1000
00249 #define AR_PARAM_C34 100.0
00250
00251 #endif