libalvision  2.4.3.28-r2
 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 
29  const int kTopCamera = 0;
30  const int kBottomCamera = 1;
31  const int kDepthCamera = 2;
32 
37  const float kApertureH_OV7670 = 47.8f;
38  const float kApertureV_OV7670 = 36.8f;
39  const float kApertureH_MT9M114 = 60.9f;
40  const float kApertureV_MT9M114 = 47.6f;
41 
45  const int kQQVGA = 0; // 160*120
46  const int kQVGA = 1; // 320*240
47  const int kVGA = 2; // 640*480
48  const int k4VGA = 3; //1280*960
49  const int k960p = k4VGA; //deprecated
50  const int k16VGA = 4; //2560*1920
51  const int k1920p = k16VGA; //2560*1920
52  const int k720p = 5; //1280*720
53  const int k1080p = 6; //1920*1080
54  const int kQQQVGA = 7; // 80*60
55  const int kQQQQVGA = 8; // 40*30
56 
60  const int kYuvColorSpace = 0;
61  const int kyUvColorSpace = 1;
62  const int kyuVColorSpace = 2;
63  const int kRgbColorSpace = 3;
64  const int krGbColorSpace = 4;
65  const int krgBColorSpace = 5;
66  const int kHsyColorSpace = 6;
67  const int khSyColorSpace = 7;
68  const int khsYColorSpace = 8;
69  const int kYUV422ColorSpace = 9;
71  const int kYUVColorSpace = 10;
72  const int kRGBColorSpace = 11;
73  const int kHSYColorSpace = 12;
74  const int kBGRColorSpace = 13; // for opencv ease of use
75  const int kYYCbCrColorSpace = 14; // for tiff io implementation
76  const int kH2RGBColorSpace = 15; // H from HSY to RGB in fake colors
77  const int kHSMixedColorSpace = 16; // HS and (H +S)/2
78  const int kDepthColorSpace = 17;
79  const int kARGBColorSpace = 18;
80  const int kXYZColorSpace = 19;
81  const int kInfraredColorSpace = 20;
82  const int kDistanceColorSpace = 21;
83  const int kLabColorSpace = 22;
84  const int kRawDepthColorSpace = 23;
85  const int kLuvColorSpace = 24;
86  const int kLChabColorSpace = 25;
87  const int kLChuvColorSpace = 26;
88 
92  const int kCameraBrightnessID = 0;
93  const int kCameraContrastID = 1;
94  const int kCameraSaturationID = 2;
95  const int kCameraHueID = 3;
96  const int kCameraRedChromaID = 4;
97  const int kCameraBlueChromaID = 5;
98  const int kCameraGainID = 6;
99  const int kCameraHFlipID = 7;
100  const int kCameraVFlipID = 8;
101  const int kCameraLensXID = 9;
102  const int kCameraLensYID = 10;
103  const int kCameraAutoExpositionID = 11;
105  const int kCameraAutoGainID = 13;
106  const int kCameraResolutionID = 14;
107  const int kCameraFrameRateID = 15;
108  const int kCameraBufferSizeID = 16;
109  const int kCameraExposureID = 17;
110  const int kCameraSelectID = 18;
112  const int kCameraColorSpaceID = 20;
116  const int kCameraFastSwitchID = 23;
117  const int kCameraSharpnessID = 24;
118  const int kCameraAwbGreenGainID = 25;
119  const int kCameraAblcID = 26;
120  const int kCameraAblcTargetID = 27;
121  const int kCameraAblcStableRangeID = 28;
122  const int kCameraBlcBlueID = 29;
123  const int kCameraBlcRedID = 30;
124  const int kCameraBlcGbID = 31;
125  const int kCameraBlcGrID = 32;
126  const int kCameraWhiteBalanceID = 33;
128  const int kCameraKeepAliveID = 35;
130  const int kCameraDepthFastFilterID = 37;
131  const int kCameraTemperatureID = 38;
132  const int kCameraAverageLuminanceID = 39;
133  const int kCameraAutoFocusID = 40;
134  const int kCameraSynchronisationID = 41;
135 
138  bool isResolutionValid(const int resIndex);
139 
143  void setSizeFromResolution(const int resIndex, int& outWidth, int& outHeight);
144 
148  int getResolutionFromSize(const int width, const int height);
149 
152  bool isColorSpaceValid(const int colorspace);
153 
160  int getNumLayersInColorSpace(const int colorSpace);
161 
169  int getNumChannelsInColorSpace(const int colorSpace);
170 
171  inline float convertAngleValToNormalizedImgVal(const float& radValue,
172  const float& imageRadMin,
173  const float& imageRadMax)
174  { return ( radValue / (imageRadMax-imageRadMin)); }
175 
176  inline float convertAnglePosToNormalizedImgPos(const float& radPosition,
177  const float& imageRadMin,
178  const float& imageRadMax)
179  { return ((radPosition-imageRadMin) / (imageRadMax-imageRadMin)); }
180 } // namespace AL
181 
182 
183 #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
int getNumLayersInColorSpace(const int colorSpace)
Utility function that returns the number of layers for a given color space.
const int kyUvColorSpace
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 kBGRColorSpace
const int kRGBColorSpace
const int kRawDepthColorSpace
const int kCameraHueID
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 kCameraTemperatureID
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 kDepthCamera
const float kApertureH_MT9M114
const int kH2RGBColorSpace
const int kYuvColorSpace
const int kCameraWhiteBalanceID
const int kLChabColorSpace
const int kCameraBlcRedID
const int kCameraAblcID
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 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 kOV7670
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 kCameraSharpnessID