7 #ifndef _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
8 #define _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
16 #define TORAD 3.14f/180.0f
22 const int kMT9M114 = 2;
28 const int kBottomCamera = 1;
34 const float kApertureV_OV7670 = 36.8f;
35 const float kApertureH_MT9M114 = 60.9f;
36 const float kApertureV_MT9M114 = 47.6f;
51 const int kyUvColorSpace = 1;
52 const int kyuVColorSpace = 2;
53 const int kRgbColorSpace = 3;
54 const int krGbColorSpace = 4;
55 const int krgBColorSpace = 5;
56 const int kHsyColorSpace = 6;
57 const int khSyColorSpace = 7;
58 const int khsYColorSpace = 8;
59 const int kYUV422InterlacedColorSpace = 9;
60 const int kYUV422ColorSpace = 9;
61 const int kYUVColorSpace = 10;
62 const int kRGBColorSpace = 11;
63 const int kHSYColorSpace = 12;
64 const int kBGRColorSpace = 13;
65 const int kYYCbCrColorSpace = 14;
66 const int kH2RGBColorSpace = 15;
67 const int kHSMixedColorSpace = 16;
68 const int kDepthColorSpace = 17;
69 const int kARGBColorSpace = 18;
75 const int kCameraContrastID = 1;
76 const int kCameraSaturationID = 2;
77 const int kCameraHueID = 3;
78 const int kCameraRedChromaID = 4;
79 const int kCameraBlueChromaID = 5;
80 const int kCameraGainID = 6;
81 const int kCameraHFlipID = 7;
82 const int kCameraVFlipID = 8;
83 const int kCameraLensXID = 9;
84 const int kCameraLensYID = 10;
85 const int kCameraAutoExpositionID = 11;
86 const int kCameraAutoWhiteBalanceID = 12;
87 const int kCameraAutoGainID = 13;
88 const int kCameraResolutionID = 14;
89 const int kCameraFrameRateID = 15;
90 const int kCameraBufferSizeID = 16;
91 const int kCameraExposureID = 17;
92 const int kCameraSelectID = 18;
93 const int kCameraSetDefaultParamsID = 19;
94 const int kCameraColorSpaceID = 20;
95 const int kCameraExposureCorrectionID = 21;
96 const int kCameraExposureAlgorithmID = 22;
97 const int kCameraAecAlgorithmID = kCameraExposureAlgorithmID;
98 const int kCameraFastSwitchID = 23;
99 const int kCameraSharpnessID = 24;
100 const int kCameraAwbGreenGainID = 25;
101 const int kCameraAblcID = 26;
102 const int kCameraAblcTargetID = 27;
103 const int kCameraAblcStableRangeID = 28;
104 const int kCameraBlcBlueID = 29;
105 const int kCameraBlcRedID = 30;
106 const int kCameraBlcGbID = 31;
107 const int kCameraBlcGrID = 32;
108 const int kCameraWhiteBalanceID = 33;
109 const int kCameraBacklightCompensationID = 34;
111 bool isResolutionValid(
const int resIndex);
112 void setSizeFromResolution(
const int resIndex,
int& outWidth,
int& outHeight);
113 int getResolutionFromSize(
const int width,
const int height);
114 bool isColorSpaceValid(
const int colorspace);
115 int getNumLayersInColorSpace(
const int colorSpace);
116 inline float convertAngleValToNormalizedImgVal(
const float& radValue,
117 const float& imageRadMin,
118 const float& imageRadMax)
119 {
return ( radValue / (imageRadMax-imageRadMin)); }
121 inline float convertAnglePosToNormalizedImgPos(
const float& radPosition,
122 const float& imageRadMin,
123 const float& imageRadMax)
124 {
return ((radPosition-imageRadMin) / (imageRadMax-imageRadMin)); }
128 #endif // _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_