|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjosx.vision.VisionEffect
josx.vision.MotionDetectionEffect
Motion detection effect. The engine has two steps. First the input image and the reference image (which is the image from the previous frame) is compared. Whenever a pixel has changed consideribly (determined by the threshold variable) a internal black-white-red image is marked (at the same exact location where the change occured). Therefore in the first step, the internal black-white-red image is has lit up clusters in the space where a change has occured.
The next step is to eliminate these clusters that are too small, but still
appeared in our black-white-red image. Only the big clusters are left (and
are colored red). During this process we keep a track of couunt of the big
clusters.
If the count is greater than blob_threshold then the input frame is
determined to have consideribly motion as to the previous frame.
Many of the ideas have been taken from
Field Summary | |
int |
blob_threshold
Our threshold for determinig if the input image has enough motion. |
boolean |
debug
Turn debugging on. |
int |
OPTIMIZATION
Optimization. |
int |
threshold
The threshold for determing if the pixel at a certain location has changed consideribly. |
int |
THRESHOLD_INC
By what value you should increment. |
int |
THRESHOLD_INIT
The initial threshold setting. |
int |
THRESHOLD_MAX
Maximum threshold setting. |
Fields inherited from class josx.vision.VisionEffect |
inputFormat, inputFormats, outputFormat, outputFormats |
Constructor Summary | |
MotionDetectionEffect()
Initialize the Motion effect plugin. |
Method Summary | |
Object[] |
getControls()
Getter for array on one control for adjusing motion threshold and setting debug. |
String |
getName()
get the name of the effect |
int |
process(Buffer inBuffer,
Buffer outBuffer)
Process the image, detecting motion in the regions |
Methods inherited from class josx.vision.VisionEffect |
close, getControl, getSupportedInputFormats, getSupportedOutputFormats, matches, open, reset, setInputFormat, setOutputFormat, validateByteArraySize |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
public int OPTIMIZATION
public int THRESHOLD_MAX
public int THRESHOLD_INC
public int THRESHOLD_INIT
public int threshold
public int blob_threshold
public boolean debug
Constructor Detail |
public MotionDetectionEffect()
Method Detail |
public int process(Buffer inBuffer, Buffer outBuffer)
inBuffer
- the input BufferoutBuffer
- the output Buffer
public String getName()
public Object[] getControls()
getControls
in class VisionEffect
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |