{"id":18928622,"url":"https://github.com/phishman3579/android-motion-detection","last_synced_at":"2025-04-15T14:31:36.147Z","repository":{"id":148065747,"uuid":"14545135","full_name":"phishman3579/android-motion-detection","owner":"phishman3579","description":"Android code to detection motion by comparing two images.","archived":false,"fork":false,"pushed_at":"2015-12-09T15:05:10.000Z","size":127,"stargazers_count":101,"open_issues_count":1,"forks_count":46,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-03-28T22:25:32.614Z","etag":null,"topics":["android","java","motion-detection"],"latest_commit_sha":null,"homepage":null,"language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phishman3579.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-20T02:58:49.000Z","updated_at":"2024-03-09T20:34:00.000Z","dependencies_parsed_at":"2023-04-13T21:27:11.435Z","dependency_job_id":null,"html_url":"https://github.com/phishman3579/android-motion-detection","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishman3579%2Fandroid-motion-detection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishman3579%2Fandroid-motion-detection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishman3579%2Fandroid-motion-detection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phishman3579%2Fandroid-motion-detection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phishman3579","download_url":"https://codeload.github.com/phishman3579/android-motion-detection/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249088785,"owners_count":21210863,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","java","motion-detection"],"created_at":"2024-11-08T11:26:46.936Z","updated_at":"2025-04-15T14:31:35.895Z","avatar_url":"https://github.com/phishman3579.png","language":"HTML","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=phishman3579%40gmail%2ecom\u0026lc=US\u0026item_name=Support%20open%20source\u0026item_number=AndroidMotionDetection\u0026currency_code=USD\u0026bn=PP%2dDonationsBF%3abtn_donateCC_SM%2egif%3aNonHosted"],"categories":[],"sub_categories":[],"readme":"android-motion-detection\n========================\n\nAndroid code to detection motion from by comparing two pictures.\n\n## Introduction\n\nAndroid code to detection motion from by comparing two pictures. It comes with an Activity that initializes a camera and grabs two pictures and compares them.\n\n* Created by Justin Wetherell\n* For questions use: http://groups.google.com/forum/#!forum/android-motion-detection\n* Google: http://code.google.com/p/android-motion-detection\n* Github: http://github.com/phishman3579/android-motion-detection\n* LinkedIn: http://www.linkedin.com/in/phishman3579\n* E-mail: phishman3579@gmail.com\n* Twitter: http://twitter.com/phishman3579\n\n## Support me with a donation\n\n\u003ca href=\"https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=phishman3579%40gmail%2ecom\u0026lc=US\u0026item_name=Support%20open%20source\u0026item_number=AndroidMotionDetection\u0026currency_code=USD\u0026bn=PP%2dDonationsBF%3abtn_donateCC_SM%2egif%3aNonHosted\" target=\"_new\"\u003e\u003cimg border=\"0\" alt=\"Donate to this project\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif\"\u003e\u003c/a\u003e\n\n## Details\n\nYou essentially have to override an onPreviewFrame(byte[] data, Camera cam) method and convert from the default YUV to RGB:\n\n    int[] rgb = ImageProcessing.decodeYUV420SPtoRGB(data, width, height);\n\nCreate an object which you'll use for motion detection code:\n\n    IMotionDetection detector = new RgbMotionDetection();\n\nCall the detect() method passing in the parameters obtained above.\n\n    boolean detected = detector.detect(rgb, width, height)\n\nIf the boolean \"detected\" variable is true then it has detected motion.\n\nThe 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.\n\nI 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.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphishman3579%2Fandroid-motion-detection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphishman3579%2Fandroid-motion-detection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphishman3579%2Fandroid-motion-detection/lists"}