Kinect - Map color and infrared 2D coordonates RRS feed

  • Question

  • Is there an easy way to convert the coordinates of a point from a colorframe to an infrared in Kinect V2?

    Infrareds seem to be trimmed on both sides (on the X axis).

    Saturday, May 20, 2017 4:54 PM


  • Color frame is 1920x1080. IR frame (and by extension Depth and BodyIndex frames,since they come off of IR) are 512x424. The reason is bandwidth between sensor and KinectService. There's no trimming involved. It's just a smaller resolution(and beware...of different aspect ratio).

    The way to query is through CoordinateMapper.

    You need to get the Lookup table(called DepthCoordinates in this context) from the sensor (at the same time that you get the color frame and the rest). That Lookup table is 1920x1080 as well and its cells contain two floats X and Y that correspond to the depth/ir/bodyIndex frames. So if you want to query e.g. the depth data for the color pixel 500,500 then you first get the X,Y from the 500,500 cell of the Lookup table. Then you just query the X,Y cell of the depth frame. Depending on which frame you want the format of data changes so make sure to read the Kinect v2 Overview which describes them.

    Check CoordinateMapperBasics from the Kinect v2 SDK Samples.

    • Marked as answer by Maxime Beck Saturday, May 27, 2017 3:35 PM
    Sunday, May 21, 2017 12:22 PM