uk.ac.ed.inf.sdp2012.group7.vision
Class VisionFeed

java.lang.Object
  extended by java.awt.event.WindowAdapter
      extended by uk.ac.ed.inf.sdp2012.group7.vision.VisionFeed
All Implemented Interfaces:
java.awt.event.WindowFocusListener, java.awt.event.WindowListener, java.awt.event.WindowStateListener, java.util.EventListener

public class VisionFeed
extends java.awt.event.WindowAdapter

The main class for showing the video feed and processing the video data. Identifies ball and robot locations, and robot orientations.

Author:
s0840449

Field Summary
 boolean paused
           
 
Constructor Summary
VisionFeed(java.lang.String videoDevice, int width, int height, int channel, int videoStandard, int compressionQuality)
          Default constructor.
 
Method Summary
 java.awt.image.BufferedImage getFrameImage()
           
 void windowClosing(java.awt.event.WindowEvent e)
          Catches the window closing event, so that we can free up resources before exiting.
 
Methods inherited from class java.awt.event.WindowAdapter
windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowGainedFocus, windowIconified, windowLostFocus, windowOpened, windowStateChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

paused

public boolean paused
Constructor Detail

VisionFeed

public VisionFeed(java.lang.String videoDevice,
                  int width,
                  int height,
                  int channel,
                  int videoStandard,
                  int compressionQuality)
           throws V4L4JException
Default constructor.

Parameters:
videoDevice - The video device file to capture from.
width - The desired capture width.
height - The desired capture height.
videoStandard - The capture standard.
channel - The capture channel.
compressionQuality - The JPEG compression quality.
worldState -
thresholdsState -
pitchConstants -
Throws:
V4L4JException - If any parameter if invalid.
Method Detail

getFrameImage

public java.awt.image.BufferedImage getFrameImage()

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Catches the window closing event, so that we can free up resources before exiting.

Specified by:
windowClosing in interface java.awt.event.WindowListener
Overrides:
windowClosing in class java.awt.event.WindowAdapter
Parameters:
e - The window closing event.