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

Is it possible to extract camera rotation from gyro/accel? #9

Open
xphoniex opened this issue Sep 1, 2024 · 0 comments
Open

Is it possible to extract camera rotation from gyro/accel? #9

xphoniex opened this issue Sep 1, 2024 · 0 comments

Comments

@xphoniex
Copy link

xphoniex commented Sep 1, 2024

I can get the csv file of gyro/accel data from my footage and now I'm trying to re-construct the x,y,z rotation of the camera which was standing on a tripod.

I'm executing the script on only the first frame:

gyro.csv

frame,ts,pitch,roll,yaw
0,0.0004965277777777778,60,-9,10
0,0.0009930555555555556,42,-4,11
0,0.0014895833333333334,40,-5,3
0,0.0019861111111111112,41,-5,6
0,0.0024826388888888893,48,-8,5
0,0.0029791666666666673,58,-19,0
0,0.0034756944444444453,45,-10,3
0,0.003972222222222223,31,-4,14
0,0.004468750000000001,46,-15,6
0,0.004965277777777779,60,-8,6
0,0.005461805555555557,56,1,10
0,0.0059583333333333354,54,-6,8
0,0.0064548611111111135,50,-4,3
0,0.0069513888888888915,57,-9,-2
0,0.0074479166666666695,56,-12,3
0,0.007944444444444447,56,-2,-1
0,0.008440972222222225,57,7,2
0,0.008937500000000003,57,5,2
0,0.00943402777777778,50,1,-4
0,0.009930555555555559,56,6,-3
0,0.010427083333333337,52,5,3
0,0.010923611111111115,57,-3,1
0,0.011420138888888893,44,-9,6
0,0.011916666666666671,42,-2,10
0,0.012413194444444449,41,-2,17
0,0.012909722222222227,48,2,1
0,0.013406250000000005,47,6,6
0,0.013902777777777783,41,-2,14
0,0.014399305555555561,44,2,2
0,0.014895833333333339,46,10,-4
0,0.015392361111111117,52,2,4
0,0.015888888888888893,53,4,7
0,0.01638541666666667,54,-7,-4
0,0.016881944444444446,46,-13,4
0,0.017378472222222222,51,0,-1
0,0.017875,36,12,1
0,0.018371527777777775,39,14,0
0,0.01886805555555555,46,6,5
0,0.019364583333333327,61,-5,6
0,0.019861111111111104,55,1,10
0,0.02035763888888888,44,11,5
0,0.020854166666666656,43,10,2
0,0.021350694444444433,53,7,11
0,0.02184722222222221,54,12,8
0,0.022343749999999985,61,10,7
0,0.02284027777777776,56,10,5
0,0.023336805555555538,64,7,0
0,0.023833333333333314,50,5,-1
0,0.02432986111111109,46,11,5
0,0.024826388888888867,61,9,3
0,0.025322916666666643,53,9,14
0,0.02581944444444442,60,13,4
0,0.026315972222222195,63,9,6
0,0.026812499999999972,66,4,11
0,0.027309027777777748,50,4,9
0,0.027805555555555524,43,3,9
0,0.0283020833333333,53,0,8
0,0.028798611111111077,59,-3,4
0,0.029295138888888853,66,2,4
0,0.02979166666666663,57,15,3
0,0.030288194444444406,46,13,10
0,0.030784722222222182,58,3,10
0,0.03128124999999996,59,3,5
0,0.03177777777777774,64,1,7
0,0.032274305555555514,71,2,5
0,0.03277083333333329,65,4,2
0,0.03326736111111107,50,10,7
0,0.03376388888888884,53,17,11
0,0.03426041666666662,64,16,10
0,0.034756944444444396,56,7,7
0,0.03525347222222217,58,9,3
0,0.03574999999999995,60,11,-1
0,0.036246527777777725,48,6,3
0,0.0367430555555555,51,12,11
0,0.03723958333333328,49,9,8
0,0.037736111111111054,46,10,2
0,0.03823263888888883,42,12,2
0,0.038729166666666606,53,13,2
0,0.03922569444444438,54,1,6
0,0.03972222222222216,53,5,11
0,0.040218749999999935,62,13,7
0,0.04071527777777771,40,21,2
0,0.04121180555555549,37,21,11
0,0.041708333333333264,49,12,4

accel.csv

frame,ts,x,y,z
0,0.0004965277777777778,-8169,-11,-211
0,0.0009930555555555556,-8164,-7,-207
0,0.0014895833333333334,-8145,-4,-217
0,0.0019861111111111112,-8147,4,-228
0,0.0024826388888888893,-8148,-7,-223
0,0.0029791666666666673,-8157,-17,-216
0,0.0034756944444444453,-8167,-29,-216
0,0.003972222222222223,-8151,-41,-216
0,0.004468750000000001,-8152,-20,-217
0,0.004965277777777779,-8164,-17,-210
0,0.005461805555555557,-8162,-30,-204
0,0.0059583333333333354,-8161,-11,-209
0,0.0064548611111111135,-8148,-17,-204
0,0.0069513888888888915,-8144,-21,-211
0,0.0074479166666666695,-8134,-16,-221
0,0.007944444444444447,-8156,-28,-235
0,0.008440972222222225,-8151,-23,-251
0,0.008937500000000003,-8136,-29,-229
0,0.00943402777777778,-8144,-14,-212
0,0.009930555555555559,-8147,-35,-202
0,0.010427083333333337,-8152,-44,-214
0,0.010923611111111115,-8139,-34,-221
0,0.011420138888888893,-8149,-16,-221
0,0.011916666666666671,-8145,-14,-225
0,0.012413194444444449,-8146,-35,-227
0,0.012909722222222227,-8148,-43,-233
0,0.013406250000000005,-8149,-47,-218
0,0.013902777777777783,-8143,-52,-222
0,0.014399305555555561,-8153,-37,-217
0,0.014895833333333339,-8164,-34,-221
0,0.015392361111111117,-8144,-35,-234
0,0.015888888888888893,-8150,-32,-226
0,0.01638541666666667,-8150,-42,-222
0,0.016881944444444446,-8145,-54,-233
0,0.017378472222222222,-8140,-40,-229
0,0.017875,-8138,-45,-202
0,0.018371527777777775,-8146,-51,-224
0,0.01886805555555555,-8154,-47,-244
0,0.019364583333333327,-8152,-59,-212
0,0.019861111111111104,-8161,-38,-202
0,0.02035763888888888,-8146,-44,-221
0,0.020854166666666656,-8144,-63,-233
0,0.021350694444444433,-8161,-52,-226
0,0.02184722222222221,-8157,-44,-227
0,0.022343749999999985,-8165,-33,-221
0,0.02284027777777776,-8166,-18,-217
0,0.023336805555555538,-8158,-43,-200
0,0.023833333333333314,-8164,-58,-204
0,0.02432986111111109,-8157,-45,-236
0,0.024826388888888867,-8144,-61,-230
0,0.025322916666666643,-8153,-59,-226
0,0.02581944444444442,-8150,-47,-227
0,0.026315972222222195,-8147,-61,-227
0,0.026812499999999972,-8138,-64,-234
0,0.027309027777777748,-8155,-75,-230
0,0.027805555555555524,-8171,-81,-225
0,0.0283020833333333,-8152,-72,-234
0,0.028798611111111077,-8140,-74,-243
0,0.029295138888888853,-8136,-64,-247
0,0.02979166666666663,-8144,-68,-240
0,0.030288194444444406,-8163,-54,-214
0,0.030784722222222182,-8152,-57,-209
0,0.03128124999999996,-8139,-76,-208
0,0.03177777777777774,-8166,-85,-214
0,0.032274305555555514,-8164,-80,-228
0,0.03277083333333329,-8155,-73,-226
0,0.03326736111111107,-8128,-71,-223
0,0.03376388888888884,-8151,-70,-213
0,0.03426041666666662,-8149,-83,-220
0,0.034756944444444396,-8138,-87,-221
0,0.03525347222222217,-8160,-66,-225
0,0.03574999999999995,-8162,-80,-195
0,0.036246527777777725,-8158,-86,-204
0,0.0367430555555555,-8161,-92,-219
0,0.03723958333333328,-8153,-99,-220
0,0.037736111111111054,-8151,-81,-221
0,0.03823263888888883,-8142,-88,-225
0,0.038729166666666606,-8149,-95,-215
0,0.03922569444444438,-8156,-86,-201
0,0.03972222222222216,-8157,-85,-189
0,0.040218749999999935,-8144,-84,-203
0,0.04071527777777771,-8146,-84,-215
0,0.04121180555555549,-8147,-90,-212
0,0.041708333333333264,-8154,-89,-223

Too much fluctuation in gyro even in the first frame, and I don't know how to convert accel to x,y,z rotation, or if I'm even looking at the right data to begin with.

Any help appreciated.

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

1 participant