W3C home > Mailing lists > Public > public-media-capture-logs@w3.org > January 2017

Re: [mediacapture-depth] Fix #137: Define unknown depth map value

From: Anssi Kostiainen via GitHub <sysbot+gh@w3.org>
Date: Thu, 05 Jan 2017 08:04:51 +0000
To: public-media-capture-logs@w3.org
Message-ID: <issue_comment.created-270585849-1483603489-sysbot+gh@w3.org>
>I mean the NOTE section about "The depth measurement d (in meter 
units) is recovered by ......".

Given an invalid depth map value `d_(16bit) = 0`, the 
grayscale-to-depth normalize step returns 0:

`d_(n) = d_(16bit) / 65535 = 0`

Substituting `d_(n)` with 0 in the the conversion step:

`d = (d_(n) * (far - near)) + near` reduces to `d = near`

To check the operation is invertible in this special case, we 
substitute `d` with `near` in depth-to-grayscale conversion:

`d_(n) = (d - near) / (far - near)` reduces to `d_(n) = 0`

And so does `d_(16bit)`:

`d_(16bit) = floor(d_(n) * 65535) = 0`

Q.E.D.

What type of additional text you'd prefer us to add to the NOTE 
section for this special case?

-- 
GitHub Notification of comment by anssiko
Please view or discuss this issue at 
https://github.com/w3c/mediacapture-depth/pull/139#issuecomment-270585849
 using your GitHub account
Received on Thursday, 5 January 2017 08:04:57 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:27:31 UTC