nytimes / ios-360-videos

NYT360Video plays 360-degree video streamed from an AVPlayer on iOS.
https://github.com/nytimes/ios-360-videos
Other
274 stars 38 forks source link

Correcting Miscalibration #18

Open jaredsinclair opened 8 years ago

jaredsinclair commented 8 years ago

The low-pass filter we added in https://github.com/nytm/ios-360-videos/commit/68d73c4a0c152412532693f5e171ee6cd9e730ec helps correct spurious camera motion when the device is at rest. However, it does nothing to prevent inaccurate camera motion for values above the threshold since every such value is incorrect.

I did a comparison with the YouTube app from the App Store, using a NYT VR video, and I noticed two interesting things:

1) The horizontal miscalibration (rotating left/right from the user's perspective) was the same. In both their app and our sample app, the camera rotated indefinitely. It looked like their low-pass filter was even lower than ours.

2) The vertical miscalibration was mostly absent from YouTube. I was able to get it to appear after doing a particular series of motions with my hand, but the app corrected the abnormality over the next second or two after the motions ended.

I suspect that they're able to apply a vertical re-calibration without user participation because there's a gravity vector available on CMDeviceMotion which, when the device is at rest or close to it, could be used as a frame of reference for the recalibration.

Perhaps we could try a similar approach.

My question to @dayvson and @thiagopnts is whether we should follow up on the miscalibration problem and how. cc @cdzombak

thiagopnts commented 8 years ago

I think this is acceptable for 360, at least for the first realease. This would be a bigger problem if we were doing VR. This probably also happens on all the other platforms(web, android), so once we figure out a way to handle this we could port to the other ones too