{"id":19188914,"url":"https://github.com/kelvins/long-exposure","last_synced_at":"2025-07-08T16:34:22.646Z","repository":{"id":52674351,"uuid":"100420309","full_name":"kelvins/long-exposure","owner":"kelvins","description":":movie_camera: Creates a long exposure effect using Python and OpenCV","archived":false,"fork":false,"pushed_at":"2021-10-16T14:28:57.000Z","size":26,"stargazers_count":41,"open_issues_count":1,"forks_count":15,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-20T06:35:02.563Z","etag":null,"topics":["image-processing","opencv","python","video"],"latest_commit_sha":null,"homepage":"https://medium.com/@kelvin_sp/long-exposure-with-python-and-opencv-a242e1f1e42f","language":"Python","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/kelvins.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}},"created_at":"2017-08-15T21:20:30.000Z","updated_at":"2024-07-30T07:20:40.000Z","dependencies_parsed_at":"2022-08-22T03:41:09.300Z","dependency_job_id":null,"html_url":"https://github.com/kelvins/long-exposure","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/kelvins%2Flong-exposure","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Flong-exposure/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Flong-exposure/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvins%2Flong-exposure/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelvins","download_url":"https://codeload.github.com/kelvins/long-exposure/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989943,"owners_count":21836665,"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":["image-processing","opencv","python","video"],"created_at":"2024-11-09T11:26:42.307Z","updated_at":"2025-05-08T02:47:44.961Z","avatar_url":"https://github.com/kelvins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Long exposure with OpenCV and Python\n\n[![Build Status](https://travis-ci.org/kelvins/long-exposure.svg?branch=master)](https://travis-ci.org/kelvins/long-exposure)\n\nThis project creates long exposure-like images from an input video using Python and OpenCV. It computationally simulates the long exposure photography effect.\n\n[Long-exposure photography][1]:\n\n\u003e Long-exposure, time-exposure, or slow-shutter photography involves using a long-duration shutter speed to sharply capture the stationary elements of images while blurring, smearing, or obscuring the moving elements. Long-exposure photography captures one element that conventional photography does not: an extended period of time. The paths of bright moving objects become clearly visible. Clouds form broad bands, head and tail lights of cars draw bright streaks, stars leave trails in the sky, and water waves appear smoothened. Only bright objects will leave visible trails, whereas dark objects usually disappear. Boats in long exposures will disappear during daytime, but will draw bright trails from their lights at night.\n\n## Usage\n\nThe usage is very simple, we just need to call the script passing a desired operation (e.g. `local-video`), the video path, the output image path and the step (optional), for example:\n\n```bash\n$ python src/long_exposure.py local-video /home/user/videos/video.mp4 /home/user/images/long_exp.png -s 5\n```\n\nIf you have doubts you can call for help:\n\n```bash\npython src/long_exposure.py --help\n```\n\n## Environment\n\nThis project uses `pipenv` so to set up the environment you need to make sure you have `pipenv` installed and run the following commands to install the dependencies and activate the virtual environment:\n\n```bash\npipenv install --dev\npipenv shell\n```\n\n## Tests\n\nWe can run the tests using `pytest` directly or using the `Makefile`, for example:\n\n```bash\nmake runtests\n```\n\n## Input/Output\n\n| **Input (video)** | **Output (image)** |\n|:---------:|:----------:|\n| ![Input](http://i.imgur.com/ji8h6FK.jpg) | ![Output](http://i.imgur.com/UXVCLIE.jpg) |\n| ![Input](http://i.imgur.com/l97V6Cm.jpg) | ![Output](http://i.imgur.com/oPedXbB.jpg) |\n\n## References\n\n- **Long exposure with OpenCV and Python**. Adrian Rosebrock.\nhttp://www.pyimagesearch.com/2017/08/14/long-exposure-with-opencv-and-python/\n\n- **Long-exposure photography**. https://en.wikipedia.org/wiki/Long-exposure_photography\n\n  [1]: https://en.wikipedia.org/wiki/Long-exposure_photography\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvins%2Flong-exposure","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelvins%2Flong-exposure","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvins%2Flong-exposure/lists"}