Skip to content

Commit

Permalink
Add some usable methods in WebcamMotionEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
sarxos committed Oct 12, 2014
1 parent 1e7b4a6 commit 2ebe58d
Showing 1 changed file with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ public WebcamMotionEvent(WebcamMotionDetector detector, double strength, Point c
}

/**
* Get percentage fraction of image covered by motion. 0 is no motion on image, and 100 is full
* image covered by motion.
* Get percentage fraction of image covered by motion. 0 is no motion on
* image, and 100 is full image covered by motion.
*
* @return Motion area
*/
Expand All @@ -44,4 +44,13 @@ public double getArea() {
public Point getCog() {
return cog;
}

public Webcam getWebcam() {
return ((WebcamMotionDetector) getSource()).getWebcam();
}

@Override
public WebcamMotionDetector getSource() {
return (WebcamMotionDetector) super.getSource();
}
}

0 comments on commit 2ebe58d

Please sign in to comment.