Tuesday 20 September 2011

NiViewer


Today I ran NiViewer provided by OpenNI again on Captured_08_22_11.oni, and observed vertical lines on the depth image. The vertical lines also shift with time.

The default coloring of the depth image is according to linear histogram. MAX_DEPTH is set to be 10000. The histogram is calculated according the following steps (in Draw.cpp, line 549, calculateHistogram()):
  - Count the number of pixels with the same depth_value and store it in depthHist[depth_value].
  - Calculate the accumulative frequency.
  - Invert the accumulative frequency.

In this way, pixels with greater depth values will have darker color. The use of histogram is good because the color is not scaled linearly with depth but with the frequency of the occurrences of the depth values.

No comments :

Post a Comment