|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.Observable
dlife.vision.filter.Filter
public abstract class Filter
Abstract base class for all filters that can be used for image processing. Processing performed by filters includes color matching, blobification, smoothing, etc... A chain of filters can be applied to the raw camera image. Each filter will be able to be turned on or off. A filter that is on will have its filter() method invoked on the camera image. A filter that is not on will not affect the camera image.
This Abstract class provides functionality that is common to all Filters. In particular:
All Filter subclasses must implement:
VisionEventDescriptors class should be used to indicate
the type of change that has occurred. Filters will typically use the
constants: FILTER_EFFECT_MODIFIED and FILTER_DATA_UPDATED.
Filters may also receive notification of click/drag events on either the raw
or filtered video windows (or both). In order to do so the Filter subclass
must also implement the FilterMouseHandler
interface.
| Constructor Summary | |
|---|---|
Filter()
Constructor for a new Filter. |
|
| Method Summary | |
|---|---|
protected abstract FilterGUI |
createGUIObject()
Build the GUI for this Filter and return a reference to it. |
abstract BufferedImage |
filter(BufferedImage frame)
Filter the image contained in the provided BufferedImage. |
abstract String |
getCode(String name)
Get a String containing the Java code that would be necessary to create this Filter in its current state and add it to the specified VisionClient. |
FilterGUI |
getGUI()
Get a GUI that allows the user to control the parameters of this Filter. |
int |
getID()
Get the ID number of this filter. |
boolean |
isOn()
Return true if this Filter is on (i.e. |
void |
turnOn(boolean on)
Turn this Filter on or off. |
| Methods inherited from class java.util.Observable |
|---|
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Filter()
| Method Detail |
|---|
public int getID()
public boolean isOn()
public void turnOn(boolean on)
on - true to turn this Filter on, false to turn it off.protected abstract FilterGUI createGUIObject()
public FilterGUI getGUI()
If the GUI for the filter has not yet been created, this method invokes the createGUIObject method to create the GUI and a reference to the GUI is returned. If the GUI has already been created then this method simply returns a reference to the GUI.
public abstract String getCode(String name)
name - the name of the Camera device to which the generated code
should add the Filter.
public abstract BufferedImage filter(BufferedImage frame)
frame - the BufferedImage to be filtered.
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||