at.ac.sbg.cosy.soccerbot.acquisition
Class ImageAcquisition

java.lang.Object
  extended by at.ac.sbg.cosy.soccerbot.acquisition.ImageAcquisition
All Implemented Interfaces:
IImageAcquisition

public class ImageAcquisition
extends java.lang.Object
implements IImageAcquisition

Author:
Georg Klima Implements the imageacquisition. Acquires images from an predefined source with an predefined resolution and colordepth.

Field Summary
static int BIT_PER_PIXEL
          The predefined colordepth of 24 bits.
static java.lang.String DEVICE
          The device name URL: vfw://[Devicename]devicenumber Example: vfw://0 specifies the fist capture device, a usb webcam, must be register at the jmf.
static java.awt.Dimension RESOLUTION
          The predefined resolution of 352x288.
 
Method Summary
 java.awt.image.BufferedImage capture()
          Captures a Image from the capture device DEVICE and returns it as a java.awt.Image
 void close()
          Terminates this service, after calling this methode the service is no longer available.
static IImageAcquisition getInstance()
           
 java.awt.Dimension getResolution()
          Once the capture device has settled this function returns the resolution of the captured image.
 boolean init()
          Tries to init this service
static void newInstance()
          Creates a new singelton instance of this service
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVICE

public static final java.lang.String DEVICE
The device name URL: vfw://[Devicename]devicenumber Example: vfw://0 specifies the fist capture device, a usb webcam, must be register at the jmf.

See Also:
Constant Field Values

BIT_PER_PIXEL

public static final int BIT_PER_PIXEL
The predefined colordepth of 24 bits.

See Also:
Constant Field Values

RESOLUTION

public static final java.awt.Dimension RESOLUTION
The predefined resolution of 352x288.

Method Detail

init

public boolean init()
Description copied from interface: IImageAcquisition
Tries to init this service

Specified by:
init in interface IImageAcquisition
Returns:
returns true if successful
returns false if unsuccessful
See Also:
init()

newInstance

public static void newInstance()
Creates a new singelton instance of this service


getInstance

public static IImageAcquisition getInstance()

capture

public java.awt.image.BufferedImage capture()
Description copied from interface: IImageAcquisition
Captures a Image from the capture device DEVICE and returns it as a java.awt.Image

Specified by:
capture in interface IImageAcquisition
Returns:
Returns a java.awt.Image containing the captured Image.
See Also:
capture()

close

public void close()
Description copied from interface: IImageAcquisition
Terminates this service, after calling this methode the service is no longer available.

Specified by:
close in interface IImageAcquisition
See Also:
close()

getResolution

public java.awt.Dimension getResolution()
Description copied from interface: IImageAcquisition
Once the capture device has settled this function returns the resolution of the captured image.

Specified by:
getResolution in interface IImageAcquisition
Returns:
returns the resolution of the captured image.
See Also:
getResolution()