get simulated depth image from matlab figure

47 Views Asked by At

I'm simulating a depth camera in matlab (and I don't have the automated driving toolbox) and was trying to access the depth buffer (z-buffer) from the figure that matlab plots.

I've implemented twerdster's solution, but the depthData returns an empty 0x1084895568 size array.

I compiled the mex function with debug on and checked it out in visual studio (following this guide) and I saw that glGetIntegerv(GL_VIEWPORT, viewport); is setting viewport to [0, 0, 1084895568, 0]. Any ideas why?

0

There are 0 best solutions below