CameraControl.H

Go to the documentation of this file.
00001 /*!@file Devices/CameraControl.H Controls a pan/tilt camera head */
00002 
00003 // $HeadURL: svn://isvn.usc.edu/software/invt/trunk/saliency/src/Devices/CameraControl.H $
00004 // $Id: CameraControl.H 4751 2005-07-01 16:50:30Z rjpeters $
00005 
00006 #ifndef CAMERACONTROL_H_DEFINED
00007 #define CAMERACONTROL_H_DEFINED
00008 
00009 #include "Component/ModelComponent.H"
00010 #include "Devices/cameraConf.H"
00011 #include "Devices/ssc.H"
00012 
00013 //! This class is an interface to pan, tilt, and otherwise move the camera
00014 class CameraControl : public ModelComponent
00015 {
00016 public:
00017   //! Initialize a camera control object
00018   CameraControl(OptionManager& mgr,
00019                 const std::string& descrName = "Camera Controller",
00020                 const std::string& tagName = "CameraControl",
00021                 int setPort = 0, bool setCam = true,
00022                 int pPort = 0, int tPort = 1, int Port = 1);
00023   //! Destructor
00024   ~CameraControl();
00025   //! move the camera to a point X,Y in an image
00026   float moveCamXYFrame(int X, int Y, int camNumber = 0, bool simluate = false);
00027   //! center the camera
00028   float moveCamTPFrame(float theta, float phi, int camNumber = 0);
00029   //! center the camera
00030   void centerCamera(int camNumber = 0);
00031   //! pan the camera a certain amount relative to the current pos in deg.
00032   void panRelative(float doPan);
00033   //! tilt the camera a certain amount relative to the current pos in deg.
00034   void tiltRelative(float doTilt);
00035   //! pan the camora to an absolute position in deg.
00036   void panAbsolute(float doPan);
00037   //! tilt the camera to an absolute position in deg.
00038   void tiltAbsolute(float doTilt);
00039   //! set the size of the image for moveCamXYFrame if not 640x480
00040   void setImageSize(int X, int Y);
00041   //! tells if calibration is to be used to different cameras
00042   void useCalibration(bool useIt);
00043   //! get the current position pan of the camera in deg.
00044   float getCurrentPan();
00045   //! get the current postion tilt of the camera in deg.
00046   float getCurrentTilt();
00047   //! get the current position pan of the camera in deg.
00048   float getSimPan();
00049   //! get the current postion tilt of the camera in deg.
00050   float getSimTilt();
00051 private:
00052   nub::soft_ref<SSC> ssc;
00053   //! config param for camera
00054   cameraConf camera;
00055   float currentPan,currentTilt,simPan,simTilt;
00056   int serialPort, tiltPort, panPort;
00057   bool calibrate;
00058 
00059 };
00060 
00061 #endif
00062 
00063 // ######################################################################
00064 /* So things look consistent in everyone's emacs... */
00065 /* Local Variables: */
00066 /* indent-tabs-mode: nil */
00067 /* End: */
Generated on Sun May 8 08:40:37 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3