FindIt
Class ColoredShapesTracker

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Window
              extended by java.awt.Frame
                  extended by javax.swing.JFrame
                      extended by FindIt.ColoredShapesTracker
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

public class ColoredShapesTracker
extends javax.swing.JFrame

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.

Author:
Konstantinos Stathopoulos.
See Also:
Serialized Form

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

colorValues

public static ColorValues colorValues
The ColorValues class decleration and construction.


cs2

public static ColorSettings cs2
The ColorSettings class decleration and construction.


red

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.


orange

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.


brown

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.


yellow

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.


green

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.


cyan

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.


blue

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.


magenta

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.


pink

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.


white

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.


black

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.


gray

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.


process

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.


recRed

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.


recOrange

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.


recBrown

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.


recYellow

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.


recGreen

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.


recCyan

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.


recBlue

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.


recMagenta

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.


recPink

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.


recWhite

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.


recBlack

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.


recGray

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.


recProcess

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.


CAPTURE_DEVICE_NAME

public static final java.lang.String CAPTURE_DEVICE_NAME
Constant that reprisents a default Capture Device.

See Also:
Constant Field Values

CAPTURE_DEVICE_LOCATION

public static final java.lang.String CAPTURE_DEVICE_LOCATION
Constant that reprisents a default Capture Device Location that is supported

See Also:
Constant Field Values

capture_Device_Name

public 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.


capture_Device_Locator

public 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.


timer

public 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.


enableRecord

public static boolean enableRecord
Decleration for a Boolean valiable, the who specifies if the has been selected to\he recording to be enabled or not.


on

public 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.

Constructor Detail

ColoredShapesTracker

public 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 Detail

setON

public static void setON(boolean seton)
Sets the value on, true or false from CaptureDevFrame, to make the myTimer() funtion to call the start function.

Parameters:
seton - true or false value.
See Also:
CaptureDevFrame, getON()

getON

public boolean getON()
Returns the value on.

Returns:
the boolean value on
See Also:
setON(boolean), myTimer()

setEnableRecord

public 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.

Parameters:
sER -
See Also:
getEnableRecord()

getEnableRecord

public static boolean getEnableRecord()
Gets the value of the enableRecord variable.

See Also:
ImageProcessor.colorSpliter(int[][], java.lang.String), setEnableRecord(boolean)

setCaptureDeviceName

public 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.

Parameters:
cdn - String value with the capture device's name.
See Also:
getCaptureDeviceName(), CaptureDevFrame

getCaptureDeviceName

public static java.lang.String getCaptureDeviceName()
Returns the value capture_Device_Name, that reprisents the name of the capture device who will be used.

Returns:
the String value capture_Device_Name
See Also:
setCaptureDeviceName(java.lang.String), start()

setCaptureVideoFormat

public static void setCaptureVideoFormat(java.lang.String cdf)
Sets the value capture_Video_Format, that reprisents the video Format who will be used.

Parameters:
cdf - String value with the information for the Video Format who will be used.
See Also:
getCaptureVideoFormat(), CaptureDevFrame

getCaptureVideoFormat

public static java.lang.String getCaptureVideoFormat()
Returns the value capture_Video_Format, that reprisents the video Format who will be used.

Returns:
the String value capture_Video_Format
See Also:
setCaptureVideoFormat(java.lang.String), start()

setCaptureDeviceLocator

public static void setCaptureDeviceLocator(java.lang.String cdl)
Sets the value capture_Device_Locator, that reprisents the Capture Device's Locator.

Parameters:
cdl - String value will the information for the Capture Device's Locator.
See Also:
getCaptureDeviceLocator(), start()

getCaptureDeviceLocator

public static java.lang.String getCaptureDeviceLocator()
Returns the value capture_Device_Locator, that reprisents the Capture Device's Locator.

Returns:
the String Value capture_Device_Locator
See Also:
setCaptureDeviceLocator(java.lang.String), start()

setProcess

public 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.

Parameters:
aProcess - boolean value aProcess
See Also:
getProcess(), ColorSettings

getProcess

public 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.

Returns:
boolean value process
See Also:
setProcess(boolean), VideoStreamController.step()

start

public 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. 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.

See Also:
getON(), getCaptureDeviceName(), getCaptureVideoFormat(), getCaptureDeviceLocator(), myTimer()

setRed

public 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(). 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.

See Also:
ColorValues.setRedHueLo(int), ColorValues.setRedHueHi(int), ColorValues.setRedSatLo(int), ColorValues.setRedSatHi(int), ColorValues.setRedIntLo(int), ColorValues.setRedIntHi(int)

setOrange

public 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(). 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.

See Also:
ColorValues.setOrangeHueLo(int), ColorValues.setOrangeHueHi(int), ColorValues.setOrangeSatLo(int), ColorValues.setOrangeSatHi(int), ColorValues.setOrangeIntLo(int), ColorValues.setOrangeIntHi(int)

setBrown

public 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(). 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.

See Also:
ColorValues.setBrownHueLo(int), ColorValues.setBrownHueHi(int), ColorValues.setBrownSatLo(int), ColorValues.setBrownSatHi(int), ColorValues.setBrownIntLo(int), ColorValues.setBrownIntHi(int)

setYellow

public 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(). 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.

See Also:
ColorValues.setYellowHueLo(int), ColorValues.setYellowHueHi(int), ColorValues.setYellowSatLo(int), ColorValues.setYellowSatHi(int), ColorValues.setYellowIntLo(int), ColorValues.setYellowIntHi(int)

setGreen

public 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(). 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.

See Also:
ColorValues.setGreenHueLo(int), ColorValues.setGreenHueHi(int), ColorValues.setGreenSatLo(int), ColorValues.setGreenSatHi(int), ColorValues.setGreenIntLo(int), ColorValues.setGreenIntHi(int)

setCyan

public 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(). 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.

See Also:
ColorValues.setCyanHueLo(int), ColorValues.setCyanHueHi(int), ColorValues.setCyanSatLo(int), ColorValues.setCyanSatHi(int), ColorValues.setCyanIntLo(int), ColorValues.setCyanIntHi(int)

setBlue

public 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(). 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.

See Also:
ColorValues.setBlueHueLo(int), ColorValues.setBlueHueHi(int), ColorValues.setBlueSatLo(int), ColorValues.setBlueSatHi(int), ColorValues.setBlueIntLo(int), ColorValues.setBlueIntHi(int)

setMagenta

public 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(). 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.

See Also:
ColorValues.setMagentaHueLo(int), ColorValues.setMagentaHueHi(int), ColorValues.setMagentaSatLo(int), ColorValues.setMagentaSatHi(int), ColorValues.setMagentaIntLo(int), ColorValues.setMagentaIntHi(int)

setPink

public 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(). 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.

See Also:
ColorValues.setPinkHueLo(int), ColorValues.setPinkHueHi(int), ColorValues.setPinkSatLo(int), ColorValues.setPinkSatHi(int), ColorValues.setPinkIntLo(int), ColorValues.setPinkIntHi(int)

setWhite

public 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(). 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.

See Also:
ColorValues.setWhiteHueLo(int), ColorValues.setWhiteHueHi(int), ColorValues.setWhiteSatLo(int), ColorValues.setWhiteSatHi(int), ColorValues.setWhiteIntLo(int), ColorValues.setWhiteIntHi(int)

setBlack

public 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(). 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.

See Also:
ColorValues.setBlackHueLo(int), ColorValues.setBlackHueHi(int), ColorValues.setBlackSatLo(int), ColorValues.setBlackSatHi(int), ColorValues.setBlackIntLo(int), ColorValues.setBlackIntHi(int)

setGray

public 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(). 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.

See Also:
ColorValues.setGrayHueLo(int), ColorValues.setGrayHueHi(int), ColorValues.setGraySatLo(int), ColorValues.setGraySatHi(int), ColorValues.setGrayIntLo(int), ColorValues.setGrayIntHi(int)

stopRec

public 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.

See Also:
close()

close

public static void close()
The 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.

See Also:
stopRec()

main

public static void main(java.lang.String[] args)