2caa04a9d06fb45fadec794ef994ef02ed6d4c8f
[IRC.git] / Robust / src / Benchmarks / SSJava / EyeTrackingInfer / ICaptureDevice.java
1 /*\r
2  * Copyright 2009 (c) Florian Frankenberger (darkblue.de)\r
3  * \r
4  * This file is part of LEA.\r
5  * \r
6  * LEA is free software: you can redistribute it and/or modify it under the\r
7  * terms of the GNU Lesser General Public License as published by the Free\r
8  * Software Foundation, either version 3 of the License, or (at your option) any\r
9  * later version.\r
10  * \r
11  * LEA is distributed in the hope that it will be useful, but WITHOUT ANY\r
12  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR\r
13  * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more\r
14  * details.\r
15  * \r
16  * You should have received a copy of the GNU Lesser General Public License\r
17  * along with LEA. If not, see <http://www.gnu.org/licenses/>.\r
18  */\r
19 \r
20 import java.awt.image.BufferedImage;\r
21 \r
22 /**\r
23  * Describes a capture device. For now it is only tested with images in <code>640x480</code> at\r
24  * <code>RGB</code> or <code>YUV</code> color space.\r
25  * \r
26  * @author Florian Frankenberger\r
27  */\r
28 public interface ICaptureDevice {\r
29 \r
30   /**\r
31    * Returns the frame rate of the image source per second\r
32    * \r
33    * @return the frame rate (e.g. 15 = 15 frames per second)\r
34    */\r
35   public int getFrameRate();\r
36 \r
37   /**\r
38    * Will be called a maximum of getFrameRate()-times in a second and returns the actual image of\r
39    * the capture device\r
40    * \r
41    * @return the actual image of the capture device\r
42    */\r
43   public BufferedImage getImage();\r
44 \r
45   /**\r
46    * LEA calls this when it cleans up. You should put your own cleanup code in here.\r
47    */\r
48   public void close();\r
49 \r
50 }\r