title: Plot depth image in matlab
body: <p>I have an RGB-D image and am trying to get a 3D visualization in matlab. Currently I am doing:</p>
  
  <pre><code>    depth = imread('img_031_depth.png');
      depth = double(depth);
      img = imread('img_031.png');
      surf(depth, img, 'FaceColor', 'texturemap', 'EdgeColor', 'none' )
      view(158, 38)
  </code></pre>
  
  <p>Which gives me an image like:
  <img src="https://i.stack.imgur.com/pAyH1.png" alt="enter image description here"></p>
  
  <p>I have two questions:</p>
  
  <p>1) how can I save the image without it blurring as above</p>
  
  <p>2) As you can see some edges show lined going to zero (e.g. the top of the coffee cup) I would like to remove these. </p>
  
  <p>What I'm trying to produce is a 3D looking pointcloud, as these are only 2.5D I must show them from the right angle.</p>
  
  <p>Any help is appreciated</p>
  
  <p>EDIT: added images (note depth image needs to be normalized for visualization)</p>
  
  <p><img src="https://i.stack.imgur.com/8XXd7.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/OJorx.png" alt="enter image description here"></p>