Giter Site home page Giter Site logo

kelvins / long-exposure Goto Github PK

View Code? Open in Web Editor NEW
41.0 4.0 15.0 26 KB

:movie_camera: Creates a long exposure effect using Python and OpenCV

Home Page: https://medium.com/@kelvin_sp/long-exposure-with-python-and-opencv-a242e1f1e42f

Python 96.67% Makefile 3.33%
image-processing opencv python video

long-exposure's Introduction

Long exposure with OpenCV and Python

Build Status

This project creates long exposure-like images from an input video using Python and OpenCV. It computationally simulates the long exposure photography effect.

Long-exposure photography:

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.

Usage

The 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:

$ python src/long_exposure.py local-video /home/user/videos/video.mp4 /home/user/images/long_exp.png -s 5

If you have doubts you can call for help:

python src/long_exposure.py --help

Environment

This 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:

pipenv install --dev
pipenv shell

Tests

We can run the tests using pytest directly or using the Makefile, for example:

make runtests

Input/Output

Input (video) Output (image)
Input Output
Input Output

References

long-exposure's People

Contributors

dependabot[bot] avatar kelvins avatar pandermatt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

long-exposure's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.