Fawkes API Fawkes Development Version
leutron.h
1
2/***************************************************************************
3 * leutron.h - This header defines a Leutron cam
4 *
5 * Generated: Thu Mar 24 22:33:33 2005
6 * Copyright 2005 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_LEUTRON_H_
25#define _FIREVISION_CAMS_LEUTRON_H_
26
27#include <fvcams/camera.h>
28
29class LvCameraNode;
30class LvGrabberNode;
31
32namespace firevision {
33
34class LeutronCamera : public Camera
35{
36public:
38 virtual ~LeutronCamera();
39
40 virtual void open();
41 virtual void start();
42 virtual void stop();
43 virtual void close();
44 virtual void flush();
45 virtual void capture();
46
47 virtual void print_info();
48
49 virtual bool ready();
50
51 virtual unsigned char *buffer();
52 virtual unsigned int buffer_size();
53 virtual void dispose_buffer();
54
55 virtual unsigned int pixel_width();
56 virtual unsigned int pixel_height();
57 virtual colorspace_t colorspace();
58
59 virtual void set_image_number(unsigned int n);
60
61private:
62 bool opened;
63 bool started;
64 bool autodetect;
65
66 const char *camera_name;
67
68 // should be HGRABBER, set to unsigned short to get rid of all the warnings
69 // by the broken-like-shit dsylib.
70 unsigned short int camera_handle;
71 LvCameraNode * camera;
72 LvGrabberNode * grabber;
73
74 unsigned int width;
75 unsigned int height;
76 unsigned int scaled_width;
77 unsigned int scaled_height;
78
79 colorspace_t cspace;
80
81 unsigned char *scaled_buffer;
82};
83
84} // end namespace firevision
85
86#endif
Camera interface for image aquiring devices in FireVision.
Definition: camera.h:33
Cameras accessed through Leutron framegrabber.
Definition: leutron.h:35
virtual void close()
Close camera.
Definition: leutron.cpp:248
virtual void print_info()
Print out camera information.
Definition: leutron.cpp:206
virtual void set_image_number(unsigned int n)
Set image number to retrieve.
Definition: leutron.cpp:298
virtual ~LeutronCamera()
Destructor.
Definition: leutron.cpp:53
virtual colorspace_t colorspace()
Colorspace of returned image.
Definition: leutron.cpp:286
virtual unsigned char * buffer()
Get access to current image buffer.
Definition: leutron.cpp:221
virtual bool ready()
Camera is ready for taking pictures.
Definition: leutron.cpp:292
virtual unsigned int buffer_size()
Size of buffer.
Definition: leutron.cpp:242
virtual void start()
Start image transfer from the camera.
Definition: leutron.cpp:188
virtual unsigned int pixel_width()
Width of image in pixels.
Definition: leutron.cpp:266
LeutronCamera()
Constructor.
Definition: leutron.cpp:42
virtual void dispose_buffer()
Dispose current buffer.
Definition: leutron.cpp:261
virtual void flush()
Flush image queue.
Definition: leutron.cpp:216
virtual void stop()
Stop image transfer from the camera.
Definition: leutron.cpp:200
virtual void capture()
Capture an image.
Definition: leutron.cpp:211
virtual void open()
Open the camera.
Definition: leutron.cpp:58
virtual unsigned int pixel_height()
Height of image in pixels.
Definition: leutron.cpp:276