Facemorph
Class FaceMorphApp

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by java.awt.Panel
              extended by java.applet.Applet
                  extended by Facemorph.FaceMorphApp
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, javax.accessibility.Accessible

public class FaceMorphApp
extends java.applet.Applet

Face morphing applet. The applet parameters are as follows:

General:

tfcount - specifies the number of transforms

subjectImage - the URL of the image you want to transform

Two optional parameters control the output of images for saving and display in a new browser window:

port - specify the port to conect to, if ommitted defaults to 8080

saveURL - specifies a CGI script that takes an image URL and displays it with some decoration. If ommitted the undecorated image is displayed.

Three files are associated with the semi-automatic face feature delineation:

averageImage - the URL of the average face image of the delineation set

averageTemplate - the URL of the average shape of the face delineation set

PCA - the URL of the face PCA data

Each transform uses 6 applet tags to specify the source and target images,

the source and target templates, the amount of transform and the label for the pull down menu,

N should be replaced with the number of the transform, starting from 0:

imageNa - the URL of the Nth source image

imageNb - the URL of the Nth target image

templateNa - the URL of the Nth source template

templateNb - the URL of the Nth target template

tfN - the label for the Nth transform on the pull down menu

tscaleN - the amount to transform, 0.0 = no change, 1.0 = 100% of difference between source and target

each transform can also have an optional mask file, that defines a region outside of which the colours aren't changed

maskN - the name of the mask file

An example of specifying 3 transforms is given below:

<applet archive=Facemorphlib.jar code=Facemorph.FaceMorphApp.class width=900 height=580 hspace=0>

<param name=subjectImage value="blair.jpg">

<param name=averageTemplate value="average.txt">

<param name=averageImage value="average.jpg">

<param name=PCA value="transformer_pca.txt">

<param name=tfcount value=3>

<param name=tf0 value="Healthy ageing">

<param name=tf1 value="Smoking ageing">

<param name=tf2 value="Sun damaged ageing">

<param name=tscale0 value="1.0">

<param name=tscale1 value="1.15">

<param name=tscale2 value="1.25">

<param name=image0a value="young.jpg">

<param name=template0a value="young.txt">

<param name=image0b value="old.jpg">

<param name=template0b value="old.txt">

<param name=mask0 value="mask.msk">

<param name=image1a value="young.jpg">

<param name=template1a value="young.txt">

<param name=image1b value="old.jpg">

<param name=template1b value="old.txt">

<param name=image2a value="young.jpg">

<param name=template2a value="young.txt">

<param name=image2b value="old_sun.jpg">

<param name=template2b value="old_sun.txt">

You need a Java enabled browser to use this applet. Get the Java plug-in from

<a href="http://www.java.com">

www.java.com

</a>

. Check your browser settings to enable applets.

</applet>

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.applet.Applet
java.applet.Applet.AccessibleApplet
 
Nested classes/interfaces inherited from class java.awt.Panel
java.awt.Panel.AccessibleAWTPanel
 
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
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
FaceMorphApp()
           
 
Method Summary
 java.lang.String getAppletInfo()
          Returns a string with copyright info etc
 boolean handleEvent(java.awt.Event e)
          Handle's interaction with the GUI
 void init()
          Initialisaes the applet
 void paint(java.awt.Graphics g)
          Repaints the applet, depending on the current stage in the GUI step through
 
Methods inherited from class java.applet.Applet
destroy, getAccessibleContext, getAppletContext, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, start, stop
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusBackward, transferFocusDownCycle, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FaceMorphApp

public FaceMorphApp()
Method Detail

init

public void init()
Initialisaes the applet

Overrides:
init in class java.applet.Applet

paint

public void paint(java.awt.Graphics g)
Repaints the applet, depending on the current stage in the GUI step through

Overrides:
paint in class java.awt.Container
Parameters:
g - The Graphics object to draw to

handleEvent

public boolean handleEvent(java.awt.Event e)
Handle's interaction with the GUI

Overrides:
handleEvent in class java.awt.Component
Parameters:
e - The Event object with details about the event
Returns:
Returns true if the event was handles, or passes the event up to the super class.

getAppletInfo

public java.lang.String getAppletInfo()
Returns a string with copyright info etc

Overrides:
getAppletInfo in class java.applet.Applet
Returns:
Returns a string with copyright info etc