Login | Register 

Kinect vertex shader disortions

Report bugs so we can squash them!

Kinect vertex shader disortions

Postby n23 » Thu Aug 10, 2017 8:36 am


I'm using a simple vertex shader to decode Kinect 2.0 points cloud data, it works, but the 3D image contains some grid-like glitches.

Here's how it looks like:
kinect.png (254.2 KiB) Viewed 254 times

Here's the relevant vertex shader code. uPointRes is resolution, uPointTex is point cloud TOP:

Code: Select all
   int id = gl_VertexID;
   vec2 posUV;
   posUV.t = id / int(uPointRes.p);
   posUV.s = id - (posUV.t * int(uPointRes.q));
   posUV *= uPointRes.st;
   vec4 newPos = texture(sPointTex, posUV);
   vec4 worldSpaceVert =TDDeform(newPos);
   vec4 camSpaceVert = uTDMat.cam * worldSpaceVert;
   gl_Position = TDCamToProj(camSpaceVert);

Does anyone know this issue? Decoding the texture to points is very straightforward, what can be causing the disorted lines?

It's not hardware fault - point cloud drawn by another software is fine. Might it be the fault of scaling down the Kinect TOP to 1280x720 on a free license TD?

EDIT: Opps, wrong board, please move this topic to "Bugs" board.
(7.21 KiB) Downloaded 8 times
Last edited by n23 on Fri Aug 11, 2017 6:27 am, edited 3 times in total.
Posts: 33
Joined: Sat Apr 15, 2017 11:59 am
Location: Poland

Re: Kinect vertex shader disortions

Postby CutMod » Fri Aug 11, 2017 1:29 am

That happens at full resolution too. I think it's an artifact of the IR emitters but have no evidence to support that theory. I think there are some other forum threads about this issue but I don't recall seeing any surefire solutions. I know that's not entirely helpful, but at least you know it's not the resolution limit causing the grid artifacts.

Edit: To confirm that it's not the shader, I made a little artifact explorer that shows the grid in the RGB channels. However, In the 2D data the grid looks like rings. Leads me to wonder if it has to do with phase interference as the different frequency IR beams bend through the depth lens... I'm no expert on photonics, and the science behind Kinect's ToF depth sensing is non-trivial, so for now I just have guesses.

Also some interesting Kinect science I found while researching this topic:
http://www.cvl.isy.liu.se/research/data ... 2-dataset/
kinectPointcloudGridArtifacts-rgb.jpg (754.98 KiB) Viewed 228 times
kinectPointcloudGridArtifacts-luma.jpg (373.87 KiB) Viewed 228 times
(4.59 KiB) Downloaded 11 times
Posts: 119
Joined: Thu Jul 03, 2014 10:44 am
Location: Los Angeles

Return to Bugs

Who is online

Users browsing this forum: No registered users and 7 guests