Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Representations/Perception/CameraParameters.h

Go to the documentation of this file.
00001 /** 
00002 * @file CameraParameters.h
00003 * Declaration of class CameraParameters.
00004 *
00005 * @author <A href=mailto:bach@informatik.hu-berlin.de>Joscha Bach</A>
00006 */
00007 
00008 #ifndef _CameraParameters_h_
00009 #define _CameraParameters_h_
00010 
00011 #include "Tools/Streams/InOut.h"
00012 #include "Tools/Streams/Streamable.h"
00013 
00014 
00015 /**
00016 * @class CameraParameters
00017 * Adjust parameters for built-in camera of Sony robot
00018 *
00019 * @author Joscha Bach
00020 */
00021 class CameraParameters : public Streamable
00022 {
00023   void serialize(In* in, Out* out);
00024 public:
00025   CameraParameters();
00026 
00027   enum whiteBalance
00028   {
00029     wb_indoor_mode, wb_outdoor_mode, wb_fl_mode
00030   };
00031   /**
00032   * Returns a description for an indexed whiteBalance.
00033   */
00034   static const char* getWhiteBalanceName(whiteBalance whiteBalance)
00035   {
00036     switch (whiteBalance) 
00037     {
00038     case wb_indoor_mode: return "wb_indoor_mode";
00039     case wb_fl_mode: return "wb_fl_mode";
00040     case wb_outdoor_mode: return "wb_outdoor_mode";
00041     default: return "check available WhiteBalance types";
00042     }
00043   }  
00044   static const char* getShortWhiteBalanceName(whiteBalance whiteBalance)
00045   {
00046     switch (whiteBalance) 
00047     {
00048     case wb_indoor_mode: return "indoor";
00049     case wb_fl_mode: return "fluorescent";
00050     case wb_outdoor_mode: return "outdoor";
00051     default: return "check available WhiteBalance types";
00052     }
00053   }  
00054   enum gain
00055   {
00056     gain_low, gain_mid, gain_high
00057   };
00058    /**
00059   * Returns a description for an indexed gain.
00060   */
00061   static const char* getGainName(gain gain)
00062   {
00063     switch (gain) 
00064     {
00065     case gain_low: return "gain_low";
00066     case gain_mid: return "gain_mid";
00067     case gain_high: return "gain_high";
00068     default: return "check available gain types";
00069     }
00070   }  
00071   static const char* getShortGainName(gain gain)
00072   {
00073     switch (gain) 
00074     {
00075     case gain_low: return "low";
00076     case gain_mid: return "mid";
00077     case gain_high: return "high";
00078     default: return "check available gain types";
00079     }
00080   }  
00081 
00082   enum shutterSpeed
00083   {
00084     shutter_slow, shutter_mid, shutter_fast
00085   };
00086    /**
00087   * Returns a description for an indexed shutterSpeed.
00088   */
00089   static const char* getShutterSpeedName(shutterSpeed shutterSpeed)
00090   {
00091     switch (shutterSpeed) 
00092     {
00093     case shutter_slow: return "shutter_slow";
00094     case shutter_mid: return "shutter_mid";
00095     case shutter_fast: return "shutter_fast";
00096     default: return "check available shutterSpeed types";
00097     }
00098   }  
00099   static const char* getShortShutterSpeedName(shutterSpeed shutterSpeed)
00100   {
00101     switch (shutterSpeed) 
00102     {
00103     case shutter_slow: return "slow";
00104     case shutter_mid: return "mid";
00105     case shutter_fast: return "fast";
00106     default: return "check available shutterSpeed types";
00107     }
00108   }  
00109 
00110 public:
00111   void setWhiteBalance(whiteBalance theWhiteBalance);
00112   void setShutterSpeed(shutterSpeed theShutterSpeed);
00113   void setGain(gain theGain);
00114 
00115   whiteBalance getWhiteBalance();
00116   shutterSpeed getShutterSpeed();
00117   gain getGain();
00118 
00119 private:
00120 //  whiteBalance theWhiteBalance;
00121 //  gain theGain;
00122 //  shutterSpeed theShutterSpeed;
00123 
00124   char whiteBalanceString[20];
00125   char shutterSpeedString[20];
00126   char gainString[20];
00127 };
00128 
00129 /**
00130  * Streaming operator that reads CameraParameters from a stream.
00131  * @param stream The stream from which is read.
00132  * @param cameraParameters The CameraParameters object.
00133  * @return The stream.
00134  */ 
00135 //In& operator>>(In& stream,CameraParameters& cameraParameters);
00136  
00137 /**
00138  * Streaming operator that writes CameraParameters to a stream.
00139  * @param stream The stream to write on.
00140  * @param cameraParameters The CameraParameters object.
00141  * @return The stream.
00142  */ 
00143 //Out& operator<<(Out& stream, const CameraParameters& cameraParameters);
00144 
00145 
00146 
00147 
00148 #endif   //  _CameraParameters_h_

Generated on Mon Mar 20 22:00:02 2006 for GT2005 by doxygen 1.3.6