Nuitrack_gl_sample: color and depth not aligned

Running the nuitrack_gl_sample, clicking the mouse will switch between color (RBG) and depth views.
In the depth view, the “skeleton” will align correctly with the outline of the person.
However, in color view, the outline is not correctly positioned.

Further, as you switch between color and depth views, it’s clear that the image pixels don’t align.
This makes it difficult to do anything that needs correlated depth and color pixels.

Maybe you need to be using registered images from the Realsense Camera?

Hi Dave,

You have to turn on depth to color registration:

  1. Open the file %NUITRACK_HOME%/data/nuitrack.config
  2. Find the section "DepthProvider" (for nuitrack v0.23.3 and higher) or "Realsense2Module" (for earlier versions) and set “Depth2ColorRegistration” to “true”.

Oh, got it, that’s great!

I really appreciate how responsive you guys are!!! Great job!

1 Like

By the way, I found it easier (and I think better?) to set this in my code instead of changing the config file.

I added this right after init(): Nuitrack::setConfigValue(“DepthProvider.Depth2ColorRegistration”, “true”);

1 Like