|
||||||||||
| 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
javax.swing.JFrame
FindIt.ColoredShapesTracker
public class ColoredShapesTracker
This software using a camera for video capture device, is getting live image from the out world, and with a
number of calculations, recognizes objects depending their color. Is the main GUI class that include the
VideoStreamController Panel class who makes the connection with the video capture device and projects the
captured video from the camera including the polygons that represents the border of each object that has been
recognized by the ImageProcessor class, the function ImageProcessor.processImage() and the
JarvisMarch class who makes the determined calculations for the recognitions.
Creates a new instans of the VideoStreamController who is responsible to estamblish the
connection with the camera, to extracts the image from the captured video and send it to the
ImageProcessor class for the calculation. Sets to the VideoStreamController the Capture
Device Name, etc. "vfw:Live! Cam Vista IM (VFW):0", the Video Format, etc. "size=640x480,
encoding=rgb, maxdatalength=921600" and the Capture Device Location, etc. "vfw://0".
By calling the ColorSettings class and getting back the returns from it, enables which colors will
the ImageProcessor.processImage() search for and sets the values for each active color.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JFrame |
|---|
javax.swing.JFrame.AccessibleJFrame |
| Nested classes/interfaces inherited from class java.awt.Frame |
|---|
java.awt.Frame.AccessibleAWTFrame |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
java.awt.Window.AccessibleAWTWindow |
| 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 boolean |
black
True or False Value (Enabled or Disabled) that determinds if the Black color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
blue
True or False Value (Enabled or Disabled) that determinds if the Blue color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
brown
True or False Value (Enabled or Disabled) that determinds if the Brown color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static java.lang.String |
CAPTURE_DEVICE_LOCATION
Constant that reprisents a default Capture Device Location that is supported |
static java.lang.String |
capture_Device_Locator
Decleration for the variable capture_Device_Locator that will get later from the class
CaptureDevFrame the Devise's Locator. |
static java.lang.String |
capture_Device_Name
Decleration for the variable capture_Device_Name that will get later from the class
CaptureDevFrame the name of Capture Device who will be used for the video capture. |
static java.lang.String |
CAPTURE_DEVICE_NAME
Constant that reprisents a default Capture Device. |
static ColorValues |
colorValues
The ColorValues class decleration and construction. |
static ColorSettings |
cs2
The ColorSettings class decleration and construction. |
static boolean |
cyan
True or False Value (Enabled or Disabled) that determinds if the Cyan color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
enableRecord
Decleration for a Boolean valiable, the who specifies if the has been selected to\he recording
to be enabled or not. |
static boolean |
gray
True or False Value (Enabled or Disabled) that determinds if the Gray color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
green
True or False Value (Enabled or Disabled) that determinds if the Green color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
magenta
True or False Value (Enabled or Disabled) that determinds if the Magenta color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
on
Decleration for a Boolean variable, the on and default setted false, who will be change at
true when a caprure device will be setted and to make the myTimer() function to call the start function that will
start the process. |
static boolean |
orange
True or False Value (Enabled or Disabled) that determinds if the Orange color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
pink
True or False Value (Enabled or Disabled) that determinds if the Pink color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
process
True or False Value (Enabled or Disabled) that determinds if the ImageProcessor.processImage() function
will be calling to process an image for color tracking and to be True must on color at least to be Enabled. |
static boolean |
recBlack
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Black color and is depending if the requested color is included in the captured image. |
static boolean |
recBlue
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Blue color and is depending if the requested color is included in the captured image. |
static boolean |
recBrown
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Brown color and is depending if the requested color is included in the captured image. |
static boolean |
recCyan
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Cyan color and is depending if the requested color is included in the captured image. |
static boolean |
recGray
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Gray color and is depending if the requested color is included in the captured image. |
static boolean |
recGreen
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Green color and is depending if the requested color is included in the captured image. |
static boolean |
recMagenta
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Magenta color and is depending if the requested color is included in the captured image. |
static boolean |
recOrange
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Orange color and is depending if the requested color is included in the captured image. |
static boolean |
recPink
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Pink color and is depending if the requested color is included in the captured image. |
static boolean |
recProcess
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Red color and is depending if the requested color is included in the captured image. |
static boolean |
recRed
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Red color and is depending if the requested color is included in the captured image. |
static boolean |
recWhite
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the White color and is depending if the requested color is included in the captured image. |
static boolean |
recYellow
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Yellow color and is depending if the requested color is included in the captured image. |
static boolean |
red
True or False Value (Enabled or Disabled) that determinds if the Red color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
javax.swing.Timer |
timer
Decleration for a Timer variable, the timer who used to call the getON() function
until to becaume true and then to call the start() function to start the process. |
static boolean |
white
True or False Value (Enabled or Disabled) that determinds if the White color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
static boolean |
yellow
True or False Value (Enabled or Disabled) that determinds if the Yellow color will be processed for tracking
and to be True must be selected from the ColorSettings class. |
| Fields inherited from class javax.swing.JFrame |
|---|
accessibleContext, EXIT_ON_CLOSE, rootPane, rootPaneCheckingEnabled |
| 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 javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
ColoredShapesTracker()
Creates a new instans of the ColoredShapesTracker who is the application's main frame that creates the necessary GUI for the capture device and the color selection. |
|
| Method Summary | |
|---|---|
static void |
close()
The close function that is calling when the application is going to sutdown. |
static java.lang.String |
getCaptureDeviceLocator()
Returns the value capture_Device_Locator, that reprisents the Capture Device's Locator. |
static java.lang.String |
getCaptureDeviceName()
Returns the value capture_Device_Name, that reprisents the name of the capture device who will be used. |
static java.lang.String |
getCaptureVideoFormat()
Returns the value capture_Video_Format, that reprisents the video Format who will be used. |
static boolean |
getEnableRecord()
Gets the value of the enableRecord variable. |
boolean |
getON()
Returns the value on. |
static boolean |
getProcess()
Returns the value process, true, if at least on color is selected to be processed for shape calculation,
or false if none color is selected, controlling with this way if the ImageProcessor.processImage()
functio will be calling or not. |
static void |
main(java.lang.String[] args)
|
static void |
setBlack(boolean aColor)
The setBlack funtion who is calling from the ColorSettings class when the Black color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setBlue(boolean aColor)
The setBlue funtion who is calling from the ColorSettings class when the Blue color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setBrown(boolean aColor)
The setBrown funtion who is calling from the ColorSettings class when the Brown color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setCaptureDeviceLocator(java.lang.String cdl)
Sets the value capture_Device_Locator, that reprisents the Capture Device's Locator. |
static void |
setCaptureDeviceName(java.lang.String cdn)
Sets the value capture_Device_Name from CaptureDevFrame, that reprisents the name of the capture device who will be used. |
static void |
setCaptureVideoFormat(java.lang.String cdf)
Sets the value capture_Video_Format, that reprisents the video Format who will be used. |
static void |
setCyan(boolean aColor)
The setCyan funtion who is calling from the ColorSettings class when the Cyan color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setEnableRecord(boolean sER)
Sets the boolean variable enableRecord true or false, if the check box or the chech box item are selected or not. |
static void |
setGray(boolean aColor)
The setGray funtion who is calling from the ColorSettings class when the Gray color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setGreen(boolean aColor)
The setGreen funtion who is calling from the ColorSettings class when the Green color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setMagenta(boolean aColor)
The setMagenta funtion who is calling from the ColorSettings class when the Magenta color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setON(boolean seton)
Sets the value on, true or false from CaptureDevFrame, to make the myTimer() funtion
to call the start function. |
static void |
setOrange(boolean aColor)
The setOrange funtion who is calling from the ColorSettings class when the Orange color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setPink(boolean aColor)
The setPink funtion who is calling from the ColorSettings class when the Pink color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setProcess(boolean aProcess)
Sets the value process, true from ColorSettings, if at least on color is selected to be processed for shape calculation,
or false if none color is selected, controlling with this way if the ImageProcessor.processImage()
functio will be calling or not. |
static void |
setRed(boolean aColor)
The setRed funtion who is calling from the ColorSettings class when the Red color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setWhite(boolean aColor)
The setWhite funtion who is calling from the ColorSettings class when the White color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
static void |
setYellow(boolean aColor)
The setYellow funtion who is calling from the ColorSettings class when the Yellow color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage(). |
void |
start()
The start function is calling from myTimer() funtion, when the on boolean value is setted on and calls the
VideoStreamController to start the process. |
static void |
stopRec()
The stopRec() function that checks each color if is in recording progress and if it is,
makes each color's sink boolean value false, (redSink, orangeSink), and calls each color's SinkData.stop(java.lang.String) funtion to stop the recording. |
| Methods inherited from class javax.swing.JFrame |
|---|
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update |
| Methods inherited from class java.awt.Frame |
|---|
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, 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, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOwnedWindows, getOwner, getOwnerlessWindows, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setVisible, show, toBack, toFront |
| Methods inherited from class java.awt.Container |
|---|
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, 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, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, 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, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, setBackground, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusUpCycle |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.awt.MenuContainer |
|---|
getFont, postEvent |
| Field Detail |
|---|
public static ColorValues colorValues
ColorValues class decleration and construction.
public static ColorSettings cs2
ColorSettings class decleration and construction.
public static boolean red
True or False Value (Enabled or Disabled) that determinds if the Red color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean orange
True or False Value (Enabled or Disabled) that determinds if the Orange color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean brown
True or False Value (Enabled or Disabled) that determinds if the Brown color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean yellow
True or False Value (Enabled or Disabled) that determinds if the Yellow color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean green
True or False Value (Enabled or Disabled) that determinds if the Green color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean cyan
True or False Value (Enabled or Disabled) that determinds if the Cyan color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean blue
True or False Value (Enabled or Disabled) that determinds if the Blue color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean magenta
True or False Value (Enabled or Disabled) that determinds if the Magenta color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean pink
True or False Value (Enabled or Disabled) that determinds if the Pink color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean white
True or False Value (Enabled or Disabled) that determinds if the White color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean black
True or False Value (Enabled or Disabled) that determinds if the Black color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean gray
True or False Value (Enabled or Disabled) that determinds if the Gray color will be processed for tracking
and to be True must be selected from the ColorSettings class.
public static boolean process
True or False Value (Enabled or Disabled) that determinds if the ImageProcessor.processImage() function
will be calling to process an image for color tracking and to be True must on color at least to be Enabled.
public static boolean recRed
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Red color and is depending if the requested color is included in the captured image.
public static boolean recOrange
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Orange color and is depending if the requested color is included in the captured image.
public static boolean recBrown
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Brown color and is depending if the requested color is included in the captured image.
public static boolean recYellow
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Yellow color and is depending if the requested color is included in the captured image.
public static boolean recGreen
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Green color and is depending if the requested color is included in the captured image.
public static boolean recCyan
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Cyan color and is depending if the requested color is included in the captured image.
public static boolean recBlue
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Blue color and is depending if the requested color is included in the captured image.
public static boolean recMagenta
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Magenta color and is depending if the requested color is included in the captured image.
public static boolean recPink
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Pink color and is depending if the requested color is included in the captured image.
public static boolean recWhite
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the White color and is depending if the requested color is included in the captured image.
public static boolean recBlack
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Black color and is depending if the requested color is included in the captured image.
public static boolean recGray
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Gray color and is depending if the requested color is included in the captured image.
public static boolean recProcess
True or False Value (Enabled or Disabled) that determinds if the SinkData class will be calling
to start or stop the recording procedure for the Red color and is depending if the requested color is included in the captured image.
public static final java.lang.String CAPTURE_DEVICE_NAME
Capture Device.
public static final java.lang.String CAPTURE_DEVICE_LOCATION
Capture Device Location that is supported
public static java.lang.String capture_Device_Name
capture_Device_Name that will get later from the class
CaptureDevFrame the name of Capture Device who will be used for the video capture.
public static java.lang.String capture_Device_Locator
capture_Device_Locator that will get later from the class
CaptureDevFrame the Devise's Locator.
public javax.swing.Timer timer
Timer variable, the timer who used to call the getON() function
until to becaume true and then to call the start() function to start the process.
public static boolean enableRecord
Boolean valiable, the who specifies if the has been selected to\he recording
to be enabled or not.
public static boolean on
Boolean variable, the on and default setted false, who will be change at
true when a caprure device will be setted and to make the myTimer() function to call the start function that will
start the process.
| Constructor Detail |
|---|
public ColoredShapesTracker()
| Method Detail |
|---|
public static void setON(boolean seton)
on, true or false from CaptureDevFrame, to make the myTimer() funtion
to call the start function.
seton - true or false value.CaptureDevFrame,
getON()public boolean getON()
on.
setON(boolean),
myTimer()public static void setEnableRecord(boolean sER)
enableRecord true or false, if the check box or the chech box item are selected or not.
sER - getEnableRecord()public static boolean getEnableRecord()
enableRecord variable.
ImageProcessor.colorSpliter(int[][], java.lang.String),
setEnableRecord(boolean)public static void setCaptureDeviceName(java.lang.String cdn)
capture_Device_Name from CaptureDevFrame, that reprisents the name of the capture device who will be used.
cdn - String value with the capture device's name.getCaptureDeviceName(),
CaptureDevFramepublic static java.lang.String getCaptureDeviceName()
capture_Device_Name, that reprisents the name of the capture device who will be used.
setCaptureDeviceName(java.lang.String),
start()public static void setCaptureVideoFormat(java.lang.String cdf)
capture_Video_Format, that reprisents the video Format who will be used.
cdf - String value with the information for the Video Format who will be used.getCaptureVideoFormat(),
CaptureDevFramepublic static java.lang.String getCaptureVideoFormat()
capture_Video_Format, that reprisents the video Format who will be used.
setCaptureVideoFormat(java.lang.String),
start()public static void setCaptureDeviceLocator(java.lang.String cdl)
capture_Device_Locator, that reprisents the Capture Device's Locator.
cdl - String value will the information for the Capture Device's Locator.getCaptureDeviceLocator(),
start()public static java.lang.String getCaptureDeviceLocator()
capture_Device_Locator, that reprisents the Capture Device's Locator.
setCaptureDeviceLocator(java.lang.String),
start()public static void setProcess(boolean aProcess)
process, true from ColorSettings, if at least on color is selected to be processed for shape calculation,
or false if none color is selected, controlling with this way if the ImageProcessor.processImage()
functio will be calling or not.
aProcess - boolean value aProcessgetProcess(),
ColorSettingspublic static boolean getProcess()
process, true, if at least on color is selected to be processed for shape calculation,
or false if none color is selected, controlling with this way if the ImageProcessor.processImage()
functio will be calling or not.
setProcess(boolean),
VideoStreamController.step()public void start()
start function is calling from myTimer() funtion, when the on boolean value is setted on and calls the
VideoStreamController to start the process.
Calls the getCaptureDeviceName() to get the Capture Device's name and set it at the String value capDevName,
calls the getCaptureVideoFormat() to get the Capture Video Format and set it at the String value capVidFormat
and cals the getCaptureDeviceLocator() to get the Capture Device's Locator and set it at tha String value capDevLocator.
If those three are not null creates a new instans of the VideoStreamController class and sends to it those three values to make
the connection with the Video Capture Device, to set the Video Format and start the process in ImageProcessor.
And finally adds the videoStreamController Panel at the ColoredShapesTracker main frame for a visual reprisentation of the process.
getON(),
getCaptureDeviceName(),
getCaptureVideoFormat(),
getCaptureDeviceLocator(),
myTimer()public static void setRed(boolean aColor)
setRed funtion who is calling from the ColorSettings class when the Red color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the RedProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setRedHueLo(int), the HueHi at the ColorValues.setRedHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkRed(boolean)
is calling to make the sinkRed boolean value false and the SinkData.stop(java.lang.String) for the Red color is caled to
stop the recording.
ColorValues.setRedHueLo(int),
ColorValues.setRedHueHi(int),
ColorValues.setRedSatLo(int),
ColorValues.setRedSatHi(int),
ColorValues.setRedIntLo(int),
ColorValues.setRedIntHi(int)public static void setOrange(boolean aColor)
setOrange funtion who is calling from the ColorSettings class when the Orange color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the OrangeProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setOrangeHueLo(int), the HueHi at the ColorValues.setOrangeHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkOrange(boolean)
is calling to make the sinkOrange boolean value false and the SinkData.stop(java.lang.String) for the Orange color is caled to
stop the recording.
ColorValues.setOrangeHueLo(int),
ColorValues.setOrangeHueHi(int),
ColorValues.setOrangeSatLo(int),
ColorValues.setOrangeSatHi(int),
ColorValues.setOrangeIntLo(int),
ColorValues.setOrangeIntHi(int)public static void setBrown(boolean aColor)
setBrown funtion who is calling from the ColorSettings class when the Brown color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the BrownProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setBrownHueLo(int), the HueHi at the ColorValues.setBrownHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkBrown(boolean)
is calling to make the sinkBrown boolean value false and the SinkData.stop(java.lang.String) for the Brown color is caled to
stop the recording.
ColorValues.setBrownHueLo(int),
ColorValues.setBrownHueHi(int),
ColorValues.setBrownSatLo(int),
ColorValues.setBrownSatHi(int),
ColorValues.setBrownIntLo(int),
ColorValues.setBrownIntHi(int)public static void setYellow(boolean aColor)
setYellow funtion who is calling from the ColorSettings class when the Yellow color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the YellowProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setYellowHueLo(int), the HueHi at the ColorValues.setYellowHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkYellow(boolean)
is calling to make the sinkYellow boolean value false and the SinkData.stop(java.lang.String) for the Yellow color is caled to
stop the recording.
ColorValues.setYellowHueLo(int),
ColorValues.setYellowHueHi(int),
ColorValues.setYellowSatLo(int),
ColorValues.setYellowSatHi(int),
ColorValues.setYellowIntLo(int),
ColorValues.setYellowIntHi(int)public static void setGreen(boolean aColor)
setGreen funtion who is calling from the ColorSettings class when the Green color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the GreenProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setGreenHueLo(int), the HueHi at the ColorValues.setGreenHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkGreen(boolean)
is calling to make the sinkGreen boolean value false and the SinkData.stop(java.lang.String) for the Green color is caled to
stop the recording.
ColorValues.setGreenHueLo(int),
ColorValues.setGreenHueHi(int),
ColorValues.setGreenSatLo(int),
ColorValues.setGreenSatHi(int),
ColorValues.setGreenIntLo(int),
ColorValues.setGreenIntHi(int)public static void setCyan(boolean aColor)
setCyan funtion who is calling from the ColorSettings class when the Cyan color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the CyanProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setCyanHueLo(int), the HueHi at the ColorValues.setCyanHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkCyan(boolean)
is calling to make the sinkCyan boolean value false and the SinkData.stop(java.lang.String) for the Cyan color is caled to
stop the recording.
ColorValues.setCyanHueLo(int),
ColorValues.setCyanHueHi(int),
ColorValues.setCyanSatLo(int),
ColorValues.setCyanSatHi(int),
ColorValues.setCyanIntLo(int),
ColorValues.setCyanIntHi(int)public static void setBlue(boolean aColor)
setBlue funtion who is calling from the ColorSettings class when the Blue color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the BlueProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setBlueHueLo(int), the HueHi at the ColorValues.setBlueHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkBlue(boolean)
is calling to make the sinkBlue boolean value false and the SinkData.stop(java.lang.String) for the Blue color is caled to
stop the recording.
ColorValues.setBlueHueLo(int),
ColorValues.setBlueHueHi(int),
ColorValues.setBlueSatLo(int),
ColorValues.setBlueSatHi(int),
ColorValues.setBlueIntLo(int),
ColorValues.setBlueIntHi(int)public static void setMagenta(boolean aColor)
setMagenta funtion who is calling from the ColorSettings class when the Magenta color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the MagentaProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setMagentaHueLo(int), the HueHi at the ColorValues.setMagentaHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkMagenta(boolean)
is calling to make the sinkMagenta boolean value false and the SinkData.stop(java.lang.String) for the Magenta color is caled to
stop the recording.
ColorValues.setMagentaHueLo(int),
ColorValues.setMagentaHueHi(int),
ColorValues.setMagentaSatLo(int),
ColorValues.setMagentaSatHi(int),
ColorValues.setMagentaIntLo(int),
ColorValues.setMagentaIntHi(int)public static void setPink(boolean aColor)
setPink funtion who is calling from the ColorSettings class when the Pink color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the PinkProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setPinkHueLo(int), the HueHi at the ColorValues.setPinkHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkPink(boolean)
is calling to make the sinkPink boolean value false and the SinkData.stop(java.lang.String) for the Pink color is caled to
stop the recording.
ColorValues.setPinkHueLo(int),
ColorValues.setPinkHueHi(int),
ColorValues.setPinkSatLo(int),
ColorValues.setPinkSatHi(int),
ColorValues.setPinkIntLo(int),
ColorValues.setPinkIntHi(int)public static void setWhite(boolean aColor)
setWhite funtion who is calling from the ColorSettings class when the White color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the WhiteProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setWhiteHueLo(int), the HueHi at the ColorValues.setWhiteHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkWhite(boolean)
is calling to make the sinkWhite boolean value false and the SinkData.stop(java.lang.String) for the White color is caled to
stop the recording.
ColorValues.setWhiteHueLo(int),
ColorValues.setWhiteHueHi(int),
ColorValues.setWhiteSatLo(int),
ColorValues.setWhiteSatHi(int),
ColorValues.setWhiteIntLo(int),
ColorValues.setWhiteIntHi(int)public static void setBlack(boolean aColor)
setBlack funtion who is calling from the ColorSettings class when the Black color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the BlackProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setBlackHueLo(int), the HueHi at the ColorValues.setBlackHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkBlack(boolean)
is calling to make the sinkBlack boolean value false and the SinkData.stop(java.lang.String) for the Black color is caled to
stop the recording.
ColorValues.setBlackHueLo(int),
ColorValues.setBlackHueHi(int),
ColorValues.setBlackSatLo(int),
ColorValues.setBlackSatHi(int),
ColorValues.setBlackIntLo(int),
ColorValues.setBlackIntHi(int)public static void setGray(boolean aColor)
setGray funtion who is calling from the ColorSettings class when the Gray color has
been selected to be one of the colors who will be calculated from the ImageProcessor.processImage().
When becaume true reads the values for the HueLo, HueHi, SatLo, SatHi, IntLo and IntHi from the GrayProperties.properties
file in the properties package and set each on at the ColorValues class, the HueLo at the
ColorValues.setGrayHueLo(int), the HueHi at the ColorValues.setGrayHueHi(int), etc.
When becaume false and was before true and the reconding was in progress, must stopped. So the SinkColorValues.setSinkGray(boolean)
is calling to make the sinkGray boolean value false and the SinkData.stop(java.lang.String) for the Gray color is caled to
stop the recording.
ColorValues.setGrayHueLo(int),
ColorValues.setGrayHueHi(int),
ColorValues.setGraySatLo(int),
ColorValues.setGraySatHi(int),
ColorValues.setGrayIntLo(int),
ColorValues.setGrayIntHi(int)public static void stopRec()
stopRec() function that checks each color if is in recording progress and if it is,
makes each color's sink boolean value false, (redSink, orangeSink), and calls each color's SinkData.stop(java.lang.String) funtion to stop the recording.
close()public static void close()
close function that is calling when the application is going to sutdown. Is abled to be calling from the Close Button,
the Exit menu item or the form closing button. Calls the stopRec() function that checks each color if is in recording progress and if it is,
makes each color's sink boolean value false, (redSink, orangeSink), and calls each color's SinkData.stop(java.lang.String) funtion to stop the recording.
After, stops, closes and deallocates the VideoStreamController Player and stops and closes the VideoStreamController Processor.
And finally close all the application.
stopRec()public static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||