-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4654542
commit 07b246a
Showing
1 changed file
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,10 @@ Android code to detection motion from by comparing two pictures. It comes with a | |
* E-mail: [email protected] | ||
* Twitter: http://twitter.com/phishman3579 | ||
|
||
## Support me with a donation | ||
|
||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=phishman3579%40gmail%2ecom&lc=US&item_name=Support%20open%20source&item_number=AndroidMotionDetection¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_SM%2egif%3aNonHosted" target="_new"><img border="0" alt="Donate to this project" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif"></a> | ||
|
||
## Details | ||
|
||
You essentially have to override an onPreviewFrame(byte[] data, Camera cam) method and convert from the default YUV to RGB: | ||
|
@@ -34,7 +38,3 @@ If the boolean "detected" variable is true then it has detected motion. | |
The RGB detection code is located in RgbMotionDetection.java class. The image processing code is located in ImageProcessing.java static class. The Activity to tie it all together is in MotionDetectionActivity.java. | ||
|
||
I have created a MotionDetection class that detects motion comparing RGB values called RgbMotionDetection.java, a class that detects motion comparing Luminance values called LumaMotionDetection.java, and a class that detects motion comparing avergae Luminance values in regions called AggregateLumaMotionDetection.java. | ||
|
||
## Support me with a donation | ||
|
||
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=phishman3579%40gmail%2ecom&lc=US&item_name=Support%20open%20source&item_number=AndroidMotionDetection¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted" target="_new"><img border="0" alt="Donate to this project" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_LG.gif"></a> |