|
||||||||||
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
sigus.apps.ttt.TicTacToe_
Nested Class Summary | |
static class |
TicTacToe_.GraphicArea
|
Nested classes inherited from class javax.swing.JFrame |
javax.swing.JFrame.AccessibleJFrame |
Nested classes inherited from class java.awt.Frame |
java.awt.Frame.AccessibleAWTFrame |
Nested classes inherited from class java.awt.Window |
java.awt.Window.AccessibleAWTWindow |
Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
(package private) int |
black
Black's (Cross) current position. |
(package private) boolean |
calibrating
True if tye system is collecting skin (or pixels of the target object - hands, eyes, face, etc) samples |
(package private) static int |
DONE
|
(package private) SigusEffect |
effect
A SigusEffect process images captured by the Webcam and controll training and testing phases |
(package private) boolean |
first
Who goes first in the next game? |
(package private) ij.ImagePlus |
imp
ImageProcessor and ImagePlus take control tof he window where the processed image is shown |
(package private) ij.process.ImageProcessor |
ip
ImageProcessor and ImagePlus take control tof he window where the processed image is shown |
(package private) static int |
LOSE
|
(package private) static int[] |
moves
The squares in order of importance... |
(package private) static int |
OK
|
(package private) static int |
STALEMATE
|
(package private) Updater |
updater
An updater collects training samples |
(package private) int |
white
White's (Not - Circle) current position. |
(package private) static int |
WIN
|
(package private) static boolean[] |
won
The winning positions. |
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.Window |
|
Fields inherited from class java.awt.Container |
|
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface ij.plugin.filter.PlugInFilter |
DOES_16, DOES_32, DOES_8C, DOES_8G, DOES_ALL, DOES_RGB, DOES_STACKS, NO_CHANGES, NO_IMAGE_REQUIRED, NO_UNDO, ROI_REQUIRED, STACK_REQUIRED, SUPPORTS_MASKING |
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 | |
TicTacToe_(SigusEffect effect)
|
Method Summary | |
(package private) int |
bestMove(int white,
int black)
Compute the best move for white (computer) |
boolean |
getCalibrating()
True if application is in calibration mode (e.g.: collecting samples from face or hand skin), false otherwise. |
private java.lang.String |
getSequencial(int c,
int r)
Get the column and row and returns a sequencial number indicating the square that the player looked at |
void |
init()
Initialize the applet. |
private static void |
isWon(int pos)
Mark all positions with these bits set as winning. |
private void |
jCalibrateButtonClicked(java.awt.event.ActionEvent evt)
Switch the calibration phase on and off |
private void |
jClearExamplesButtonClicked(java.awt.event.ActionEvent evt)
Clear the previously collected examples and restart the training phase |
private void |
jTrainingButtonClicked(java.awt.event.ActionEvent evt)
Stop training phase and start playing by vision |
void |
mouseClicked(int c,
int r)
Calls updater to collected a training sample (the user looked and clicked) |
(package private) boolean |
myMove()
Computer move. |
void |
process(int n)
Get a number indicating the square that the player looked at and execute the proper play |
void |
process(int c,
int r)
Process the user play |
private void |
resetGame()
Restart the game |
void |
run(ij.process.ImageProcessor ip)
|
void |
setGeneralTitle(java.lang.String title)
Set window title |
void |
setImageProcessor(ij.process.ImageProcessor i)
Set the ImageProcessor where Digital Image Processing will occurr (that window showing the segmented image) |
void |
setTitleLearning()
|
void |
setTitlePlaying()
Indicate, with the word "playing" in the window title, that the application is NOT in learning mode (webcam interaction has begun) |
void |
setTitleTraining()
|
int |
setup(java.lang.String arg,
ij.ImagePlus imp)
This method is called once when the filter is loaded. |
void |
setUpdater(Updater u)
Set the class that will collect training samples and save them to an arff (weka) file. |
(package private) void |
showAbout()
|
(package private) int |
status()
Figure what the status of the game is. |
void |
trainingFinished()
|
(package private) boolean |
yourMove(int m)
User move. |
Methods inherited from class javax.swing.JFrame |
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, update |
Methods inherited from class java.awt.Frame |
addNotify, finalize, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setResizable, setState, setTitle, setUndecorated |
Methods inherited from class java.awt.Window |
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getMostRecentFocusOwner, getOwnedWindows, getOwner, getToolkit, getWarningString, getWindowFocusListeners, getWindowListeners, getWindowStateListeners, hide, isActive, isFocusableWindow, isFocusCycleRoot, isFocused, isShowing, pack, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, setCursor, setFocusableWindowState, setFocusCycleRoot, setLocationRelativeTo, show, toBack, toFront |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.MenuContainer |
getFont, postEvent |
Field Detail |
Updater updater
SigusEffect effect
ij.process.ImageProcessor ip
ij.ImagePlus imp
boolean calibrating
int white
int black
static final int[] moves
static boolean[] won
static final int DONE
static final int OK
static final int WIN
static final int LOSE
static final int STALEMATE
boolean first
Constructor Detail |
public TicTacToe_(SigusEffect effect)
Method Detail |
private static void isWon(int pos)
private void resetGame()
int bestMove(int white, int black)
boolean yourMove(int m)
boolean myMove()
int status()
public void init()
init
in interface SigusApp
private void jCalibrateButtonClicked(java.awt.event.ActionEvent evt)
private void jTrainingButtonClicked(java.awt.event.ActionEvent evt)
private void jClearExamplesButtonClicked(java.awt.event.ActionEvent evt)
public void setTitleTraining()
public void setTitleLearning()
public void setGeneralTitle(java.lang.String title)
SigusApp
setGeneralTitle
in interface SigusApp
public void setTitlePlaying()
SigusApp
setTitlePlaying
in interface SigusApp
public void process(int n)
process
in interface SigusApp
n
- - an integer associated to each different vision signprivate java.lang.String getSequencial(int c, int r)
public void process(int c, int r)
public void trainingFinished()
public boolean getCalibrating()
SigusApp
getCalibrating
in interface SigusApp
public void mouseClicked(int c, int r)
public void run(ij.process.ImageProcessor ip)
run
in interface ij.plugin.filter.PlugInFilter
public void setUpdater(Updater u)
SigusApp
setUpdater
in interface SigusApp
public void setImageProcessor(ij.process.ImageProcessor i)
SigusApp
setImageProcessor
in interface SigusApp
public int setup(java.lang.String arg, ij.ImagePlus imp)
setup
in interface ij.plugin.filter.PlugInFilter
void showAbout()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |