Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gyro and Acc Units #7

Open
gabrielecoppi opened this issue Mar 30, 2021 · 6 comments
Open

Gyro and Acc Units #7

gabrielecoppi opened this issue Mar 30, 2021 · 6 comments

Comments

@gabrielecoppi
Copy link

I am trying to extract raw gyro and accelerometer data to estimate the yaw pitch and roll angles using probably a Kalman filter. I was wondering what are the units of the data coming out for the RX0M2 and if you have some sort of reference for it

Thanks

@SK-Hardwired
Copy link
Owner

Hi!
The most easy one is accelerometer:
It is measured in 1/1000th of G. So idle standyng camera should have around 9800 units at one of axes (Z by default).

Gyroscope measures the rotational speed at the moment. I don't remember right now. But you may try yourself - just record short footage when you flip camera 90 degrees and see how rotational speed will change and then stop. You will need to do some calculations (take integral) to get actual angle

@mungewell
Copy link

If you have a turn table, you can position the camera in one of three orientations and record a short section of video for each. You need to figure out which are roll, pitch and yaw axis and their signs.

It would be highly beneficial to know the if the data is time stamped, rather than process with just a crude sample rate.

For actually computing the AHRS from the data, I've used this code in the past:
https://github.com/morgil/madgwick_py
https://github.com/KieranWynn/pyquaternion

@dpredie
Copy link

dpredie commented Jun 2, 2021

Any tips on how to use the gyro data to stabilize outside catalyst?

@mungewell
Copy link

Firstly you'd need to integrate/process the data to form a model of the camera's motion, if you want some really nasty Python code example here's my attempts... but likely much better stuff elsewhere.
https://github.com/mungewell/pyPSVR/blob/master/example4_vridge_sensors/vridge_psvr.py#L209

Then I suspect that you'd want to process that to find intentional motion vs jitters... since you are post processing you can search forwards and backwards through the data.

Finally you'd want to do the image re-projections, based on the focal length of the lens and the estimated movements.

@tomstom
Copy link

tomstom commented Dec 30, 2021

To stabilize I recommand https://github.com/ElvinC/gyroflow , everything is already done there.
You have only to convert the gyro data into something that GyroFlow understands. Based on the gyro data of a ZV1 I wrote this: https://www.dropbox.com/s/6wt0p6rlzyznb2g/ConvertSonyBF.7z?dl=0 Maybe you have to change the scaling for your cam in my script.

@mungewell
Copy link

@tomstom
Awesome recommendation... it looks like that project has moved on a little and has moved to:
https://github.com/gyroflow/gyroflow

They specifically state the Sony cams are supported!!

Sony (a1, a7c, a7r IV, a7 IV, a7s III, a9 II, FX3, FX6, RX0 II, RX100 VII, ZV1, ZV-E10)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants