Homepage Demos Overview Downloads Tutorials Reference
Credits

VisionSerializer.h

Go to the documentation of this file.
00001 #ifndef INCLUDED_VisionSerializer_h
00002 #define INCLUDED_VisionSerializer_h
00003 
00004 #include "Vision.h"
00005 #include "VisionInterface.h"
00006 #include "Shared/Serializer.h"
00007 
00008 //! Encodes and transmits camera images
00009 class VisionSerializer : public Serializer {
00010 public:
00011   VisionSerializer(); //!< constructor
00012   void serialize();   //!< encodes and sends current frame
00013   
00014 private:
00015   //! encodes the original camera image
00016   void encodeVisionRaw(char *buf,CMVision::image_yuv<const uchar> &img,
00017                        int scale);
00018   //! special encoding of the original camera image
00019   void encodeVisionRaw_YhalfUVquarter(char *buf,
00020       CMVision::image_yuv<const uchar> &img);
00021   //! encodes the RLE processed image
00022   void encodeVisionRLE(char *buf,int num_runs,run *runs);
00023   //! helper function for encodeVisionRLE, encodes one run length
00024   inline char* encodeVisionRun(char *buf, run *run);
00025 
00026   VisionSerializer(const VisionSerializer&);              //!< don't call
00027   VisionSerializer& operator= (const VisionSerializer&);  //!< don't call
00028 
00029   Socket *visRaw;  //!< socket to which raw vision images should be sent
00030   Socket *visRLE;  //!< socket to which RLE images shoudl be sent
00031 };
00032 
00033 /*! @file
00034  * @brief Describes VisionSerializer, which encodes and transmits camera images
00035  * @author CMU RoboSoccer 2001-2002 (Creator)
00036  * @author alokl (Ported)
00037  * 
00038  * @verbinclude CMPack_license.txt
00039  *
00040  * $Author: alokl $
00041  * $Name: tekkotsu-1_5 $
00042  * $Revision: 1.3 $
00043  * $State: Rel $
00044  * $Date: 2003/07/28 06:53:10 $
00045  */
00046 
00047 #endif

Tekkotsu v1.5
Generated Fri Oct 10 15:52:00 2003 by Doxygen 1.3.4