libalvision
1.12
|
00001 00006 #pragma once 00007 #ifndef _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_ 00008 #define _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_ 00009 00014 namespace AL 00015 { 00016 #define TORAD 3.14f/180.0f 00017 00021 const int kOV7670 = 1; 00022 const int kMT9M114 = 2; 00023 00027 const float kApertureH_OV7670 = 47.8f; 00028 const float kApertureV_OV7670 = 36.8f; 00029 const float kApertureH_MT9M114 = 60.9f; 00030 const float kApertureV_MT9M114 = 47.6f; 00031 00035 const int k960p = 3; //1280*960 00036 const int k4VGA = 3; //1280*960 00037 const int kVGA = 2; // 640*480 00038 const int kQVGA = 1; // 320*240 00039 const int kQQVGA = 0; // 160*120 00040 00044 const int kYuvColorSpace = 0; 00045 const int kyUvColorSpace = 1; 00046 const int kyuVColorSpace = 2; 00047 const int kRgbColorSpace = 3; 00048 const int krGbColorSpace = 4; 00049 const int krgBColorSpace = 5; 00050 const int kHsyColorSpace = 6; 00051 const int khSyColorSpace = 7; 00052 const int khsYColorSpace = 8; 00053 const int kYUV422InterlacedColorSpace = 9; // deprecated 00054 const int kYUV422ColorSpace = 9; 00055 const int kYUVColorSpace = 10; 00056 const int kRGBColorSpace = 11; 00057 const int kHSYColorSpace = 12; 00058 const int kBGRColorSpace = 13; // for opencv ease of use 00059 const int kYYCbCrColorSpace = 14; // for tiff io implementation 00060 const int kH2RGBColorSpace = 15; // H from HSY to RGB in fake colors 00061 const int kHSMixedColorSpace = 16; // HS and (H +S)/2 00062 00066 const int kCameraBrightnessID = 0; 00067 const int kCameraContrastID = 1; 00068 const int kCameraSaturationID = 2; 00069 const int kCameraHueID = 3; 00070 const int kCameraRedChromaID = 4; 00071 const int kCameraBlueChromaID = 5; 00072 const int kCameraGainID = 6; 00073 const int kCameraHFlipID = 7; 00074 const int kCameraVFlipID = 8; 00075 const int kCameraLensXID = 9; 00076 const int kCameraLensYID = 10; 00077 const int kCameraAutoExpositionID = 11; 00078 const int kCameraAutoWhiteBalanceID = 12; 00079 const int kCameraAutoGainID = 13; 00080 const int kCameraResolutionID = 14; 00081 const int kCameraFrameRateID = 15; 00082 const int kCameraBufferSizeID = 16; 00083 const int kCameraExposureID = 17; 00084 const int kCameraSelectID = 18; 00085 const int kCameraSetDefaultParamsID = 19; 00086 const int kCameraColorSpaceID = 20; 00087 const int kCameraExposureCorrectionID = 21; 00088 const int kCameraAecAlgorithmID = 22; 00089 const int kCameraFastSwitchID = 23; 00090 const int kCameraSharpnessID = 24; 00091 const int kCameraAwbGreenGainID = 25; 00092 const int kCameraAblcID = 26; 00093 const int kCameraAblcTargetID = 27; 00094 const int kCameraAblcStableRangeID = 28; 00095 const int kCameraBlcBlueID = 29; 00096 const int kCameraBlcRedID = 30; 00097 const int kCameraBlcGbID = 31; 00098 const int kCameraBlcGrID = 32; 00099 const int kCameraWhiteBalanceID = 33; 00100 const int kCameraBacklightCompensationID = 34; 00101 00102 bool isResolutionValid(const int resIndex); 00103 void setSizeFromResolution(const int resIndex, int& outWidth, int& outHeight); 00104 int getResolutionFromSize(const int width, const int height); 00105 bool isColorSpaceValid(const int colorspace); 00106 int getNumLayersInColorSpace(const int colorSpace); 00107 inline float convertAngleValToNormalizedImgVal(const float& radValue, 00108 const float& imageRadMin, 00109 const float& imageRadMax) 00110 { return ( radValue / (imageRadMax-imageRadMin)); }; 00111 00112 inline float convertAnglePosToNormalizedImgPos(const float& radPosition, 00113 const float& imageRadMin, 00114 const float& imageRadMax) 00115 { return ((radPosition-imageRadMin) / (imageRadMax-imageRadMin)); }; 00116 } // namespace AL 00117 00118 00119 #endif // _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_