uk.ac.ed.inf.sdp2012.group7.vision
Class VisionFeed
java.lang.Object
java.awt.event.WindowAdapter
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
|
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 |
paused
public boolean paused
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.
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.