Aligning RGB and Depth Kinect2

… no text …

DepthToRgb.7z (1.8 kB)

Antokhio! thank you. I will try it tomorrow!

Antokhio! Working like a charm!. You 're right - rgb stream seems to be slower,more blurry, so I added echo to the mask. Not elegant way, but looks better…

Thumbs up to vux ;] Nice to hear all good, if u need more help gonna be around here…

Hi Antokhio! Is there an easy way to change playertexture to depthtexture, ie: to align depth to rgb, not player?
Texture2D ColorTexture : register(t0) : PREVIOUS;
Texture2D PlayerTexture : register(t1); <-------------depthtexture?
Texture2D DepthRGBMapTexture : register(t2);
G.

hi, u gonna need more then that:
so line 25

return float4 (rgb.xyz,body)

“body” is player atm so u have on output vector for rgb color and u add player as alpha to it. So if u change player texture on depth map it’s not gonna help much since u gonna write it to alpha

do a copy of ur shader and change

float body = PlayerTexture.Sample(linearSampler,map).r;
return float4 (rgb.xyz,body);

to

float4 body = PlayerTexture.Sample(linearSampler,map);
return body;

that’s gonna give u back whatever texture u put in there aligned to color

God bless you, Antokhio (and vux of course)! I just changed one additional parameter, defining filter result as r16g16b16a16 (no banding). BTW, is there a node to change to-from a8r8g8b8 or any other combination, as it was in an old dx9 texture?

filter_all_to_rgb (724 Bytes)

To change the format you can use Renderer (DX11 TempTarget) … Check ChangeFormat (DX11.Texture 2d)

You can also specify in the pass section, copy the text from the renderer formats eg

pass P1 <string format=“R16G16B16A16_Float”;>
{SetPixelShader(CompileShader(ps_4_0,PS()));}

Great, thank you all!

Kinect2, win8.1 x64, try the above nodes, but didn’t get the effect of the below! You have any Suggestions

Evan, I will send you some help files tomorrow…

Evan, just unpack, and put “kinect_toolbox” folder into your x64 “packs” folder.
It’s little messy (in fact nodes are copies of kinect2 contribution- which is not necessary, plus some nodes added, hdface not working…). I’m using it without a problem with 33.7 x64. Your effect needs rgb and player combined. Have fun!

kinect toolbox (39.3 MB)

rogalag!This problem I’ve struggled with for a long time! Try to use node fusion player and RGB blend! But there are RGB camera and depth camera distance deviation! How can I thank you, really thank you very much!

you’re welcome!

… no text …

hei @rogalag , thank you for the patch.

i have a question how to get a result like evan? i already combine it with rgb but the result always have a red color in front of the rgb.

[solved it using color channel remap]

thank you

I try to align the HD RGB stream on a mesh I created with Mesh(DX11 Pointcloud).
The mesh is based on a preprocessed version of the depth channel.

So I guess I basicly need the exact opposite of the FilterAllToRGB shader @antokhio posted earlier.
Like FilterRGBtoAll. Is this somewhere hidden inside “kinect toolbox” or did I oversee something?

fyi: I am trying to marry Kinect2 with SuperPhysical, DOF and maybe SSAO. I try to get a visual representation that is as close to reality as possible - to start messing with mesh and texture from this point.

I will add the patch (based on older version of SuperPhysical), to show the problem only (I guess it will show alot red)
It was living in 03 SuperPhysical - SCENE folder which I did not copy into packs. Any additional TFX have been added right to this folder (in a bad manner).

SuperKinect_test.zip (15.2 KB)

One addition: It seems as if the RGB and depth stream are not perfectly in sync. The timestamps differ for sure, depending on your hardware - and even cable - there can also be dropped frames. You can try to work against this with Framedelay (DX11 Texture 2D) by vux.

Here Meier you can rip it off here

kinect PC.zip (1.7 KB)

it’s a little bit more extended version, i use to send kinect over network.
right now it writes world tex to rgb and kinect rgb to alpha
you can remove world and keep only projected rgb there…

1 Like