Computer Vision Extracts Lightning From Footage

Lightning is one of the more mysterious and fascinating phenomenon on the planet. Extremely powerful, but each strike on average only has enough energy to power an incandescent bulb for an hour. The exact mechanism that starts a lightning strike is still not well understood. Yet it happens 45 times per second somewhere on the planet. While we may not gain a deeper scientific appreciation of lightning anytime soon, but we can capture it in various photography thanks to this project which leverages computer vision machine learning to pull out the best frames of lightning.

The project’s creator, [Liam], built this as a tool for stormchasers and photographers so that they can film large amounts of time and not have to go back through their footage manually to pull out the frames with lightning strikes. The project borrows from a similar project, but this one adds Python 3 capabilities and runs on a tiny netbook for more easy field deployment. It uses OpenCV for object recognition, using video files as the source data, and features different modes to recognize different types of lightning.

The software is free and open source, and releases are supported for both Windows and Linux. So far, [Liam] has been able to capture all kinds of electrical atmospheric phenomenon with it including lightning, red sprites, and elves. We don’t see too many projects involving lightning around here, partly because humans can only generate a fraction of the voltage potential needed for the average lightning strike.

16 thoughts on “Computer Vision Extracts Lightning From Footage

    1. Yes but also no. Sometimes, your footage might be generally bright, or you may be using footage from a dash camera that has lots of weird bright spots. By using the difference between one frame and another, you reduce the odds of that error significantly.

  1. ” but each strike on average only has enough energy to power an incandescent bulb for an hour. ”
    Where in the world did you come up with that ridiculous statement. There is far, far ,far more energy in one strike !!!

      1. *An average bolt of lightning is about 15 C (coulombs), which would be in and around the same order of magnitude for the number of electrons that flows in a non-rechargeable battery during it’s entire lifetime.

        If you could 100% capture all the potential energy before it was released by those electrons as they travel from very high up in the atmosphere down to earth, that would be a totally different story. But how do you capture energy that is normally released as an electromagnetic pulse of X-rays, ultraviolet light, visible light and radio waves and the explosively expanding super heated air which causes the thunder. By the time the electrons reach earth where they could be captured most of the potential energy is already used.

        * https://en.wikipedia.org/wiki/Lightning#Positive_and_negative_lightning

  2. How do you connect a decent size Leyden jar to a netbook though, and what’s the point of the small machine when you need storage you’ll carry on a truck? …. ;-)

  3. I actually took a stroll through the python code and it doesn’t use OpenCV for object recognition at all. It uses OpenCV to read/write frames from/to video and a few color processing functions.

  4. Looking at comments… Jeeeeez, folks, almost all are critical, judgmental and negative. What don’t you appreciate somebody spent his spare time to do something you may use for free. You don’t like it, Norman? GTFO! Or maybe you can do a better version? No? Wow, so you guys only know how to use mouse? That’s what I thought so…

Leave a Reply to MikeCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.