Magic Lantern Forum

Using Magic Lantern => Hardware and Accessories => Topic started by: dream951 on May 18, 2022, 11:03:51 PM

Title: Gyroscope/accelerometer video stabilization for DSLR
Post by: dream951 on May 18, 2022, 11:03:51 PM
Hi guys!
Recently, I found a very interesting thing on the vastness of Youtube! Video stabilization for DSLR cameras based on data from the gyroscope and accelerometer.
https://youtu.be/lP9N8CuIBNs?list=LL
There was already a commercial version called Stead XP, but it is too expensive, and another method is much cheaper (around 20$) with the same results.
The point is to install the FPV flight controller on the camera body so that during video shooting it records data about camera movements, and then based on them it stabilizes the frame with reference to camera position data, and not the image, which will remove stabilization artifacts as in Warp Stabilizer in PP.
Following the instructions, I ordered everything I needed, made all the buttons and the case, and used the Gyroflow program. The result impressed me, with proper skill, the stabilization is excellent. Shaking from hands when shooting standing removes even by 50 mm, the result is generally excellent at 24. Without thinking twice, I did a shooting test while running and it also turned out to be quite good. And also this method perfectly removes the jelly effect from the rolling shutter, and the strength of the adjustment depends on the strength of the movement - this is magic. This all takes shooting to a new level!
The videos will be below the link, if anyone is interested, then write and I'll tell you everything.
Enjoy!

P.S. I use 5D3 1.2.3 RAW 1920x1080 14-bit lossless + dual iso

https://dropmefiles.com/XudMF (https://dropmefiles.com/XudMF)
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: dualmp on June 06, 2022, 03:50:12 AM
Interesting! I suppose this method will work with all cameras? I am using a Samsung NX1 as well as a 5D3.
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: Ant123 on June 09, 2022, 02:16:36 PM
EOS M3 has builtin event procedure "EnableAcceleLogWrite" which creates the "Accelelog0.csv" file (Accelelog1.csv, Accelelog2.csv, Accelelog3.csv, etc) containing the following data:

time, x_axis, y_axis, z_axis
0, 2066, 1029, 2036
20, 2065, 1031, 2038
40, 2067, 1036, 2038
60, 2067, 1029, 2042
80, 2067, 1027, 2042
.
.
.
537380, 3074, 2003, 1986
537400, 3074, 2004, 1986
537420, 3074, 2004, 1985
537440, 3074, 2004, 1984
537460, 3074, 2004, 1984
537480, 3076, 2003, 1988


Probably it can be used on modern cameras with Canon Basic if this data is sufficient for Gyroflow.
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: kitor on June 09, 2022, 02:51:15 PM
M3 is PS base, don't assume cbasic interpreter means evprocs will exist on EOS firmware base.
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: Walter Schulz on June 09, 2022, 03:51:26 PM
;-)
I'm pretty sure Ant123 is aware of this ...
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: Ant123 on June 09, 2022, 04:39:40 PM
kitor
I wrote "probably". I don't have access to the firmware of EOS cameras(Digic8, DigicX) with Canon Basic.
But you can look for similar names in your firmware.
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: kitor on June 09, 2022, 05:51:29 PM
No offence, there were already assumptions from other people from CHDK world  :)

RP evprocs are listed in first post: https://www.magiclantern.fm/forum/index.php?topic=25662.0 R is very similar to that.

Maybe StartGyroRec? This is the closest "name" I can find - but requires checking in ROM.
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: Ant123 on June 09, 2022, 06:32:55 PM
Quote from: kitor on June 09, 2022, 05:51:29 PM
Maybe StartGyroRec?

Maybe. On EOS M3 "EnableAcceleLogWrite" just sets the flag which is checked in "Accelerometer" task.
I did not find this task in RP's task list. Maybe "EIS" task?

P.S.
M3 uses MMA8452Q chip. The same accelerometer found on PCBs of EOS R (https://a1ex.magiclantern.fm/bleeding-edge/R/1S7A7944.JPG), RP (https://kolarivision.com/wp-content/uploads/2019/03/RP-01878-1024x683-1.jpg), M50
Title: Re: Gyroscope/accelerometer video stabilization for DSLR
Post by: dream951 on June 11, 2022, 08:33:14 PM
Quote from: dualmp on June 06, 2022, 03:50:12 AM
Interesting! I suppose this method will work with all cameras? I am using a Samsung NX1 as well as a 5D3.
Yes, of coarse. You can use it with all devices with built-in camera :)