ViSP  2.10.0
vpFrameGrabber.h
1 /****************************************************************************
2  *
3  * $Id: vpFrameGrabber.h 4632 2014-02-03 17:06:40Z fspindle $
4  *
5  * This file is part of the ViSP software.
6  * Copyright (C) 2005 - 2014 by INRIA. All rights reserved.
7  *
8  * This software is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * ("GPL") version 2 as published by the Free Software Foundation.
11  * See the file LICENSE.txt at the root directory of this source
12  * distribution for additional information about the GNU GPL.
13  *
14  * For using ViSP with software that can not be combined with the GNU
15  * GPL, please contact INRIA about acquiring a ViSP Professional
16  * Edition License.
17  *
18  * See http://www.irisa.fr/lagadic/visp/visp.html for more information.
19  *
20  * This software was developed at:
21  * INRIA Rennes - Bretagne Atlantique
22  * Campus Universitaire de Beaulieu
23  * 35042 Rennes Cedex
24  * France
25  * http://www.irisa.fr/lagadic
26  *
27  * If you have questions regarding the use of this file, please contact
28  * INRIA at visp@inria.fr
29  *
30  * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
31  * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
32  *
33  *
34  * Description:
35  * Frame grabbing.
36  *
37  * Authors:
38  * Eric Marchand
39  *
40  *****************************************************************************/
41 
42 
43 
44 #ifndef vpFrameGrabber_hh
45 #define vpFrameGrabber_hh
46 
47 #include <visp/vpImage.h>
48 #include <visp/vpRGBa.h>
49 
108 class VISP_EXPORT vpFrameGrabber
109 {
110 public :
111  bool init ;
112 protected:
113  unsigned int height ;
114  unsigned int width ;
115 
116 
117 public:
119  inline unsigned int getHeight() const { return height ; }
121  inline unsigned int getWidth() const { return width ; }
122 
123 public:
124  vpFrameGrabber() : init(false), height(0), width(0) {};
125  virtual ~vpFrameGrabber() { ; }
126 
127  virtual void open(vpImage<unsigned char> &I) =0 ;
128  virtual void open(vpImage<vpRGBa> &I) =0 ;
129 
130  virtual void acquire(vpImage<unsigned char> &I) =0 ;
131  virtual void acquire(vpImage<vpRGBa> &I) =0 ;
132 
133 
138  virtual void close() =0 ;
139 
140 } ;
141 
142 #endif
virtual ~vpFrameGrabber()
unsigned int getWidth() const
Return the number of columns in the image.
unsigned int height
Number of rows in the image.
Base class for all video devices. It is designed to provide a front end to video sources.
bool init
Set to true if the frame grabber has been initialized.
unsigned int width
Number of columns in the image.
unsigned int getHeight() const
Return the number of rows in the image.