Show height matrix values

Home Forums AR Sandbox Forum Show height matrix values

This topic contains 3 replies, has 2 voices, and was last updated by  Oliver Kreylos 4 months, 1 week ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #115741

    Valentin P
    Participant

    Hi,
    I need the height matrix but I don’t know how to get it.
    So, if anybody know how to find and show it, I would be really grateful. 🙂

    #115795

    Oliver Kreylos
    Keymaster

    What do you mean by “height matrix?”

    #115796

    Valentin P
    Participant

    Technically, I assume that there is somewhere a matrix of values corresponding to the resolution of the Kinect (640×480) in which each cell corresponds to a pixel and contains for a position X and Y a value corresponding to the height.
    I would like to access more or less in real time to this matrix in order to move entities and make them “interact” with the terrain (not move in areas with a height lower than… for example).

    Do you know if it’s possible?

    #115807

    Oliver Kreylos
    Keymaster

    There are two height value arrays. The first one is maintained by the FrameFilter class and contains filtered depth values from the depth camera, at the camera’s native resolution (640×480 for Kinect v1). However, these depth values are in depth image space and need to be un-projected by the inverse camera projection matrix before they can be used for most purposes. Once un-projected, they no longer form a regular grid of elevation values.

    The second height value array is used for water flow simulation, and maintained by the WaterTable2 class. It is a re-sampled version of the un-projected filtered camera depth image and forms a regular elevation grid at whatever resolution the water simulation is using. It is probably what you want, but as the re-sampling is done on the GPU and the resulting grid is only used on the GPU, CPU-side code cannot access it directly. You need to request a copy of the current bathymetry grid from the WaterTable2 object, and then retrieve it when the object tells you it has got it. You can look at the BathymetrySaverTool class to see how this works in practice.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

Comments are closed.