bumblebee2.h

00001 
00002 /***************************************************************************
00003  *  bumblebee2.h - Point Grey Bumblebee 2 camera
00004  *
00005  *  Generated: Sat Apr 14 20:49:20 2007 (watching Ghostbusters)
00006  *  Copyright  2005-2007  Tim Niemueller [www.niemueller.de]
00007  *
00008  ****************************************************************************/
00009 
00010 /*  This program is free software; you can redistribute it and/or modify
00011  *  it under the terms of the GNU General Public License as published by
00012  *  the Free Software Foundation; either version 2 of the License, or
00013  *  (at your option) any later version. A runtime exception applies to
00014  *  this software (see LICENSE.GPL_WRE file mentioned below for details).
00015  *
00016  *  This program is distributed in the hope that it will be useful,
00017  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00019  *  GNU Library General Public License for more details.
00020  *
00021  *  Read the full text in the LICENSE.GPL_WRE file in the doc directory.
00022  */
00023 
00024 #ifndef __FIREVISION_CAMS_BUMBLEBEE2_H_
00025 #define __FIREVISION_CAMS_BUMBLEBEE2_H_
00026 
00027 #include <cams/firewire.h>
00028 #include <fvutils/color/bayer.h>
00029 
00030 namespace firevision {
00031 #if 0 /* just to make Emacs auto-indent happy */
00032 }
00033 #endif
00034 
00035 class Bumblebee2CameraData;
00036 
00037 class Bumblebee2Camera : public FirewireCamera
00038 {
00039  public:
00040 
00041   static const unsigned int ORIGINAL;
00042   static const unsigned int DEINTERLACED;
00043   static const unsigned int RGB_IMAGE;
00044 
00045   Bumblebee2Camera(const CameraArgumentParser *cap);
00046   virtual ~Bumblebee2Camera();
00047 
00048   virtual void open();
00049   virtual void close();
00050   virtual void capture();
00051 
00052   virtual unsigned char* buffer();
00053 
00054   virtual void set_image_number(unsigned int image_num);
00055 
00056   bool is_bumblebee2();
00057   void write_triclops_config_from_camera_to_file(const char *filename);
00058 
00059   void deinterlace_stereo();
00060   void decode_bayer();
00061 
00062   virtual void     print_info();
00063   virtual uint32_t serial_no() const;
00064   virtual bool     verify_guid(uint64_t ver_guid) const;
00065 
00066   static void deinterlace_stereo(unsigned char *raw16, unsigned char *deinterlaced,
00067                                  unsigned int width, unsigned int height);
00068   static void decode_bayer(unsigned char *deinterlaced, unsigned char *rgb,
00069                            unsigned int width, unsigned int height,
00070                            bayer_pattern_t bayer_pattern);
00071 
00072  private:
00073   void get_triclops_context_from_camera();
00074   void get_bayer_tile();
00075   void deinterlace_green( unsigned char* src,  unsigned char* dest, 
00076                           unsigned int width,  unsigned int height);
00077 
00078 
00079   /** Bayer pattern */
00080   dc1394color_filter_t __bayer_pattern;
00081 
00082   unsigned int   __image_num;
00083   unsigned char *__buffer;
00084   unsigned char *__buffer_deinterlaced;
00085   unsigned char *__buffer_rgb;
00086 };
00087 
00088 } // end namespace firevision
00089 
00090 #endif

Generated on 1 Mar 2011 for Fawkes API by  doxygen 1.6.1