{"id":24956279,"url":"https://github.com/daschr/cl-backgen","last_synced_at":"2025-10-05T12:43:56.363Z","repository":{"id":190359607,"uuid":"342938297","full_name":"daschr/cl-backgen","owner":"daschr","description":"Generate background images from videos using opencl and pixel averages.","archived":false,"fork":false,"pushed_at":"2021-02-27T19:17:52.000Z","size":6,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T20:17:10.516Z","etag":null,"topics":["background-subtraction","computer-vision","opencl","python","videos"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/daschr.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,"governance":null}},"created_at":"2021-02-27T19:16:17.000Z","updated_at":"2025-02-23T21:46:57.000Z","dependencies_parsed_at":"2023-08-24T09:40:19.982Z","dependency_job_id":null,"html_url":"https://github.com/daschr/cl-backgen","commit_stats":null,"previous_names":["daschr/cl-backgen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/daschr/cl-backgen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daschr%2Fcl-backgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daschr%2Fcl-backgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daschr%2Fcl-backgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daschr%2Fcl-backgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/daschr","download_url":"https://codeload.github.com/daschr/cl-backgen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/daschr%2Fcl-backgen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278457485,"owners_count":25989954,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["background-subtraction","computer-vision","opencl","python","videos"],"created_at":"2025-02-03T06:28:17.315Z","updated_at":"2025-10-05T12:43:56.344Z","avatar_url":"https://github.com/daschr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Background Generator\n\n* generates a static background image from videos\n* uses a opencl kernel which calculates pixel changes by comparing a frame with an history of frames \n* optional video deflickering (`--deflicker`) before backsub processing \n \n# Requirements\n\n## Windows\n\n* install [python](https://www.python.org/downloads/windows/)\n* `pip install numpy opencv`\n* install pyopencl\n\t* `pip install pyopencl` or \n\t* download the right wheel from [here](https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyopencl) and f.e. `pip install pyopencl‑2021.1+cl21‑cp39‑cp39‑win_amd64.whl`\n\n## Linux\n\n* `pip install -r requirements.txt`\n\n# Usage\n\n* `python backgen.py --input \u003cvideo file or url or camera\u003e` -- generates a background image with default weight and threshold\n```\nusage: backgen.py [-h] [--input INPUT] [--output OUTPUT] [--vidoutput VIDOUTPUT] [--weight WEIGHT] [--threshold THRESHOLD] [--silent [SILENT]] [--sidebyside [SIDEBYSIDE]] [--deflicker [DEFLICKER]]\n\nThis program generates a static background image from videos using an opencl kernel which calculates pixel values based on averages.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --input INPUT         Path to a video or a sequence of image.\n  --output OUTPUT       Save the last frame to this path\n  --vidoutput VIDOUTPUT\n                        Write video to path\n  --weight WEIGHT       the weight which a new image gets merged into (0;inf]\n  --threshold THRESHOLD\n                        threshold which an pixel is seen as changed [1;255]\n  --silent [SILENT]     silent mode, do not show images\n  --sidebyside [SIDEBYSIDE]\n                        show the generated background and the newest frame side by side\n  --deflicker [DEFLICKER]\n                        deflickers frames before processing them with backsub\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaschr%2Fcl-backgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdaschr%2Fcl-backgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdaschr%2Fcl-backgen/lists"}