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.
17 thoughts on “Computer Vision Extracts Lightning From Footage”
couldn’t you do something like just pull the peak white values from histogram data?
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.
That would not work in all conditions. It would be useful if you were trying to extract lightning from still images.
” 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 !!!
Yea exactly 1.21 gigawatts. Now where did I hear that.
You are right, there is way more energy in a lightning strike:
Interestingly the same Wikipedia article might be the source of the false statement… As mentioned there an inventor demonstrate in an >experimentsmall ARTIFICIAL lighting< that he could power a 60 Watt lightbulb for 20 min…
*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.
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? …. ;-)
I think it can only power an incandescent bulb for about 10ms at which point there is no longer an incandescent bulb.
The quote oft bandied about is a 60W bulb for 6 months, so I dunno if it was misheard as 60 mins instead of 6 months sometime.
About 56 houses for one day.
10^9 joules in a lightning strike… that’s quite some incandescent light bulb you have there, Bryan! :o)
“While we may not gain a deeper scientific appreciation of lightning anytime” with that kind of article …
Wow facts are way off all around. 45 Hz is not close. Try somewhere are 100 Hz strike average.
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.
can i use something like this to
read the duration on a flashing led from a video? like how it pulses so i can recreate the flashing led sequences
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…
Please be kind and respectful to help make the comments section excellent. (Comment Policy)