libalvision  2.5.7.1
 All Classes Namespaces Files Functions Variables Friends Macros Pages
alvisiondefinitions.h
Go to the documentation of this file.
1 
6 #pragma once
7 #ifndef _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
8 #define _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
9 
14 namespace AL
15 {
16  #define TORAD 3.14f/180.0f
17 
21  const int kOV7670 = 1;
22  const int kMT9M114 = 2;
23  const int kOV5640 = 3;
24  const int kXTION = 4;
25  const int kSimulator2D = 5;
26  const int kSimulator3D = 6;
27  const int kStereo = 7;
28  const int kOV4689 = 8;
29 
33  const int kTopCamera = 0;
34  const int kBottomCamera = 1;
35  const int kDepthCamera = 2;
36  const int kStereoCamera = 3;
37 
42  const float kApertureH_OV7670 = 47.8f;
43  const float kApertureV_OV7670 = 36.8f;
44  const float kApertureH_MT9M114 = 60.9f;
45  const float kApertureV_MT9M114 = 47.6f;
46 
50  const int k16VGA = 4; // 2560*1920
51  const int k4VGA = 3; // 1280* 960
52  const int kVGA = 2; // 640* 480
53  const int kQVGA = 1; // 320* 240
54  const int kQQVGA = 0; // 160* 120
55  const int kQQQVGA = 7; // 80* 60
56  const int kQQQQVGA = 8; // 40* 30
57 
58  const int k1080p = 6; // 1920*1080
59  const int k720p = 5; // 1280* 720
60  const int kQ720p = 9; // 640* 360
61  const int kQQ720p = 10; // 320* 180
62  const int kQQQ720p = 11;// 160* 90
63  const int kQQQQ720p = 12;// 80* 45
64 
65  const int k720px2 = 13; // 2560*720
66  const int kQ720px2 = 14; // 1280*360
67  const int kQQ720px2 = 15; // 640*180
68  const int kQQQ720px2 = 16; // 320* 90
69  const int kQQQQ720px2 = 17;// 160* 45
70 
71  const int k960p = k4VGA;
72  const int k1920p = k16VGA;
73 
77  const int kYuvColorSpace = 0;
78  const int kyUvColorSpace = 1;
79  const int kyuVColorSpace = 2;
80  const int kRgbColorSpace = 3;
81  const int krGbColorSpace = 4;
82  const int krgBColorSpace = 5;
83  const int kHsyColorSpace = 6;
84  const int khSyColorSpace = 7;
85  const int khsYColorSpace = 8;
86  const int kYUV422ColorSpace = 9;
88  const int kYUVColorSpace = 10;
89  const int kRGBColorSpace = 11;
90  const int kHSYColorSpace = 12;
91  const int kBGRColorSpace = 13; // for opencv ease of use
92  const int kYYCbCrColorSpace = 14; // for tiff io implementation
93  const int kH2RGBColorSpace = 15; // H from HSY to RGB in fake colors
94  const int kHSMixedColorSpace = 16; // HS and (H +S)/2
95  const int kDepthColorSpace = 17;
96  const int kARGBColorSpace = 18;
97  const int kXYZColorSpace = 19;
98  const int kInfraredColorSpace = 20;
99  const int kDistanceColorSpace = 21;
100  const int kLabColorSpace = 22;
101  const int kRawDepthColorSpace = 23;
102  const int kLuvColorSpace = 24;
103  const int kLChabColorSpace = 25;
104  const int kLChuvColorSpace = 26;
105 
109  const int kCameraBrightnessID = 0;
110  const int kCameraContrastID = 1;
111  const int kCameraSaturationID = 2;
112  const int kCameraHueID = 3;
113  const int kCameraRedChromaID = 4;
114  const int kCameraBlueChromaID = 5;
115  const int kCameraGainID = 6;
116  const int kCameraHFlipID = 7;
117  const int kCameraVFlipID = 8;
118  const int kCameraLensXID = 9;
119  const int kCameraLensYID = 10;
120  const int kCameraAutoExpositionID = 11;
122  const int kCameraAutoGainID = 13;
123  const int kCameraResolutionID = 14;
124  const int kCameraFrameRateID = 15;
125  const int kCameraBufferSizeID = 16;
126  const int kCameraExposureID = 17;
127  const int kCameraSelectID = 18;
129  const int kCameraColorSpaceID = 20;
133  const int kCameraFastSwitchID = 23;
134  const int kCameraSharpnessID = 24;
135  const int kCameraAwbGreenGainID = 25;
136  const int kCameraAblcID = 26;
137  const int kCameraAblcTargetID = 27;
138  const int kCameraAblcStableRangeID = 28;
139  const int kCameraBlcBlueID = 29;
140  const int kCameraBlcRedID = 30;
141  const int kCameraBlcGbID = 31;
142  const int kCameraBlcGrID = 32;
143  const int kCameraWhiteBalanceID = 33;
145  const int kCameraKeepAliveID = 35;
147  const int kCameraDepthFastFilterID = 37;
148  const int kCameraTemperatureID = 38;
149  const int kCameraAverageLuminanceID = 39;
150  const int kCameraAutoFocusID = 40;
151  const int kCameraSynchronisationID = 41;
153  const int kCameraFocusID = 43;
154 
157  bool isResolutionValid(const int resIndex);
158 
162  void setSizeFromResolution(const int resIndex, int& outWidth, int& outHeight);
163 
167  int getResolutionFromSize(const int width, const int height);
168 
171  bool isColorSpaceValid(const int colorspace);
172 
179  int getNumLayersInColorSpace(const int colorSpace);
180 
188  int getNumChannelsInColorSpace(const int colorSpace);
189 
190  inline float convertAngleValToNormalizedImgVal(const float& radValue,
191  const float& imageRadMin,
192  const float& imageRadMax)
193  { return ( radValue / (imageRadMax-imageRadMin)); }
194 
195  inline float convertAnglePosToNormalizedImgPos(const float& radPosition,
196  const float& imageRadMin,
197  const float& imageRadMax)
198  { return ((radPosition-imageRadMin) / (imageRadMax-imageRadMin)); }
199 } // namespace AL
200 
201 
202 #endif // _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
int getNumChannelsInColorSpace(const int colorSpace)
Utility function that returns the number of channels for a given color space.
const int kARGBColorSpace
const int kOV4689
int getNumLayersInColorSpace(const int colorSpace)
Utility function that returns the number of layers for a given color space.
const int kyUvColorSpace
const int kQQQ720px2
const int kCameraLensYID
const int kLChuvColorSpace
const int kBottomCamera
const int kCameraGainID
void setSizeFromResolution(const int resIndex, int &outWidth, int &outHeight)
Utility function that takes a resolution index as an input and returns the corresponding width and he...
const int kCameraDisparityWindowSizeID
const int kBGRColorSpace
const int kRGBColorSpace
const int kQ720p
const int kRawDepthColorSpace
const int kCameraHueID
const int kSimulator3D
const int kCameraAblcTargetID
const int kCameraAutoWhiteBalanceID
const int kCameraContrastID
const int kCameraFastSwitchID
const int kCameraExposureCorrectionID
const int kCameraAblcStableRangeID
const int khsYColorSpace
int getResolutionFromSize(const int width, const int height)
Utility function that takes width and height as inputs and returns the corresponding resolution index...
const int kQQQQ720px2
const int kCameraTemperatureID
const int kStereo
const int kRgbColorSpace
const int kCameraDepthFastFilterID
const int k720p
const int kyuVColorSpace
const int kCameraAutoGainID
const int kDepthColorSpace
const int khSyColorSpace
const float kApertureH_OV7670
const int kCameraLensXID
const int kLuvColorSpace
const int kCameraBlcGrID
const int kCameraBlcBlueID
const int kQVGA
const int kCameraKeepAliveID
const int kDistanceColorSpace
float convertAngleValToNormalizedImgVal(const float &radValue, const float &imageRadMin, const float &imageRadMax)
const int kCameraSynchronisationID
const int kQQQQVGA
const int kHSMixedColorSpace
const int kYYCbCrColorSpace
const int kCameraFrameRateID
const int kVGA
const int kCameraAutoExpositionID
const int k4VGA
const int kCameraResolutionID
const int kStereoCamera
const int kSimulator2D
const int kDepthCamera
const float kApertureH_MT9M114
const int kH2RGBColorSpace
const int kYuvColorSpace
const int kCameraWhiteBalanceID
const int kLChabColorSpace
const int kCameraBlcRedID
const int kCameraAblcID
const int k720px2
bool isColorSpaceValid(const int colorspace)
Utility function that checks that a color space index is valid. (ie, present in the definitions just ...
const int kLabColorSpace
const int kYUV422ColorSpace
const int kCameraExposureAlgorithmID
const int kCameraDepthConfidenceThresholdID
const int kCameraRedChromaID
float convertAnglePosToNormalizedImgPos(const float &radPosition, const float &imageRadMin, const float &imageRadMax)
const int kQ720px2
const int kQQQ720p
const int kYUV422InterlacedColorSpace
const int k1080p
const int kCameraBufferSizeID
const int kCameraVFlipID
const int kHSYColorSpace
const int krgBColorSpace
const int kCameraAecAlgorithmID
const int kCameraBacklightCompensationID
const int kQQQVGA
const float kApertureV_MT9M114
const int kCameraAutoFocusID
const int kTopCamera
const int kCameraExposureID
const int kCameraBrightnessID
const int kCameraHFlipID
const int k960p
const int kOV5640
const int kMT9M114
const int k1920p
const int kQQ720px2
const int kCameraFocusID
const int kOV7670
const int kQQQQ720p
const int kCameraBlueChromaID
const int kCameraSelectID
const int k16VGA
const int kInfraredColorSpace
bool isResolutionValid(const int resIndex)
Utility function that checks that a resolution index is valid. (ie, present in the definitions just a...
const int kCameraAwbGreenGainID
const int kCameraBlcGbID
const int kCameraSetDefaultParamsID
const int kXYZColorSpace
const int kCameraAverageLuminanceID
const float kApertureV_OV7670
const int kQQVGA
const int kXTION
const int krGbColorSpace
const int kYUVColorSpace
const int kCameraSaturationID
const int kHsyColorSpace
const int kCameraColorSpaceID
const int kQQ720p
const int kCameraSharpnessID