|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ImageProcessor
Constructor Summary | |
ImageProcessor()
|
Method Summary | |
java.awt.Image |
getFrame(javax.media.Player player)
Returns the current frame in the live video stream specified by Player. |
int[] |
getPixel(java.awt.Image img,
int x,
int y,
int w,
int h)
Allows acess to the pixels inside a Java.awt.Image. |
javax.media.Player |
initPlayer(javax.media.format.VideoFormat vFormat)
Finds a video capture device that supports the specified VideoFormat. |
static void |
saveJPG(java.awt.Image img,
java.lang.String s)
Saves the image to disk in JPEG format. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ImageProcessor()
Method Detail |
public java.awt.Image getFrame(javax.media.Player player)
player
- Player object currently playing the live video stream.
public int[] getPixel(java.awt.Image img, int x, int y, int w, int h) throws java.lang.InterruptedException
img
- the image to be processed.
x the x coordinate of the upper left hand corner.
y the y coordinate of the upper left hand corner.
w the width of the rectangle
h the height of the rectangle.
java.lang.InterruptedException
- thrown if the method is interrupted.public javax.media.Player initPlayer(javax.media.format.VideoFormat vFormat)
vFormat
- the desired format of the live video stream
public static void saveJPG(java.awt.Image img, java.lang.String s)
img
- the image to save to disk
s the name of the file to save to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |