|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
FindIt.VideoStreamController
public class VideoStreamController
The VideoStreamController Panel class that is called from the ColoredShapesTracker.start() function. this class creates the connection with
the specified video capture device, and repeatedly grabs the curent frame from the capptured video, converting it to BufferedImage. Then if at least
one color for process is selected, calls the ImageProcessor class, sending to it the BufferedImage to make the particular calculattions.
After this, shows the results at the screen. Particularly, when the myTimer() function has been called, calls the function step() that in the begging
calls the function getFrame(), that grabs the current frame, converts it to buffered image and returns it at the step(), Then the step(), if
at least one color is selected, calls the ImageProcessor with paramert the buffered image. When the calculations in ImageProcessor has finished
returns back a new buffered image with the results "printed" on it. And from the begging again.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
javax.swing.JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
javax.swing.JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
java.awt.Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static SinkData |
blackSinkData
The SinkData class decleration, as blackSinkData for the Black's color data sink. |
static SinkData |
blueSinkData
The SinkData class decleration, as blueSinkData for the Blue's color data sink. |
static SinkData |
brownSinkData
The SinkData class decleration, as brownSinkData for the Brown's color data sink. |
static java.awt.image.BufferedImage |
bufferedImage
A BufferedImage variable decleration, the bufferedImage, that is used to take each grabed frame, that has been converted to Buffered Image
and to send this Buffered Image to the ImageProcessor class for the particular calculations. |
static javax.media.CaptureDeviceInfo |
captureVideoDevice
|
static javax.media.format.VideoFormat |
captureVideoFormat
|
static SinkData |
cyanSinkData
The SinkData class decleration, as cyanSinkData for the Cyan's color data sink. |
static boolean |
debugDeviceList
|
static javax.media.CaptureDeviceInfo |
deviceInfo
|
static javax.media.protocol.DataSource |
ds1
|
static java.awt.Image |
frameImage
|
static javax.swing.Timer |
grabTimer
A Timer variable decleration, the grabTimer, who at each clock fires a particular chain of calculations, functions and procedures who are
needed for the calculations. |
static SinkData |
graySinkData
The SinkData class decleration, as graySinkData for the Gray's color data sink. |
static SinkData |
greenSinkData
The SinkData class decleration, as greenSinkData for the Green's color data sink. |
static SinkData |
magentaSinkData
The SinkData class decleration, as magenteSinkData for the Magenta's color data sink. |
static SinkData |
orangeSinkData
The SinkData class decleration, as orangeSinkData for the Orange's color data sink. |
static SinkData |
pinkSinkData
The SinkData class decleration, as pinkSinkData for the Pink's color data sink. |
static javax.media.Player |
player
A Player variable decleration, the player, that takes as input the processor's data output and used to grab the frames and convert them
to BufferedImages. |
static javax.media.Processor |
processor
A Processor variable decleration, the processor, that takes the source from the Data Source that has been
connected with the video captured device. |
static SinkData |
redSinkData
The SinkData class decleration, as redSinkData for the Red's color data sink. |
static SinkColorValues |
sinkColorValues
The SinkColorValues class decleration, as sinkColorValues. |
static javax.media.protocol.DataSource |
videoDataSource
|
static SinkData |
whiteSinkData
The SinkData class decleration, as whiteSinkData for the White's color data sink. |
static SinkData |
yellowSinkData
The SinkData class decleration, as yellowSinkData for the Yellow's color data sink. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| 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 | |
|---|---|
VideoStreamController()
Creates a new empty instance of the VideoStreamController. |
|
VideoStreamController(java.lang.String name,
java.lang.String videoFormat)
Creates a new instance of the VideoStreamController, that takes as parameters the video capture's device name and the selected video format to create the connection with the camera, sets the format and calls the myTimer() function to start the chain for the particular processes. |
|
| Method Summary | |
|---|---|
java.awt.Image |
getFrame()
The function getFrame, that grabs the current frame, converts it to buffered image and returns it at the step(). |
void |
myTimer()
The function myTimer that starts and repeats the particular processing chain. |
void |
paint(java.awt.Graphics g)
the Paint function for optical represantation of calculation. |
void |
step()
The step function that is called from the myTimer() function, that in the begging calls the function getFrame(), that grabs the current frame,
converts it to buffered image and returns it at the step, then, if at least one color is selected, calls the ImageProcessor with
paramert the buffered image. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class javax.swing.JComponent |
|---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, 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, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static javax.media.Player player
Player variable decleration, the player, that takes as input the processor's data output and used to grab the frames and convert them
to BufferedImages.
public static java.awt.image.BufferedImage bufferedImage
BufferedImage variable decleration, the bufferedImage, that is used to take each grabed frame, that has been converted to Buffered Image
and to send this Buffered Image to the ImageProcessor class for the particular calculations.
public static javax.swing.Timer grabTimer
Timer variable decleration, the grabTimer, who at each clock fires a particular chain of calculations, functions and procedures who are
needed for the calculations. Particularly, calls the function step() that in the begging calls the function getFrame(), that grabs the current frame,
converts it to buffered image and returns it at the step(), Then the step(), if at least one color is selected, calls the ImageProcessor with
paramert the buffered image. When the calculations in ImageProcessor has finished returns back a new buffered image with the results "printed" on it. And
from the begging again.
public static javax.media.Processor processor
Processor variable decleration, the processor, that takes the source from the Data Source that has been
connected with the video captured device.
public static java.awt.Image frameImage
public static boolean debugDeviceList
public static javax.media.CaptureDeviceInfo captureVideoDevice
public static javax.media.format.VideoFormat captureVideoFormat
public static javax.media.CaptureDeviceInfo deviceInfo
public static javax.media.protocol.DataSource videoDataSource
public static javax.media.protocol.DataSource ds1
public static SinkColorValues sinkColorValues
SinkColorValues class decleration, as sinkColorValues.
public static SinkData redSinkData
SinkData class decleration, as redSinkData for the Red's color data sink.
public static SinkData orangeSinkData
SinkData class decleration, as orangeSinkData for the Orange's color data sink.
public static SinkData brownSinkData
SinkData class decleration, as brownSinkData for the Brown's color data sink.
public static SinkData yellowSinkData
SinkData class decleration, as yellowSinkData for the Yellow's color data sink.
public static SinkData greenSinkData
SinkData class decleration, as greenSinkData for the Green's color data sink.
public static SinkData cyanSinkData
SinkData class decleration, as cyanSinkData for the Cyan's color data sink.
public static SinkData blueSinkData
SinkData class decleration, as blueSinkData for the Blue's color data sink.
public static SinkData magentaSinkData
SinkData class decleration, as magenteSinkData for the Magenta's color data sink.
public static SinkData pinkSinkData
SinkData class decleration, as pinkSinkData for the Pink's color data sink.
public static SinkData whiteSinkData
SinkData class decleration, as whiteSinkData for the White's color data sink.
public static SinkData blackSinkData
SinkData class decleration, as blackSinkData for the Black's color data sink.
public static SinkData graySinkData
SinkData class decleration, as graySinkData for the Gray's color data sink.
| Constructor Detail |
|---|
public VideoStreamController()
ColoredShapesTracker
public VideoStreamController(java.lang.String name,
java.lang.String videoFormat)
myTimer() function to start the chain for the particular processes.
name - the Captute device's namevideoFormat - the selected video formatDeviceFormat.formatToString(javax.media.Format),
DeviceFormat.setFormat(javax.media.protocol.DataSource, javax.media.Format),
myTimer()| Method Detail |
|---|
public java.awt.Image getFrame()
getFrame, that grabs the current frame, converts it to buffered image and returns it at the step().
step()public void step()
myTimer() function, that in the begging calls the function getFrame(), that grabs the current frame,
converts it to buffered image and returns it at the step, then, if at least one color is selected, calls the ImageProcessor with
paramert the buffered image. When the calculations in ImageProcessor has finished gets back a new buffered image with the results "printed" on it. And
from the begging again. For protection checks if one color is at the procedure of recording but has been disabled, to stop the recording.
myTimer(),
getFrame()public void myTimer()
VideoStreamController,
step()public void paint(java.awt.Graphics g)
paint in class javax.swing.JComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||