|
||||||||||
| 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.
| 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. |
protected void |
detect()
|
int |
getInterval()
|
WebcamMotionListener[] |
getMotionListeners()
|
int |
getMotionStrength()
|
Webcam |
getWebcam()
|
boolean |
isMotion()
|
Thread |
newThread(Runnable runnable)
|
boolean |
removeMotionListener(WebcamMotionListener l)
Removes motion listener. |
void |
setInterval(int interval)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 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 instance| Method Detail |
|---|
public void start()
public void stop()
protected void detect()
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()
public Thread newThread(Runnable runnable)
newThread in interface ThreadFactory
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||