libalvision  2.1.4.13
 All Classes Namespaces Files Functions Variables 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 
87  const int kCameraBrightnessID = 0;
88  const int kCameraContrastID = 1;
89  const int kCameraSaturationID = 2;
90  const int kCameraHueID = 3;
91  const int kCameraRedChromaID = 4;
92  const int kCameraBlueChromaID = 5;
93  const int kCameraGainID = 6;
94  const int kCameraHFlipID = 7;
95  const int kCameraVFlipID = 8;
96  const int kCameraLensXID = 9;
97  const int kCameraLensYID = 10;
98  const int kCameraAutoExpositionID = 11;
99  const int kCameraAutoWhiteBalanceID = 12;
100  const int kCameraAutoGainID = 13;
101  const int kCameraResolutionID = 14;
102  const int kCameraFrameRateID = 15;
103  const int kCameraBufferSizeID = 16;
104  const int kCameraExposureID = 17;
105  const int kCameraSelectID = 18;
107  const int kCameraColorSpaceID = 20;
111  const int kCameraFastSwitchID = 23;
112  const int kCameraSharpnessID = 24;
113  const int kCameraAwbGreenGainID = 25;
114  const int kCameraAblcID = 26;
115  const int kCameraAblcTargetID = 27;
116  const int kCameraAblcStableRangeID = 28;
117  const int kCameraBlcBlueID = 29;
118  const int kCameraBlcRedID = 30;
119  const int kCameraBlcGbID = 31;
120  const int kCameraBlcGrID = 32;
121  const int kCameraWhiteBalanceID = 33;
123  const int kCameraKeepAliveID = 35;
125  const int kCameraDepthFastFilterID = 37;
126  const int kCameraTemperatureID = 38;
127  const int kCameraAverageLuminanceID = 39;
128  const int kCameraAutoFocusID = 40;
129 
132  bool isResolutionValid(const int resIndex);
133 
137  void setSizeFromResolution(const int resIndex, int& outWidth, int& outHeight);
138 
142  int getResolutionFromSize(const int width, const int height);
143 
146  bool isColorSpaceValid(const int colorspace);
147 
154  int getNumLayersInColorSpace(const int colorSpace);
155 
163  int getNumChannelsInColorSpace(const int colorSpace);
164 
165  inline float convertAngleValToNormalizedImgVal(const float& radValue,
166  const float& imageRadMin,
167  const float& imageRadMax)
168  { return ( radValue / (imageRadMax-imageRadMin)); }
169 
170  inline float convertAnglePosToNormalizedImgPos(const float& radPosition,
171  const float& imageRadMin,
172  const float& imageRadMax)
173  { return ((radPosition-imageRadMin) / (imageRadMax-imageRadMin)); }
174 } // namespace AL
175 
176 
177 #endif // _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
const int kCameraSelectID
const int kOV7670
const int k960p
const int kInfraredColorSpace
const int kQQVGA
const int kCameraAutoWhiteBalanceID
int getNumLayersInColorSpace(const int colorSpace)
Utility function that returns the number of layers for a given color space.
const float kApertureV_MT9M114
int getNumChannelsInColorSpace(const int colorSpace)
Utility function that returns the number of channels for a given color space.
const int k1080p
const float kApertureV_OV7670
const int kCameraHFlipID
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 k4VGA
const int kYUV422InterlacedColorSpace
const int kCameraAecAlgorithmID
const int kQQQVGA
const int kCameraDepthFastFilterID
const int krgBColorSpace
const int kCameraLensYID
const int kCameraBrightnessID
float convertAnglePosToNormalizedImgPos(const float &radPosition, const float &imageRadMin, const float &imageRadMax)
const int kBottomCamera
const int kCameraAblcID
const int kYuvColorSpace
const int kCameraVFlipID
const int kRgbColorSpace
const int kCameraBlcGbID
const int kCameraRedChromaID
const int kHSYColorSpace
const int kCameraBlcBlueID
const int kCameraBufferSizeID
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 kCameraWhiteBalanceID
const int kCameraFastSwitchID
const int kCameraKeepAliveID
const int khsYColorSpace
const int kYUV422ColorSpace
float convertAngleValToNormalizedImgVal(const float &radValue, const float &imageRadMin, const float &imageRadMax)
const int kCameraExposureCorrectionID
const int kCameraAblcStableRangeID
const int kCameraGainID
bool isColorSpaceValid(const int colorspace)
Utility function that checks that a color space index is valid. (ie, present in the definitions just ...
const int kHsyColorSpace
const float kApertureH_MT9M114
const int kMT9M114
const int kCameraAutoExpositionID
const int kCameraContrastID
const int kCameraBlcRedID
const int kQVGA
const int kCameraDepthConfidenceThresholdID
const int kXYZColorSpace
const int kVGA
const int kCameraBacklightCompensationID
const int kHSMixedColorSpace
const int kYUVColorSpace
const int kYYCbCrColorSpace
const int kCameraAutoGainID
bool isResolutionValid(const int resIndex)
Utility function that checks that a resolution index is valid. (ie, present in the definitions just a...
const int kDistanceColorSpace
const int kCameraBlueChromaID
const int kCameraTemperatureID
const int kCameraExposureAlgorithmID
const int kCameraAutoFocusID
const int kDepthColorSpace
const int kBGRColorSpace
const int kCameraExposureID
const int kCameraAblcTargetID
const int kCameraSharpnessID
const int kyuVColorSpace
const int kCameraAverageLuminanceID
const int kCameraColorSpaceID
const int kDepthCamera
const int kOV5640
const int krGbColorSpace
const int kCameraFrameRateID
const int kCameraSaturationID
const int kyUvColorSpace
const int kQQQQVGA
const int kXTION
const int kTopCamera
const int kCameraResolutionID
const int kCameraLensXID
const int k1920p
const int kCameraHueID
const int kH2RGBColorSpace
const float kApertureH_OV7670
const int kCameraBlcGrID
const int k16VGA
const int k720p
const int kARGBColorSpace
const int kRGBColorSpace
const int khSyColorSpace
const int kCameraAwbGreenGainID
const int kCameraSetDefaultParamsID