public interface WebcamMotionDetectorAlgorithm
WebcamMotionDetectorDefaultAlgorithm
is used.Modifier and Type | Method and Description |
---|---|
boolean |
detect(java.awt.image.BufferedImage previous,
java.awt.image.BufferedImage current)
Detects motion by comparison of the two specified images content.
|
java.awt.image.BufferedImage |
filter(java.awt.image.BufferedImage original)
WebcamMotionDetector calls this method for each image used as parameter of the method
detect(BufferedImage, BufferedImage) . |
double |
getArea()
Get percentage fraction of image covered by motion.
|
java.awt.Point |
getCog()
Get motion center of gravity.
|
int |
getMaxPoints()
Get the current max amount of points that can be detected at one time
|
int |
getPointRange()
Get the current minimum range between each point
|
java.util.ArrayList<java.awt.Point> |
getPoints()
Returns the currently stored points that have been detected
|
void |
setDoNotEngageZones(java.util.List<java.awt.Rectangle> bounds)
Set list of the rectangular zones where motion detection should be ignored.
|
void |
setMaxPoints(int i)
Set the max amount of points that can be detected at one time
|
void |
setPointRange(int i)
Set the minimum range between each point detected
|
java.awt.image.BufferedImage filter(java.awt.image.BufferedImage original)
detect(BufferedImage, BufferedImage)
. Implementation may transform the original
image and prepare it for comparison of two images. May return the same instance if no there
is no need to transform.original
- imageboolean detect(java.awt.image.BufferedImage previous, java.awt.image.BufferedImage current)
filter(BufferedImage)
method was called for both specified images.previous
- current
- java.awt.Point getCog()
double getArea()
void setPointRange(int i)
i
- the range to setvoid setMaxPoints(int i)
i
- The amount of points that can be detectedint getPointRange()
int getMaxPoints()
java.util.ArrayList<java.awt.Point> getPoints()
void setDoNotEngageZones(java.util.List<java.awt.Rectangle> bounds)
bounds
- the list of rectangles to ignoreCopyright © 2012-2018 Bartosz Firyn (SarXos). All Rights Reserved.