w3c / mediacapture-depth

the Media Capture Depth Stream Extensions specification
https://w3c.github.io/mediacapture-depth/
Other
24 stars 20 forks source link

Need measureType for accurate reprojection #80

Open robman opened 9 years ago

robman commented 9 years ago

The discussion in #77 did highlight that this IS necessary - yet it got dropped 8( See: https://github.com/w3c/mediacapture-depth/pull/77#issuecomment-97066083 https://github.com/w3c/mediacapture-depth/pull/77#issuecomment-97083537

anssiko commented 9 years ago

We should bring measureType back if:

anssiko commented 8 years ago

I'll close this. We can revisit this when we are aware of multiple independent implementations that are able to support measureType.

robman commented 7 years ago

This is critical for accurate reprojection and should really be included in v1.

Based on discussion with @huningxin this should probably be able to be requested in the constraints too (and be introspected/throw errors) as some devices let you configure if you want to use optical or principal ray.

astojilj commented 7 years ago

Copying the quote from the comment here to define measure type: https://github.com/w3c/mediacapture-depth/pull/77#issuecomment-97066083

the measureType defines if the length is measured along the optical axis (depth down the X3 axis in the pinhole camera model) or as a ray (along the effective hypotenuse). Again this tells us what algorithm to use.

robman@, I understand that the use case for this is inverse linear relationship in disparity mode of RealSense R200 camera: float depth_in_meters = scale / image[pixel_index];

For the reference, in z16 mode it behaves similar to Kinect2, with near = 0, far = 65535mm (scale == 1mm) and float depth_in_meters = scale * image[pixel_index];.

Are there other cases you know of? Thanks.

huningxin commented 7 years ago

@robman I agree this is critical for accurate reprojection.

However, to my knowledge, the depth value is commonly OpticalAxis measurement type, like RealSense and Kinect. Do you know any camera or SDK provide the OpticalRay depth value?

If OpticalAxis is the default one, can we specify the measurement of depth value in this spec is OpticalAxis instead of adding measurementType constraint? WDYT?