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 #if 0 /* just to make Emacs auto-indent happy */
32 }
33 #endif
34 
35 class Bumblebee2CameraData;
36 
38 {
39  public:
40 
41  static const unsigned int ORIGINAL;
42  static const unsigned int DEINTERLACED;
43  static const unsigned int RGB_IMAGE;
44 
47  virtual ~Bumblebee2Camera();
48 
49  virtual void open_device();
50  virtual void open();
51  virtual void close();
52  virtual void capture();
53 
54  virtual unsigned char* buffer();
55 
56  virtual void set_image_number(unsigned int image_num);
57 
58  bool is_bumblebee2();
59  void write_triclops_config_from_camera_to_file(const char *filename);
60 
61  void deinterlace_stereo();
62  void decode_bayer();
63 
64  virtual void print_info();
65  virtual uint32_t serial_no() const;
66  virtual bool verify_guid(uint64_t ver_guid) const;
67 
68  static void deinterlace_stereo(unsigned char *raw16, unsigned char *deinterlaced,
69  unsigned int width, unsigned int height);
70  static void decode_bayer(unsigned char *deinterlaced, unsigned char *rgb,
71  unsigned int width, 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, unsigned char* dest,
79  unsigned int width, unsigned int height);
80 
81 
82  /** Bayer pattern */
83  dc1394color_filter_t __bayer_pattern;
84 
85  bool _auto_acquire_sensor_info;
86 
87  unsigned int __image_num;
88  unsigned char *__buffer;
89  unsigned char *__buffer_deinterlaced;
90  unsigned char *__buffer_rgb;
91 
92  bool _supports_color;
93 };
94 
95 } // end namespace firevision
96 
97 #endif
virtual ~Bumblebee2Camera()
Destructor.
Definition: bumblebee2.cpp:201
virtual void open()
Open the camera.
Definition: bumblebee2.cpp:353
virtual void set_image_number(unsigned int image_num)
Set image number to retrieve.
Definition: bumblebee2.cpp:439
static const unsigned int RGB_IMAGE
From bayer tile decoded RGB image.
Definition: bumblebee2.h:43
static const unsigned int DEINTERLACED
Deinterlaced image.
Definition: bumblebee2.h:42
void write_triclops_config_from_camera_to_file(const char *filename)
Retrieve config from camera.
Definition: bumblebee2.cpp:592
void decode_bayer()
Extract RGB color image from the bayer tile image.
Definition: bumblebee2.cpp:477
virtual uint32_t serial_no() const
Get BB2 serial no.
Definition: bumblebee2.cpp:212
Camera argument parser.
Definition: camargp.h:38
static const unsigned int ORIGINAL
Original image in RAW16.
Definition: bumblebee2.h:41
bool is_bumblebee2()
Check if connected camera is a Bumblebee2.
Definition: bumblebee2.cpp:454
virtual void capture()
Capture an image.
Definition: bumblebee2.cpp:416
Bumblebee2 camera.
Definition: bumblebee2.h:37
virtual void print_info()
Print out camera information.
Definition: bumblebee2.cpp:307
virtual void close()
Close camera.
Definition: bumblebee2.cpp:400
void deinterlace_stereo()
De-interlace the 16 bit data into 2 bayer tile pattern images.
Definition: bumblebee2.cpp:464
Bumblebee2Camera()
Constructor.
Definition: bumblebee2.cpp:184
virtual bool verify_guid(uint64_t ver_guid) const
Verify GUID validity.
Definition: bumblebee2.cpp:236
Firewire camera.
Definition: firewire.h:44
virtual void open_device()
Open the desired device.
Definition: bumblebee2.cpp:321
virtual unsigned char * buffer()
Get access to current image buffer.
Definition: bumblebee2.cpp:432