|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
josx.vision.Vision
Java version of Vision Command.
Nested Class Summary |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary |
Fields inherited from class java.awt.Frame |
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
Vision(String title)
Create the viewer frame with a title. |
Method Summary | |
static void |
addColorListener(int region,
ColorListener cl,
int color)
Add a Color Listener for the region |
static void |
addLightListener(int region,
LightListener ll)
Add a Light Listener for the region |
static void |
addMotionListener(int region,
MotionListener ml)
Add a Motion Listener for the region |
void |
addNotify()
|
static void |
addRectRegion(int region,
int x,
int y,
int width,
int height)
Add a rectangular region |
void |
controllerUpdate(ControllerEvent evt)
Controller Listener. |
static void |
flipHorizontal(boolean flip)
Flip the image in the image viewer horizontally |
static int |
getAvgBlue(int region)
Get the average blue value for the region |
static int |
getAvgGreen(int region)
Get the average green value for the region |
static int |
getAvgRed(int region)
Get the average red value for the region |
static int |
getAvgRGB(int region)
Get the average RGB value for the region |
static java.awt.Frame |
getFrame()
Get the viewer frame. |
static Region[] |
getRegions()
Get the array of regions |
static boolean |
isRecording()
Test is recording is in progress |
boolean |
open(DataSource tds)
Given a datasource, create a processor and use that processor as a player to playback the media. |
static void |
playSound(String fileName)
Play an audio file |
static void |
setFrameRate(float rate)
Set the frame rate |
static void |
setImageSize(int width,
int height)
Set the size of the video viewer image |
static void |
snapshot(String filename)
Take a snapshot |
static void |
startRecorder(String fileName,
int millis)
Start the video recorder |
static void |
startViewer(String title)
Start the video viewer frame |
static void |
stopRecording()
|
static void |
stopViewer()
Close Video viewer |
static void |
writeImage(String fn,
byte[] data,
int width,
int height)
Write to fn file the data using the
width, height variables. |
Methods inherited from class java.awt.Frame |
finalize, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Constructor Detail |
public Vision(String title)
title
- the title for the viewerMethod Detail |
public static java.awt.Frame getFrame()
public boolean open(DataSource tds)
public static void stopViewer()
public void addNotify()
public void controllerUpdate(ControllerEvent evt)
public static void startViewer(String title)
public static void playSound(String fileName)
fileName
- the audio file to playpublic static void addRectRegion(int region, int x, int y, int width, int height)
region
- the region numberx
- the x co-ordinate of the region bottom left cornery
- the y co-ordinate of the region bottom left cornerwidth
- the width of the regionheight
- the height of the regionpublic static Region[] getRegions()
public static void setFrameRate(float rate)
rate
- the required frame ratepublic static void setImageSize(int width, int height)
width
- the required image widthheight
- the required image heightpublic static void addMotionListener(int region, MotionListener ml)
region
- the regionml
- the Motion Listenerpublic static void addColorListener(int region, ColorListener cl, int color)
region
- the regioncl
- the Color Listenercolor
- the color to listen forpublic static void addLightListener(int region, LightListener ll)
region
- the regionll
- the Light Listenerpublic static void snapshot(String filename)
filename
- the JPG file to write the snapshop topublic static void writeImage(String fn, byte[] data, int width, int height) throws java.io.FileNotFoundException, IOException
fn
file the data
using the
width, height
variables. Data is assumed to be 8bit RGB.
A JPEG format file is written.
fn
- the filenamedata
- the data to writewidth
- the width of the imageheight
- the height of the image
java.io.FileNotFoundException
- if the directory/image specified is wrong
IOException
- if there are problems reading the file.public static void startRecorder(String fileName, int millis)
fileName
- the file to write the video tomillis
- the number of milliseconds to record for.
0 means record until stopRecoder() is called.public static boolean isRecording()
public static void stopRecording()
public static int getAvgRed(int region)
region
- the region
public static int getAvgGreen(int region)
region
- the region
public static int getAvgBlue(int region)
region
- the region
public static int getAvgRGB(int region)
region
- the region
public static void flipHorizontal(boolean flip)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |