Reply To: Show height matrix values

Home Forums AR Sandbox Forum Show height matrix values Reply To: Show height matrix values

Oliver Kreylos

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.

Comments are closed.