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 
29 class LvCameraNode;
30 class LvGrabberNode;
31 
32 namespace firevision {
33 #if 0 /* just to make Emacs auto-indent happy */
34 }
35 #endif
36 
37 class LeutronCamera : public Camera
38 {
39 
40  public:
41 
42  LeutronCamera();
43  virtual ~LeutronCamera();
44 
45  virtual void open();
46  virtual void start();
47  virtual void stop();
48  virtual void close();
49  virtual void flush();
50  virtual void capture();
51 
52  virtual void print_info();
53 
54  virtual bool ready();
55 
56  virtual unsigned char* buffer();
57  virtual unsigned int buffer_size();
58  virtual void dispose_buffer();
59 
60  virtual unsigned int pixel_width();
61  virtual unsigned int pixel_height();
62  virtual colorspace_t colorspace();
63 
64  virtual void set_image_number(unsigned int n);
65 
66  private:
67  bool opened;
68  bool started;
69  bool autodetect;
70 
71  const char *camera_name;
72 
73  // should be HGRABBER, set to unsigned short to get rid of all the warnings
74  // by the broken-like-shit dsylib.
75  unsigned short int camera_handle;
76  LvCameraNode *camera;
77  LvGrabberNode *grabber;
78 
79  unsigned int width;
80  unsigned int height;
81  unsigned int scaled_width;
82  unsigned int scaled_height;
83 
84  colorspace_t cspace;
85 
86  unsigned char *scaled_buffer;
87 
88 };
89 
90 } // end namespace firevision
91 
92 #endif
virtual void print_info()
Print out camera information.
Definition: leutron.cpp:216
virtual colorspace_t colorspace()
Colorspace of returned image.
Definition: leutron.cpp:298
virtual void open()
Open the camera.
Definition: leutron.cpp:64
LeutronCamera()
Constructor.
Definition: leutron.cpp:46
virtual unsigned int pixel_width()
Width of image in pixels.
Definition: leutron.cpp:277
Camera interface for image aquiring devices in FireVision.
Definition: camera.h:35
virtual unsigned int buffer_size()
Size of buffer.
Definition: leutron.cpp:253
virtual bool ready()
Camera is ready for taking pictures.
Definition: leutron.cpp:305
virtual void close()
Close camera.
Definition: leutron.cpp:259
virtual void stop()
Stop image transfer from the camera.
Definition: leutron.cpp:210
virtual ~LeutronCamera()
Destructor.
Definition: leutron.cpp:58
virtual void dispose_buffer()
Dispose current buffer.
Definition: leutron.cpp:272
virtual unsigned char * buffer()
Get access to current image buffer.
Definition: leutron.cpp:231
Cameras accessed through Leutron framegrabber.
Definition: leutron.h:37
virtual void flush()
Flush image queue.
Definition: leutron.cpp:226
virtual void set_image_number(unsigned int n)
Set image number to retrieve.
Definition: leutron.cpp:312
virtual void start()
Start image transfer from the camera.
Definition: leutron.cpp:198
virtual void capture()
Capture an image.
Definition: leutron.cpp:221
virtual unsigned int pixel_height()
Height of image in pixels.
Definition: leutron.cpp:287