I watched the Youtube video
Rolling Shutter Explained on the Cheap
by Matt Parker where he shows that you don't need to visit an actual
aeroplane with expensive slow-motion cameras to demonstrate the rolling shutter
effect on aircraft propellors. He shows that you can do it with a model
propellor connected to an electric drill — then some Python code to
process the video to emulate the rolling shutter effect and to add
a green line scanning down the image.
Well, I thought, let's do the whole thing in Python.
Here's 30 lines of Python, using the Numpy and Pillow libraries and
ffmpeg to create the video:
Here's another version that uses Tkinter to display the video to your
screen in real time rather than making a video. It needs a fast(ish) PC to
display smoothly:
Hmm... Not necessarily. If you knew it was a constant rate, I think you should be able to approximate it from the input if you can also make some assumptions about the shape of the real propeller (e.g. radial symmetry). Now I'm curious how well it would work
Good point. You can at least know a multiple of the rotation rate if you know the shutter speed. I wonder if 4 rotor objects are always discernable from 5-rotor ones?
Almost certainly based on the number of blobs you see and rate they move, at least I think. Also I think you can be pretty confident in the multiple by putting some bounds on the speed (propeller tip not going faster than speed of sound, blade not longer than a certain amount)
If you have a complex plane Z, and plot the absolute value |Z| in the third dimension, what do you have? The further from the origin, the greater its height, so it's a cone.
Cut a section through the cone at a height of H: |Z| = H and you have a circle.
And |Z| < H is a solid disk in "boolean" terms.
A cone offset from the origin by A is |Z - A| .
Consider adding the heights of two cones together then cut through them:
|Z - A| + |Z - B| < H ...it's perhaps not entirely obvious that they combine to form a solid ellipse, but they do.
Put the focus B back at the origin... |Z - A| + |Z| < H
Then spin the focus A around the origin in 6 steps and you have 6 ellipses.
Combine them with boolean logic and you have a propeller.
I watched the Youtube video Rolling Shutter Explained on the Cheap by Matt Parker where he shows that you don't need to visit an actual aeroplane with expensive slow-motion cameras to demonstrate the rolling shutter effect on aircraft propellors. He shows that you can do it with a model propellor connected to an electric drill — then some Python code to process the video to emulate the rolling shutter effect and to add a green line scanning down the image.
Well, I thought, let's do the whole thing in Python.
Here's 30 lines of Python, using the Numpy and Pillow libraries and ffmpeg to create the video:
https://github.com/dafarry/rolling-shutter-effect-python/blob/master/rolling-shutter-makevideo.py
Here's another version that uses Tkinter to display the video to your screen in real time rather than making a video. It needs a fast(ish) PC to display smoothly:
https://github.com/dafarry/rolling-shutter-effect-python/blob/master/rolling-shutter-tkinter.py
SamF111 11 points · Sep 2019
Any thoughts on how to undo it with the known shutter rate and the output of your analysis as an input?
s3cur1ty 14 points · Sep 2019
This post has been removed.
Synaps4 9 points · Oct 2019
Yep, you would need to match your shutter rate to the rotation of the object.
bradfordmaster 5 points · Oct 2019
Hmm... Not necessarily. If you knew it was a constant rate, I think you should be able to approximate it from the input if you can also make some assumptions about the shape of the real propeller (e.g. radial symmetry). Now I'm curious how well it would work
Synaps4 4 points · Oct 2019
Good point. You can at least know a multiple of the rotation rate if you know the shutter speed. I wonder if 4 rotor objects are always discernable from 5-rotor ones?
bradfordmaster 1 points · Oct 2019
Almost certainly based on the number of blobs you see and rate they move, at least I think. Also I think you can be pretty confident in the multiple by putting some bounds on the speed (propeller tip not going faster than speed of sound, blade not longer than a certain amount)
flashman 2 points · Oct 2019
Well that's only going to get you a video with a single row in each frame, isn't it?
[deleted] 1 points · Oct 2019
You can probably learn a lot about the propeller from that.
GickRick 1 points · Oct 2019
Man you're the goat✊🙌🙌
[deleted] 1 points · Oct 2019
May you please explain the math on this? Especially the use of complex numbers for the propeller
Swipecat [OP] 3 points · Oct 2019
If you have a complex plane Z, and plot the absolute value
|Z|in the third dimension, what do you have? The further from the origin, the greater its height, so it's a cone.Cut a section through the cone at a height of H:
|Z| = Hand you have a circle.And
|Z| < His a solid disk in "boolean" terms.A cone offset from the origin by A is
|Z - A|.Consider adding the heights of two cones together then cut through them:
|Z - A| + |Z - B| < H...it's perhaps not entirely obvious that they combine to form a solid ellipse, but they do.Put the focus B back at the origin...
|Z - A| + |Z| < HThen spin the focus A around the origin in 6 steps and you have 6 ellipses.
Combine them with boolean logic and you have a propeller.
[deleted] 1 points · Oct 2019
Thanks!