Fawkes API  Fawkes Development Version
bumblebee2.h
1 
2 /***************************************************************************
3  * bumblebee2.h - Point Grey Bumblebee 2 camera
4  *
5  * Generated: Sat Apr 14 20:49:20 2007 (watching Ghostbusters)
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_CAMS_BUMBLEBEE2_H_
25 #define _FIREVISION_CAMS_BUMBLEBEE2_H_
26 
27 #include <fvcams/firewire.h>
28 #include <fvutils/color/bayer.h>
29 
30 namespace firevision {
31 
32 class Bumblebee2CameraData;
33 
34 class Bumblebee2Camera : public FirewireCamera
35 {
36 public:
37  static const unsigned int ORIGINAL;
38  static const unsigned int DEINTERLACED;
39  static const unsigned int RGB_IMAGE;
40 
43  virtual ~Bumblebee2Camera();
44 
45  virtual void open_device();
46  virtual void open();
47  virtual void close();
48  virtual void capture();
49 
50  virtual unsigned char *buffer();
51 
52  virtual void set_image_number(unsigned int image_num);
53 
54  bool is_bumblebee2();
55  void write_triclops_config_from_camera_to_file(const char *filename);
56 
57  void deinterlace_stereo();
58  void decode_bayer();
59 
60  virtual void print_info();
61  virtual uint32_t serial_no() const;
62  virtual bool verify_guid(uint64_t ver_guid) const;
63 
64  static void deinterlace_stereo(unsigned char *raw16,
65  unsigned char *deinterlaced,
66  unsigned int width,
67  unsigned int height);
68  static void decode_bayer(unsigned char * deinterlaced,
69  unsigned char * rgb,
70  unsigned int width,
71  unsigned int height,
72  bayer_pattern_t bayer_pattern);
73 
74 private:
75  void get_sensor_info();
76  void get_triclops_context_from_camera();
77  void get_bayer_tile();
78  void deinterlace_green(unsigned char *src,
79  unsigned char *dest,
80  unsigned int width,
81  unsigned int height);
82 
83  /** Bayer pattern */
84  dc1394color_filter_t bayer_pattern_;
85 
86  bool _auto_acquire_sensor_info;
87 
88  unsigned int image_num_;
89  unsigned char *buffer_;
90  unsigned char *buffer_deinterlaced_;
91  unsigned char *buffer_rgb_;
92 
93  bool _supports_color;
94 };
95 
96 } // end namespace firevision
97 
98 #endif
firevision::Bumblebee2Camera::verify_guid
virtual bool verify_guid(uint64_t ver_guid) const
Verify GUID validity.
Definition: bumblebee2.cpp:231
firevision::Bumblebee2Camera::close
virtual void close()
Definition: bumblebee2.cpp:393
firevision::Bumblebee2Camera::DEINTERLACED
static const unsigned int DEINTERLACED
Deinterlaced image.
Definition: bumblebee2.h:44
firevision::Bumblebee2Camera::serial_no
virtual uint32_t serial_no() const
Get BB2 serial no.
Definition: bumblebee2.cpp:206
firevision::Bumblebee2Camera::open_device
virtual void open_device()
Open the desired device.
Definition: bumblebee2.cpp:313
firevision::Bumblebee2Camera::ORIGINAL
static const unsigned int ORIGINAL
Original image in RAW16.
Definition: bumblebee2.h:43
firevision::Bumblebee2Camera::RGB_IMAGE
static const unsigned int RGB_IMAGE
From bayer tile decoded RGB image.
Definition: bumblebee2.h:45
firevision::Bumblebee2Camera::print_info
virtual void print_info()
Definition: bumblebee2.cpp:300
firevision::Bumblebee2Camera::set_image_number
virtual void set_image_number(unsigned int image_num)
Definition: bumblebee2.cpp:431
firevision::Bumblebee2Camera::write_triclops_config_from_camera_to_file
void write_triclops_config_from_camera_to_file(const char *filename)
Retrieve config from camera.
Definition: bumblebee2.cpp:572
firevision::Bumblebee2Camera::Bumblebee2Camera
Bumblebee2Camera()
Constructor.
Definition: bumblebee2.cpp:177
firevision::Bumblebee2Camera::deinterlace_stereo
void deinterlace_stereo()
De-interlace the 16 bit data into 2 bayer tile pattern images.
Definition: bumblebee2.cpp:455
firevision::Bumblebee2Camera::~Bumblebee2Camera
virtual ~Bumblebee2Camera()
Destructor.
Definition: bumblebee2.cpp:194
firevision::CameraArgumentParser
Definition: camargp.h:41
firevision::Bumblebee2Camera::decode_bayer
void decode_bayer()
Extract RGB color image from the bayer tile image.
Definition: bumblebee2.cpp:466
firevision::Bumblebee2Camera::open
virtual void open()
Definition: bumblebee2.cpp:345
firevision::Bumblebee2Camera::capture
virtual void capture()
Definition: bumblebee2.cpp:409
firevision::Bumblebee2Camera::buffer
virtual unsigned char * buffer()
Definition: bumblebee2.cpp:425
firevision::Bumblebee2Camera::is_bumblebee2
bool is_bumblebee2()
Check if connected camera is a Bumblebee2.
Definition: bumblebee2.cpp:445