|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectedu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.abstraction.Abstractor
edu.berkeley.guir.ptk.abstraction.MotionAbstractor
Performs abstraction of PlanarImages from input.CamperInput
to determine if there is motion and how much motion has occurred in pixels.
In an IMAGE event, replaces the image object (DataObject) with three pieces of
data: a boolean MOTION that is true if there is motion; the AMOUNT_OF_MOTION,
which can be either MOTION_NONE, MOTION_LO, MOTION_MED, MOTION_HI; and the
AMOUNT_OF_MOTION_PIXELS, which is the number of pixels that have changed since
the last image (more precisely quantifies how much motion has occured). The
first of these data is saved as a DataSwitch, the last two of these data are
saved as DataNumber objects.
| Field Summary | |
protected int |
amount_of_motion
|
static int |
B
|
boolean |
debug_feedback
If true, the motion abstractor will show feedback on what it is doing: differenced images taken by the camera will be displayed. |
static int |
G
|
int |
motion_lo_pixels
Set this to customize the number of pixels below which the motion dector will to set the AMOUNT_OF_MOTION to MOTION_LO. |
int |
motion_med_pixels
Set this to customize the number of pixels below which the motion dector will to set the AMOUNT_OF_MOTION to MOTION_MED and above which the motion detector will set it to MOTION_HI. |
int |
motion_none_pixels
Set this to customize the number of pixels below which the motion dector will to set the AMOUNT_OF_MOTION to MOTION_NONE. |
protected static javax.media.jai.PlanarImage |
prevImage
|
static int |
R
|
protected static javax.media.jai.widget.ScrollingImagePanel |
sip
|
protected static javax.swing.JFrame |
systemDisplayFrame
|
| Fields inherited from class edu.berkeley.guir.ptk.abstraction.Abstractor |
data_ids_I_want, replace_data |
| Fields inherited from class edu.berkeley.guir.ptk.PTK |
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG |
| Constructor Summary | |
MotionAbstractor()
|
|
| Method Summary | |
protected int |
addMotionPixels(javax.media.jai.PlanarImage image)
Count all the non-black pixels in the image. |
protected javax.media.jai.PlanarImage |
convertToTiled(java.lang.Object dataSample)
Converts a Java image to a TiledImage, which is more memory efficient and allows random access to image pixels. |
void |
displayFeedback(javax.media.jai.widget.ScrollingImagePanel i)
|
boolean |
doAbstract(Event e,
History h)
Performs the abstraction of the event e as specified by the class that implements this interface. |
protected boolean |
isCloseToBlack(float[] pix)
|
boolean |
isThereMotion(java.lang.Object dataSample)
|
| Methods inherited from class edu.berkeley.guir.ptk.abstraction.Abstractor |
addMetadataIWant, canIAbstract, getAllMetadata, getFirstMetadata |
| Methods inherited from class edu.berkeley.guir.ptk.PTK |
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int R
public static final int G
public static final int B
protected static final javax.swing.JFrame systemDisplayFrame
protected static javax.media.jai.widget.ScrollingImagePanel sip
protected static javax.media.jai.PlanarImage prevImage
protected int amount_of_motion
public boolean debug_feedback
public int motion_none_pixels
public int motion_lo_pixels
public int motion_med_pixels
| Constructor Detail |
public MotionAbstractor()
| Method Detail |
public boolean doAbstract(Event e,
History h)
Abstractor
doAbstract in class Abstractore - h -
public boolean isThereMotion(java.lang.Object dataSample)
protected int addMotionPixels(javax.media.jai.PlanarImage image)
protected boolean isCloseToBlack(float[] pix)
protected javax.media.jai.PlanarImage convertToTiled(java.lang.Object dataSample)
public void displayFeedback(javax.media.jai.widget.ScrollingImagePanel i)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||