|
Bartosz Firyn (SarXos) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.github.sarxos.webcam.WebcamMotionDetector
public class WebcamMotionDetector
Webcam motion detector.
Field Summary | |
---|---|
static int |
DEFAULT_THREASHOLD
|
Constructor Summary | |
---|---|
WebcamMotionDetector(Webcam webcam)
Create motion detector with default parameters - threshold = 25, inertia = 0. |
|
WebcamMotionDetector(Webcam webcam,
int threshold)
Create motion detector with default parameter inertia = 0. |
|
WebcamMotionDetector(Webcam webcam,
int threshold,
int inertia)
Create motion detector. |
Method Summary | |
---|---|
boolean |
addMotionListener(WebcamMotionListener l)
Add motion listener. |
int |
getInterval()
|
WebcamMotionListener[] |
getMotionListeners()
|
int |
getMotionStrength()
|
Webcam |
getWebcam()
|
boolean |
isMotion()
|
boolean |
removeMotionListener(WebcamMotionListener l)
Removes motion listener. |
void |
setInterval(int interval)
|
void |
start()
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_THREASHOLD
Constructor Detail |
---|
public WebcamMotionDetector(Webcam webcam, int threshold, int inertia)
webcam
- web camera instancethreshold
- intensity threshold (0 - 255)inertia
- for how long motion is valid (seconds)public WebcamMotionDetector(Webcam webcam, int threshold)
webcam
- web camera instancethreshold
- intensity threshold (0 - 255)public WebcamMotionDetector(Webcam webcam)
webcam
- web camera instanceMethod Detail |
---|
public void start()
public void stop()
public boolean addMotionListener(WebcamMotionListener l)
l
- listener to add
public WebcamMotionListener[] getMotionListeners()
public boolean removeMotionListener(WebcamMotionListener l)
l
- motion listener to remove
public int getInterval()
public void setInterval(int interval)
public Webcam getWebcam()
public boolean isMotion()
public int getMotionStrength()
|
Bartosz Firyn (SarXos) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |