Facemorph.haar
Class HaarTrackerEffect

java.lang.Object
  extended by Facemorph.haar.HaarTrackerEffect
All Implemented Interfaces:
javax.media.Codec, javax.media.Controls, javax.media.Effect, javax.media.PlugIn

public class HaarTrackerEffect
extends java.lang.Object
implements javax.media.Effect

JMF effect based on har object detector


Field Summary
 
Fields inherited from interface javax.media.PlugIn
BUFFER_PROCESSED_FAILED, BUFFER_PROCESSED_OK, INPUT_BUFFER_NOT_CONSUMED, OUTPUT_BUFFER_NOT_FILLED, PLUGIN_TERMINATED
 
Constructor Summary
HaarTrackerEffect(javax.media.Processor p, HaarReader haar)
          Constructor for HaarTrackerEffect
 
Method Summary
 void close()
          Close the effect
 java.lang.Object getControl(java.lang.String controlType)
          Always returns null??
 java.lang.Object[] getControls()
          Methods required by Controls
 java.lang.String getName()
           
 javax.media.Format[] getSupportedInputFormats()
           
 javax.media.Format[] getSupportedOutputFormats(javax.media.Format input)
          Get the supported output formats
 void open()
          Open the effect
 int process(javax.media.Buffer input, javax.media.Buffer output)
          Process the buffer
 void reset()
          Reset the effect
 javax.media.Format setInputFormat(javax.media.Format format)
          Set the input format
 javax.media.Format setOutputFormat(javax.media.Format format)
          Set the output format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HaarTrackerEffect

public HaarTrackerEffect(javax.media.Processor p,
                         HaarReader haar)
Constructor for HaarTrackerEffect

Parameters:
p - the processor to use
haar - the haar detector to use
Method Detail

getControls

public java.lang.Object[] getControls()
Methods required by Controls

Specified by:
getControls in interface javax.media.Controls
Returns:
returns the control

getControl

public java.lang.Object getControl(java.lang.String controlType)
Always returns null??

Specified by:
getControl in interface javax.media.Controls
Parameters:
controlType - the control type
Returns:
returns null

getName

public java.lang.String getName()
Specified by:
getName in interface javax.media.PlugIn
Returns:
returns the name of the effect ColourTrackerEffect

open

public void open()
          throws javax.media.ResourceUnavailableException
Open the effect

Specified by:
open in interface javax.media.PlugIn
Throws:
javax.media.ResourceUnavailableException

close

public void close()
Close the effect

Specified by:
close in interface javax.media.PlugIn

reset

public void reset()
Reset the effect

Specified by:
reset in interface javax.media.PlugIn

getSupportedInputFormats

public javax.media.Format[] getSupportedInputFormats()
Specified by:
getSupportedInputFormats in interface javax.media.Codec

getSupportedOutputFormats

public javax.media.Format[] getSupportedOutputFormats(javax.media.Format input)
Get the supported output formats

Specified by:
getSupportedOutputFormats in interface javax.media.Codec
Parameters:
input - the input format
Returns:
returns the supported output formats

setInputFormat

public javax.media.Format setInputFormat(javax.media.Format format)
Set the input format

Specified by:
setInputFormat in interface javax.media.Codec
Parameters:
format - the new format
Returns:
null if not a video format, otherwise format

setOutputFormat

public javax.media.Format setOutputFormat(javax.media.Format format)
Set the output format

Specified by:
setOutputFormat in interface javax.media.Codec
Parameters:
format - the new format
Returns:
returns the format or null if not a video format

process

public int process(javax.media.Buffer input,
                   javax.media.Buffer output)
Process the buffer

Specified by:
process in interface javax.media.Codec
Parameters:
input - the input buffer
output - the output buffer
Returns:
returns BUFFER_PROCESSED_OK