alvisiondefinitions.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2015 Aldebaran
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 
00018 /*
00019  * You can also find this document at the following location:
00020  * http://doc.aldebaran.com/2-1/ref/libalvision/a00012_source.html
00021 */
00022 
00023 #pragma once
00024 #ifndef _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
00025 #define _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_
00026 
00027 namespace AL
00028 {
00029   #define TORAD  3.14f/180.0f
00030 
00031   const int kOV7670  = 1;
00032   const int kMT9M114 = 2;
00033   const int kOV5640  = 3;
00034   const int kXTION   = 4;
00035 
00036   const int kTopCamera = 0;
00037   const int kBottomCamera = 1;
00038   const int kDepthCamera = 2;
00039   const int kInfraredCamera = 3;
00040 
00041   const float kApertureH_OV7670  = 47.8f;
00042   const float kApertureV_OV7670  = 36.8f;
00043   const float kApertureH_MT9M114 = 60.9f;
00044   const float kApertureV_MT9M114 = 47.6f;
00045 
00046   const int kQQVGA = 0;  // 160*120
00047   const int kQVGA  = 1;  // 320*240
00048   const int kVGA   = 2;  // 640*480
00049   const int k4VGA  = 3;  //1280*960
00050   const int k960p  = k4VGA;  //deprecated
00051   const int k16VGA = 4;  //2560*1920
00052   const int k1920p = k16VGA;  //2560*1920
00053   const int k720p = 5;  //1280*720
00054   const int k1080p = 6;  //1920*1080
00055   const int kQQQVGA = 7;  // 80*60
00056   const int kQQQQVGA = 8;  // 40*30
00057 
00058   const int kYuvColorSpace = 0;
00059   const int kyUvColorSpace = 1;
00060   const int kyuVColorSpace = 2;
00061   const int kRgbColorSpace = 3;
00062   const int krGbColorSpace = 4;
00063   const int krgBColorSpace = 5;
00064   const int kHsyColorSpace = 6;
00065   const int khSyColorSpace = 7;
00066   const int khsYColorSpace = 8;
00067   const int kYUV422InterlacedColorSpace = 9; // deprecated
00068   const int kYUV422ColorSpace = 9;
00069   const int kYUVColorSpace = 10;
00070   const int kRGBColorSpace = 11;
00071   const int kHSYColorSpace = 12;
00072   const int kBGRColorSpace = 13;     // for opencv ease of use
00073   const int kYYCbCrColorSpace = 14;  // for tiff io implementation
00074   const int kH2RGBColorSpace = 15;   // H from HSY to RGB in fake colors
00075   const int kHSMixedColorSpace = 16; // HS and (H +S)/2
00076   const int kDepthColorSpace = 17;
00077   const int kARGBColorSpace = 18;
00078   const int kXYZColorSpace = 19;
00079   const int kInfraredColorSpace = 20;
00080   const int kDistanceColorSpace = 21;
00081   const int kRawDepthColorSpace = 23;
00082       
00083   const int kCameraBrightnessID       = 0;
00084   const int kCameraContrastID         = 1;
00085   const int kCameraSaturationID       = 2;
00086   const int kCameraHueID              = 3;
00087   const int kCameraRedChromaID        = 4;
00088   const int kCameraBlueChromaID       = 5;
00089   const int kCameraGainID             = 6;
00090   const int kCameraHFlipID            = 7;
00091   const int kCameraVFlipID            = 8;
00092   const int kCameraLensXID            = 9;
00093   const int kCameraLensYID            = 10;
00094   const int kCameraAutoExpositionID   = 11;
00095   const int kCameraAutoWhiteBalanceID = 12;
00096   const int kCameraAutoGainID         = 13;
00097   const int kCameraResolutionID       = 14;
00098   const int kCameraFrameRateID        = 15;
00099   const int kCameraBufferSizeID       = 16;
00100   const int kCameraExposureID         = 17;
00101   const int kCameraSelectID           = 18;
00102   const int kCameraSetDefaultParamsID = 19;
00103   const int kCameraColorSpaceID       = 20;
00104   const int kCameraExposureCorrectionID = 21;
00105   const int kCameraExposureAlgorithmID = 22;
00106   const int kCameraAecAlgorithmID     = kCameraExposureAlgorithmID; // deprecated
00107   const int kCameraFastSwitchID       = 23;
00108   const int kCameraSharpnessID        = 24;
00109   const int kCameraAwbGreenGainID     = 25;
00110   const int kCameraAblcID             = 26;
00111   const int kCameraAblcTargetID       = 27;
00112   const int kCameraAblcStableRangeID  = 28;
00113   const int kCameraBlcBlueID          = 29;
00114   const int kCameraBlcRedID           = 30;
00115   const int kCameraBlcGbID            = 31;
00116   const int kCameraBlcGrID            = 32;
00117   const int kCameraWhiteBalanceID     = 33;
00118   const int kCameraBacklightCompensationID = 34;
00119   const int kCameraKeepAliveID        = 35;
00120   const int kCameraDepthConfidenceThresholdID = 36;
00121   const int kCameraDepthFastFilterID  = 37;
00122   const int kCameraTemperatureID      = 38;
00123   const int kCameraAverageLuminanceID = 39;
00124   const int kCameraAutoFocusID = 40;
00125 
00126   bool isResolutionValid(const int resIndex);
00127 
00128   void setSizeFromResolution(const int resIndex, int& outWidth, int& outHeight);
00129 
00130   int getResolutionFromSize(const int width, const int height);
00131 
00132   bool isColorSpaceValid(const int colorspace);
00133 
00134   int getNumLayersInColorSpace(const int colorSpace);
00135 
00136   inline float convertAngleValToNormalizedImgVal(const float& radValue,
00137                                                  const float& imageRadMin,
00138                                                  const float& imageRadMax)
00139    { return ( radValue / (imageRadMax-imageRadMin)); }
00140 
00141   inline float convertAnglePosToNormalizedImgPos(const float& radPosition,
00142                                                  const float& imageRadMin,
00143                                                  const float& imageRadMax)
00144     { return ((radPosition-imageRadMin) / (imageRadMax-imageRadMin)); }
00145 } // namespace AL
00146 
00147 
00148 #endif  // _LIBALVISION_ALVISION_ALVISIONDEFINITIONS_H_


naoqi_driver
Author(s): Karsten Knese
autogenerated on Sun Sep 17 2017 02:57:14