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
30namespace firevision {
31
32class Bumblebee2CameraData;
33
35{
36public:
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
74private:
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
Bumblebee2 camera.
Definition: bumblebee2.h:35
virtual void capture()
Capture an image.
Definition: bumblebee2.cpp:409
void deinterlace_stereo()
De-interlace the 16 bit data into 2 bayer tile pattern images.
Definition: bumblebee2.cpp:455
void decode_bayer()
Extract RGB color image from the bayer tile image.
Definition: bumblebee2.cpp:466
bool is_bumblebee2()
Check if connected camera is a Bumblebee2.
Definition: bumblebee2.cpp:445
virtual void open_device()
Open the desired device.
Definition: bumblebee2.cpp:313
virtual void close()
Close camera.
Definition: bumblebee2.cpp:393
virtual void open()
Open the camera.
Definition: bumblebee2.cpp:345
virtual uint32_t serial_no() const
Get BB2 serial no.
Definition: bumblebee2.cpp:206
static const unsigned int RGB_IMAGE
From bayer tile decoded RGB image.
Definition: bumblebee2.h:39
virtual bool verify_guid(uint64_t ver_guid) const
Verify GUID validity.
Definition: bumblebee2.cpp:231
static const unsigned int DEINTERLACED
Deinterlaced image.
Definition: bumblebee2.h:38
virtual void set_image_number(unsigned int image_num)
Set image number to retrieve.
Definition: bumblebee2.cpp:431
virtual void print_info()
Print out camera information.
Definition: bumblebee2.cpp:300
virtual ~Bumblebee2Camera()
Destructor.
Definition: bumblebee2.cpp:194
virtual unsigned char * buffer()
Get access to current image buffer.
Definition: bumblebee2.cpp:425
static const unsigned int ORIGINAL
Original image in RAW16.
Definition: bumblebee2.h:37
void write_triclops_config_from_camera_to_file(const char *filename)
Retrieve config from camera.
Definition: bumblebee2.cpp:572
Camera argument parser.
Definition: camargp.h:36
Firewire camera.
Definition: firewire.h:41