[mediacapture-depth] Drop range linear conversion, always use range inverse conversion

anssiko has just created a new issue for 
https://github.com/w3c/mediacapture-depth:

== Drop range linear conversion, always use range inverse conversion 
==
Currently shipping depth cameras (see 
https://github.com/w3c/mediacapture-depth/issues/100#issuecomment-200236879)
 all use a native depth value format with a bit depth greater than 8.

To simplify the conversion, perhaps we should just drop the range 
linear conversion and standardize on the range inverse conversion. In 
practical terms, modify the steps 4 and 5 in [convert the depth map 
value to grayscale][1] as follows:

> 4. <strike>If bit depth is greater than 8, then</strike> apply the 
rules to convert using range inverse to d to obtain quantized value 
d<sub>8bit</sub>.

> 5. <strike> Otherwise, apply the rules to convert using range linear
 to d to obtain quantized value d<sub>8bit</sub>.</strike>

This also simplifies the conversion from quantized depth to depth 
measurement in mm the web developer must take care of, removes the 
need to branch for linear/inverse, see #112.

[1]: 
https://w3c.github.io/mediacapture-depth/#dfn-convert-the-depth-map-value-to-grayscale

Please view or discuss this issue at 
https://github.com/w3c/mediacapture-depth/issues/115 using your GitHub
 account

Received on Thursday, 24 March 2016 12:54:19 UTC