|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectptolemy.kernel.util.NamedObj
ptolemy.kernel.InstantiableNamedObj
ptolemy.kernel.Entity
ptolemy.kernel.ComponentEntity
ptolemy.actor.AtomicActor
ptolemy.actor.TypedAtomicActor
ptolemy.actor.lib.Transformer
ptolemy.actor.lib.jai.JAIEdgeDetection
public class JAIEdgeDetection
An actor that does edge detection on a image. This is done by taking the image and separately convolving it with two different masks. The two results are squared, summed together, and square rooted to give the final image. The user may specify one, or both masks. A series of predefined masks are available for the user to use.
Red (cxh) |
Red (cxh) |
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ptolemy.kernel.Entity |
---|
Entity.ContainedObjectsIterator |
Field Summary | |
---|---|
private static int |
_BACKDIAGONAL
|
private static float[] |
_backDiagonalFilter
|
private static int |
_DIAGONAL
|
private static float[] |
_diagonalFilter
|
private javax.media.jai.KernelJAI |
_firstKernelJAI
The KernelJAI's that contain the masks to be used in edge detection. |
private int |
_firstMask
The choice of mask. |
private DoubleMatrixToken |
_firstMaskData
The ArrayTokens contained the the User Specified Mask Fields |
private static float[] |
_freiAndChenHorizontalFilter
|
private static float[] |
_freiAndChenVerticalFilter
|
private static int |
_FREICHEN_HORIZONTAL
|
private static int |
_FREICHEN_VERTICAL
|
private double[][] |
_initialMatrix
|
private static int |
_PREWITT_HORIZONTAL
|
private static int |
_PREWITT_VERTICAL
|
private static float[] |
_prewittHorizontalFilter
|
private static float[] |
_prewittVerticalFilter
|
private static int |
_ROBERTS_HORIZONTAL
|
private static int |
_ROBERTS_VERTICAL
|
private static float[] |
_robertsHorizontalFilter
|
private static float[] |
_robertsVerticalFilter
|
private javax.media.jai.KernelJAI |
_secondKernelJAI
|
private int |
_secondMask
|
private DoubleMatrixToken |
_secondMaskData
|
private static int |
_SOBEL_HORIZONTAL
|
private static int |
_SOBEL_VERTICAL
|
private static float[] |
_sobelHorizontalFilter
Prespecified masks that the user may use |
private static float[] |
_sobelVerticalFilter
|
private static int |
_TRANSPARENT
|
private static float[] |
_transparentFilter
|
private static int |
_USER_SPECIFIED
|
private static int |
_ZERO_FILTER
|
private static float[] |
_zeroFilter
|
StringAttribute |
firstMask
The following two parameters are used to specify the masks used for edge detection. |
StringAttribute |
secondMask
The mask used for edge detection. |
Parameter |
userSpecifiedFirstMask
The first user specified mask, and its corresponding x and y dimensions. |
Parameter |
userSpecifiedSecondMask
The second user specified mask, and its corresponding x and y dimensions. |
Fields inherited from class ptolemy.actor.lib.Transformer |
---|
input, output |
Fields inherited from class ptolemy.actor.AtomicActor |
---|
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested |
Fields inherited from class ptolemy.kernel.util.NamedObj |
---|
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS |
Fields inherited from interface ptolemy.actor.Executable |
---|
COMPLETED, NOT_READY, STOP_ITERATING |
Constructor Summary | |
---|---|
JAIEdgeDetection(CompositeEntity container,
java.lang.String name)
Construct an actor with the given container and name. |
Method Summary | |
---|---|
private javax.media.jai.KernelJAI |
_filterAssigner(int choice)
If the user chooses to use a prespecified mask, then this method will assign the mask values to a KernelJAI used in edge detection. |
private javax.media.jai.KernelJAI |
_maskFiller(DoubleMatrixToken matrix)
If a user decides not to use a prespecified mask, this method will return a KernelJAI filled with user specified values. |
private int |
_maskNumberer(java.lang.String maskName)
A convenience method to help in assinging masks. |
void |
attributeChanged(Attribute attribute)
Override the base class and set change private variables if the attribute corresponding to it has changed. |
void |
fire()
Fire this actor. |
Methods inherited from class ptolemy.actor.TypedAtomicActor |
---|
_addPort, _fireAt, _fireAt, attributeTypeChanged, clone, newPort, typeConstraintList, typeConstraints |
Methods inherited from class ptolemy.kernel.ComponentEntity |
---|
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName |
Methods inherited from class ptolemy.kernel.Entity |
---|
_description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName |
Methods inherited from class ptolemy.kernel.InstantiableNamedObj |
---|
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface ptolemy.actor.Actor |
---|
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList |
Methods inherited from interface ptolemy.actor.Executable |
---|
isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate |
Methods inherited from interface ptolemy.actor.Initializable |
---|
addInitializable, initialize, preinitialize, removeInitializable, wrapup |
Methods inherited from interface ptolemy.kernel.util.Nameable |
---|
description, getContainer, getDisplayName, getFullName, getName, getName, setName |
Methods inherited from interface ptolemy.kernel.util.Derivable |
---|
getDerivedLevel, getDerivedList, propagateValue |
Field Detail |
---|
public StringAttribute firstMask
public StringAttribute secondMask
firstMask
public Parameter userSpecifiedFirstMask
public Parameter userSpecifiedSecondMask
private DoubleMatrixToken _firstMaskData
private DoubleMatrixToken _secondMaskData
private javax.media.jai.KernelJAI _firstKernelJAI
private javax.media.jai.KernelJAI _secondKernelJAI
private int _firstMask
private int _secondMask
private double[][] _initialMatrix
private static final float[] _sobelHorizontalFilter
private static final float[] _sobelVerticalFilter
private static final float[] _robertsHorizontalFilter
private static final float[] _robertsVerticalFilter
private static final float[] _prewittHorizontalFilter
private static final float[] _prewittVerticalFilter
private static final float[] _freiAndChenHorizontalFilter
private static final float[] _freiAndChenVerticalFilter
private static final float[] _transparentFilter
private static final float[] _zeroFilter
private static final float[] _diagonalFilter
private static final float[] _backDiagonalFilter
private static final int _BACKDIAGONAL
private static final int _DIAGONAL
private static final int _FREICHEN_HORIZONTAL
private static final int _FREICHEN_VERTICAL
private static final int _PREWITT_HORIZONTAL
private static final int _PREWITT_VERTICAL
private static final int _ROBERTS_HORIZONTAL
private static final int _ROBERTS_VERTICAL
private static final int _SOBEL_HORIZONTAL
private static final int _SOBEL_VERTICAL
private static final int _TRANSPARENT
private static final int _USER_SPECIFIED
private static final int _ZERO_FILTER
Constructor Detail |
---|
public JAIEdgeDetection(CompositeEntity container, java.lang.String name) throws IllegalActionException, NameDuplicationException
container
- The container.name
- The name of this actor.
IllegalActionException
- If the actor cannot be contained
by the proposed container.
NameDuplicationException
- If the container already has an
actor with this name.Method Detail |
---|
public void attributeChanged(Attribute attribute) throws IllegalActionException
attributeChanged
in class NamedObj
attribute
- The attribute that changed.
IllegalActionException
- If the function is not recognized,
or if a contained method throws it.public void fire() throws IllegalActionException
fire
in interface Executable
fire
in class AtomicActor
IllegalActionException
- If a contained method throws
it.private javax.media.jai.KernelJAI _filterAssigner(int choice) throws IllegalActionException
IllegalActionException
- If the choice value is out of
range.private javax.media.jai.KernelJAI _maskFiller(DoubleMatrixToken matrix)
private int _maskNumberer(java.lang.String maskName) throws IllegalActionException
IllegalActionException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |