3

We are trying to simulate simple kinect output.

I have rendered a triangle mesh in Matlab and now I want to get at the depth buffer of the figure/axis where the shape has been rendered. How do I do that in matlab? i.e. how do I access the depth buffer of a figure?

twerdster
  • 4,977
  • 3
  • 40
  • 70
  • I have done something similar where I wrote a raycasting algorithm to simulate such output. It never really worked too well (very slow on large meshes). I'd be interested to know if you can get it directly from a figure, as this would be much easier... – Bill Cheatham May 11 '11 at 14:06
  • I guess your real question is how to get access to the JOGL objects used by MatLab's own figures? – Ben Voigt Sep 26 '11 at 21:47
  • That sounds like a good way to phrase it. I didnt realize Matlab figures were JOGL objects. – twerdster Sep 26 '11 at 21:54
  • Could any one find the solution of this problem ? –  Nov 11 '11 at 10:07
  • @Ben Voigt, are you sure that they are JOGL objects and not JFrame objects? Does Matlab necessarily use OpenGL? Is there a chance it uses direct canvas drawing instead? In either case the question is still open and I have left a 300 bounty on it.http://stackoverflow.com/questions/8862467/using-jogl-in-matlab-to-get-depth-buffer – twerdster Jan 16 '12 at 18:49
  • @twerdster: I know MatLab uses OpenGL for rendering. I don't know which wrapper it uses, could be JOGL, could be something else. – Ben Voigt Jan 16 '12 at 18:57
  • The question has been answered [here][1] [1]: http://stackoverflow.com/questions/8862467/using-opengl-in-matlab-to-get-depth-buffer/8919803#8919803 – twerdster Jan 19 '12 at 01:10

1 Answers1

0

You could try this.

Jorge
  • 784
  • 5
  • 16
  • Unfortunately thats not what we are looking for at all. We need a per pixel depth value for the current figure output. – twerdster Jan 10 '12 at 15:12