Code Monkey home page Code Monkey logo

lightning-analyzer's Introduction

Lightning Analyzer

A computer vision program to extract lightning strikes! ⚡

Contributors Forks Stargazers MIT License


Lightning Strikes!

Lightning Key Frame Extraction Notebook

A Jupyter Notebook that extracts lightning images from videos of storms! :lightning:

Table of Contents

  1. About The Project
  2. Design
  3. Instructions
  4. License
  5. Contact
  6. Acknowledgments

About The Project

Sometimes I like to set up my camera during storms, but watching hours of footage after a lightning storm is time consuming and not very fun. I went to find an existing script to perform this task, and found one written in Python 2 by programmer and mad scientist Saulius Lukse. I converted the handy script to Python 3, and fit the whole thing into a Jupyter notebook for easy access.

Built With

Design

Currently, the notebook takes a video and uses OpenCV to extract frames and dectect a difference between frames. If the difference exedes the threshold, then the image passes and is saved as a jpg. You can tune the threshold to suit your individual video; on a ten minute video, this program can extract less than a hundred frames or several thousand, depending on the threshold.

Future design should be a standalone program, so that stormchasers don't have to wrangle with software as much.

Instructions

First, create a new environment in Anaconda and activate it. Install libopencv, opencv, py-opencv, and pillow to the new enviroment.

Next, create a folder with a lightning video inside; this folder will be filled with images by the lightning frame extractor.

Then, open the lightning extractor notebook. Set the filename to match your lightning video filename; on Linux,

filename = '/home/user/Videos/Camera/lightning.mp4'

Finally, set an appropriate threshold for your video. On the example video, the optimum threshold is around 500,000; the higher the threshold, the faster the process will run and the less output images you will get. You will have to experiment to find the best threshold, but starting high and going lower is the best approach. Once the threshold is set, run the notebook and wait a bit. The program will take a few minutes to run.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Liam Plybon - [email protected]

Project Link: https://github.com/blablabliam/Lightning-Analyzer

Acknowledgments

lightning-analyzer's People

Contributors

blablabliam avatar

Watchers

 avatar  avatar

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.