3

Our goal is to make a movie from the Infrared images coming from the Kinect. We are using the AForge videowriter, we already have working code to work with a normal RGB stream. (RgbResolution640x480Fps30)

Looking at the documentation ( http://msdn.microsoft.com/en-us/library/microsoft.kinect.colorimageformat.aspx ) the image are in a 16 bits format, but only the first 10 are used? So do we have a 10 bits format image or how does this work?

Looking at the Aforge documentation only the following formats are accepted : 24 or 32 bpp image or grayscale 8 bpp (indexed) image. (http://www.aforgenet.com/framework/docs/html/84a560df-bfd5-e0d6-2812-f810b56a254d.htm)

  • Why are only 8 bpp indexed images accepted?
  • Is it possible to transform the 16 (10??) bit images from the Kinect to a 8 bpp indexed image
  • Or maybe allow AForge to accept 16 bit images as well

Thanks!

Shreyas Kapur
  • 669
  • 4
  • 15
Kevin Cloet
  • 2,956
  • 1
  • 19
  • 36

2 Answers2

0

Kinect is supposed to produce depth or z with 11 bits of resolution packed in 16bit samples. To work around this problem you can divide the samples by 2^3=8, which would produce blunt results, or use a tone mapping technique like those used in HDR photography. This last one makes sense given the fact that Kinect doesn't have the same resolution for close by objects as for distant ones (see this StackOverflow question) so a non linear mapping can be used between the 11b samples and the 8b reduced resolution as explained in the OpenKinect Wiki.

On the Aforge, I'd say it'd be common to support 8bit gray, 24bit RGB (8bit per plane) and 32bit RGBA (8bit per plane).

Community
  • 1
  • 1
miguelao
  • 772
  • 5
  • 12
0

AForge can convert to an 8 bit image for you:

Bitmap grayImage8bit = AForge.Imaging.Filters.Grayscale.CommonAlgorithms.BT709.Apply(original_bitmap);

I've been using this to convert 32 bit rgba bitmaps.

user814425
  • 605
  • 8
  • 19