{"id":15160999,"url":"https://github.com/slangborgh16/motion-extraction","last_synced_at":"2025-04-07T21:25:16.753Z","repository":{"id":212740450,"uuid":"731699479","full_name":"Slangborgh16/motion-extraction","owner":"Slangborgh16","description":"C++ Motion Extraction with OpenCV","archived":false,"fork":false,"pushed_at":"2023-12-15T23:09:19.000Z","size":31147,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T22:49:47.027Z","etag":null,"topics":["cpp","motion","motion-extraction","opencv"],"latest_commit_sha":null,"homepage":"https://www.youtube.com/watch?v=NSS6yAMZF78","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Slangborgh16.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-14T17:05:43.000Z","updated_at":"2024-10-08T01:36:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"f4d9a9cb-bb32-4ee1-8158-e38c78f7039b","html_url":"https://github.com/Slangborgh16/motion-extraction","commit_stats":{"total_commits":6,"total_committers":1,"mean_commits":6.0,"dds":0.0,"last_synced_commit":"3c101cf22834bd3962173b2adcf839d5b04a268b"},"previous_names":["slangborgh16/motion-extraction"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slangborgh16%2Fmotion-extraction","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slangborgh16%2Fmotion-extraction/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slangborgh16%2Fmotion-extraction/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Slangborgh16%2Fmotion-extraction/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Slangborgh16","download_url":"https://codeload.github.com/Slangborgh16/motion-extraction/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247731155,"owners_count":20986605,"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":["cpp","motion","motion-extraction","opencv"],"created_at":"2024-09-26T23:43:51.241Z","updated_at":"2025-04-07T21:25:16.728Z","avatar_url":"https://github.com/Slangborgh16.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# motion-extraction\n\n## About\nThis is a C++ implementation of YouTuber Posy's [motion extraction method](http://www.youtube.com/watch?v=NSS6yAMZF78) using OpenCV. It works by playing the video and a duplicate of the video at the same time. This duplicate is inverted and offset by a user-defined number of frames, which leaves only the moving parts of the video visible. Shorter offsets show fast changes, while longer offsets show slower ones. This program currently supports the basic motion extraction as well as overlaying the isolated motion on top of the base video.  \n\u003e I have only tested this program on a RaspberryPi 3B+ (for a class project), and it can take quite a while to run. Better hardware should have no trouble running this program.\n\n![Comparison of original video and motion extraction](extras/comparison.gif)  \nComparison of original video (left), basic motion extraction (center), and overlay (right). The high quality videos can be found in the `extras` folder.\n\n\u003e \"[Two-Horned Chameleon](https://commons.wikimedia.org/wiki/File:Two-Horned_Chameleon.webm)\" by [Raoul Kopacka](https://vimeo.com/raoulkopacka) is licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) / Cropped and trimmed from original video\n\n## Requirements\nThis project has only two requirements:\n- [OpenCV](https://github.com/opencv/opencv)\n- [CMake](https://cmake.org/)\n```bash\nsudo apt install libopencv-dev cmake\n```\n\n## Building\n```bash\ngit clone https://github.com/Slangborgh16/motion-extraction.git\ncd motion-extraction\ncmake .\nmake\n```\n\n## Positional Arguments\n|**Argument**|**Description**|\n|---|---|\n|Input Path|Path to the input video **(Only supports MP4)**|\n|Output Path|Path to save output video to **(Only supports MP4)**|\n\n## Options\n|**Option**|**Description**|**Required**|\n|---|---|---|\n|-f, --frames|Number of frames to offset video by|Yes (Unless `-s` is provided)|\n|-s, --seconds|Number of seconds to offset video by|Yes (Unless `-f` is provided)|\n|-o, --overlay|Overlay the extracted motion over original video|No|\n|-h, --help|Display the help message|No|\n\n`--frames` and `--seconds` are mutually exclusive options. Only use one or the other.  \nSetting either `--frames` or `--seconds` to 0 will show changes over the course of the whole video.\n\n## Usage Examples\nExtract motion with a 1 second offset:\n```bash\n./MotionExtraction extras/chameleon.mp4 output.mp4 -s 1\n```\n\nExtract motion with a 2 frame offset and enable overlay:\n```bash\n./MotionExtraction extras/chameleon.mp4 output_overlay.mp4 -f 2 -o\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslangborgh16%2Fmotion-extraction","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslangborgh16%2Fmotion-extraction","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslangborgh16%2Fmotion-extraction/lists"}