$search
00001 /**************************************************************** 00002 * 00003 * Copyright (c) 2010 00004 * 00005 * Fraunhofer Institute for Manufacturing Engineering 00006 * and Automation (IPA) 00007 * 00008 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00009 * 00010 * Project name: care-o-bot 00011 * ROS stack name: cob_common 00012 * ROS package name: cob_camera_sensors 00013 * Description: Type definitions for camera sensors. 00014 * 00015 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00016 * 00017 * Author: Jan Fischer, email:jan.fischer@ipa.fhg.de 00018 * Supervised by: Jan Fischer, email:jan.fischer@ipa.fhg.de 00019 * 00020 * Date of creation: June 2010 00021 * ToDo: 00022 * 00023 * +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00024 * 00025 * Redistribution and use in source and binary forms, with or without 00026 * modification, are permitted provided that the following conditions are met: 00027 * 00028 * * Redistributions of source code must retain the above copyright 00029 * notice, this list of conditions and the following disclaimer. 00030 * * Redistributions in binary form must reproduce the above copyright 00031 * notice, this list of conditions and the following disclaimer in the 00032 * documentation and/or other materials provided with the distribution. 00033 * * Neither the name of the Fraunhofer Institute for Manufacturing 00034 * Engineering and Automation (IPA) nor the names of its 00035 * contributors may be used to endorse or promote products derived from 00036 * this software without specific prior written permission. 00037 * 00038 * This program is free software: you can redistribute it and/or modify 00039 * it under the terms of the GNU Lesser General Public License LGPL as 00040 * published by the Free Software Foundation, either version 3 of the 00041 * License, or (at your option) any later version. 00042 * 00043 * This program is distributed in the hope that it will be useful, 00044 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00045 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00046 * GNU Lesser General Public License LGPL for more details. 00047 * 00048 * You should have received a copy of the GNU Lesser General Public 00049 * License LGPL along with this program. 00050 * If not, see <http://www.gnu.org/licenses/>. 00051 * 00052 ****************************************************************/ 00053 00054 00059 00060 #ifndef __IPA_CAMERASENSORTYPES_H__ 00061 #define __IPA_CAMERASENSORTYPES_H__ 00062 00063 //#include "../../../../../cob_object_perception_intern/windows/src/PreCompiledHeaders/StdAfx.h" 00064 #include <string> 00065 00066 namespace ipa_CameraSensors { 00067 00069 enum 00070 { 00074 RET_OK = 0x00000001UL, 00075 RET_FAILED = 0x00000002UL, 00076 00077 00078 RET_FAILED_OPEN_FILE = 0x00000004UL, 00079 RET_FAILED_CV_CREATE_CAMERA = 0x00000008UL, 00080 RET_MISSING_INTRINSIC_DISTORTION_PARAMS = 0x00000010UL, 00081 RET_FUNCTION_NOT_IMPLEMENTED = 0x00000020UL, 00082 RET_XML_ATTR_NOT_FOUND = 0x00000040UL, 00083 RET_XML_TAG_NOT_FOUND = 0x00000080UL, 00084 RET_CAMERA_ALREADY_OPEN = 0x00000100UL, 00085 RET_CAMERA_ALREADY_INITIALIZED = 0x00000200UL, 00086 RET_CAMERA_NOT_OPEN = 0x00000400UL, 00087 RET_CAMERA_NOT_INITIALIZED = 0x00000600UL, 00088 RET_INIT_CAMERA_FAILED = 0x00000800UL, 00089 RET_OPEN_CAMERA_FAILED = 0x00001000UL, 00090 RET_OPEN_CHECK_FAILED = 0x00002000UL, 00091 RET_INIT_CHECK_FAILED = 0x00004000UL, 00092 RET_CLOSE_CAMERA_FAILED = 0x00008000UL, 00093 RET_GET_COLOR_IMAGE_FAILED = 0x00010000UL, 00094 RET_GET_INTRINSIC_PARAMS_FAILED = 0x00020000UL, 00095 RET_SET_INTRINSIC_PARAMS_FAILED = 0x00040000UL, 00096 RET_GET_DISTORTION_COEFFS_FAILED = 0x00060000UL, 00097 RET_SET_DISTORTION_COEFFS_FAILED = 0x00080000UL, 00098 RET_REMOVE_DISTORTION_FAILED = 0x00100000UL, 00099 RET_SET_PROPERTY_DEFAULTS_FAILED = 0x00200000UL, 00100 RET_SAVE_PARAMS_FAILED = 0x00400000UL, 00101 RET_SET_PROPERTY_FAILED = 0x00800000UL, 00102 RET_GET_PROPERTY_FAILED = 0x01000000UL 00103 }; 00104 00106 enum t_cameraType 00107 { 00108 CAM_VIRTUALCOLOR = 0, 00109 CAM_VIRTUALRANGE, 00110 CAM_IC, 00111 CAM_AVTPIKE, 00112 CAM_AXIS, 00113 CAM_PROSILICA, 00114 CAM_SWISSRANGER, 00115 CAM_PMDCAM, 00116 CAM_KINECT, 00117 CAM_OPENCVCAMERA, 00118 ROBOT 00119 }; 00120 00122 enum t_cameraPropertyID 00123 { 00124 PROP_BRIGHTNESS = 0, 00125 PROP_SHARPNESS, 00126 PROP_WHITE_BALANCE_U, 00127 00128 00129 00130 PROP_WHITE_BALANCE_V, 00131 PROP_HUE, 00132 PROP_SATURATION, 00133 PROP_GAMMA, 00134 PROP_EXPOSURE_TIME, 00135 PROP_GAIN, 00136 PROP_OPTICAL_FILTER, 00137 PROP_FRAME_RATE, 00138 PROP_REGISTER, 00139 PROP_TIMEOUT, 00140 PROP_CAMERA_RESOLUTION, 00141 PROP_VIDEO_ALL, 00142 PROP_VIDEO_FORMAT, 00143 PROP_VIDEO_MODE, 00144 PROP_COLOR_MODE, 00145 PROP_ISO_SPEED, 00146 PROP_FW_OPERATION_MODE, 00147 PROP_SHUTTER, 00148 00149 PROP_AMPLITUDE_THRESHOLD, 00150 00151 00152 PROP_INTEGRATION_TIME, 00153 00154 00155 00156 PROP_RESOLUTION, 00157 PROP_MODULATION_FREQUENCY, 00158 00159 PROP_ACQUIRE_MODE, 00160 PROP_DISTANCE_OFFSET, 00161 PROP_ROI, 00162 PROP_LENS_CALIBRATION, 00163 PROP_DMA_BUFFER_SIZE, 00164 PROP_PMD_TYPE 00165 }; 00166 00168 enum t_colorMode 00169 { 00170 COLOR_YUV444 = 0, 00171 COLOR_YUV422, 00172 COLOR_YUV411, 00173 COLOR_RGB8, 00174 COLOR_RGB16S, 00175 COLOR_RGB16, 00176 COLOR_MONO8, 00177 COLOR_MONO16S, 00178 COLOR_MONO16, 00179 COLOR_RAW8, 00180 COLOR_RAW16, 00181 COLOR_DEFAULT 00182 }; 00183 00185 enum t_videoFormat 00186 { 00187 FORMAT_0 = 0, 00188 FORMAT_1, 00189 FORMAT_2, 00190 FORMAT_7, 00191 FORMAT_DEFAULT 00192 }; 00193 00195 enum t_videoMode 00196 { 00197 MODE_0 = 0, 00198 MODE_1, 00199 MODE_2, 00200 MODE_3, 00201 MODE_4, 00202 MODE_5, 00203 MODE_6, 00204 MODE_7, 00205 MODE_DEFAULT 00206 }; 00207 00209 enum t_specialValues 00210 { 00211 VALUE_AUTO = 0, 00212 VALUE_ONESHOT, 00213 VALUE_OFF, 00214 VALUE_DEFAULT 00215 }; 00216 00218 enum t_cameraPropertyType 00219 { 00220 TYPE_CAMERA_RESOLUTION = 0x00000001L, 00221 TYPE_VIDEO_FORMAT = 0x00000002L, 00222 TYPE_VIDEO_MODE = 0x00000004L, 00223 TYPE_COLOR_MODE = 0x00000008L, 00224 TYPE_CHARACTER = 0x00000010L, 00225 TYPE_SHORT = 0x00000020L, 00226 TYPE_INTEGER = 0x00000040L, 00227 TYPE_LONG = 0x00000080L, 00228 TYPE_FLOAT = 0x00000100L, 00229 TYPE_DOUBLE = 0x00000200L, 00230 TYPE_UNSIGNED = 0x00000400L, 00231 TYPE_STRING = 0x00000800L, 00232 TYPE_DATA = 0x00001000L, 00233 TYPE_SPECIAL = 0x00002000L 00234 }; 00235 00237 struct t_cameraResolution 00238 { 00239 int xResolution; 00240 int yResolution; 00241 }; 00242 00244 struct t_cameraProperty 00245 { 00246 t_cameraPropertyID propertyID; 00247 unsigned long propertyType; 00248 00249 00250 00251 t_cameraResolution cameraResolution; 00252 t_cameraResolution* cameraResolutions; 00253 int count_cameraResolution; 00254 00255 t_videoFormat videoFormat; 00256 t_videoMode videoMode; 00257 t_colorMode colorMode; 00258 00259 t_specialValues specialValue; 00260 00261 int integerData; 00262 short shortData; 00263 double doubleData; 00264 float floatData; 00265 char charData; 00266 long longData; 00267 00268 unsigned int u_integerData; 00269 unsigned short u_shortData; 00270 unsigned char u_charData; 00271 unsigned long u_longData; 00272 00273 std::string stringData; 00274 00275 void* data; 00276 int count_data; 00277 00278 }; 00279 00280 enum t_CalibrationMethod 00281 { 00282 NATIVE = 0, 00283 MATLAB_NO_Z, 00284 MATLAB 00285 }; 00286 00287 enum t_ToFGrayImageType 00288 { 00289 INTENSITY_32F1 = 0, 00290 AMPLITUDE, 00291 INTENSITY_8U3 00292 }; 00293 00295 typedef enum 00296 { 00297 MASTER = 0, 00298 SLAVE 00299 }t_cameraRole; 00300 } // namespace ipa_CameraSensors 00301 00302 #endif // __IPA_CAMERASENSORTYPES_H__