title: Generate point cloud from depth image
body: <p>I am trying to convert a depth image (RGBD) into a 3d point cloud. The solution I am currently using is taken from <a href="https://codereview.stackexchange.com/questions/79032/generating-a-3d-point-cloud">this post</a> where:</p>
  
  <ul>
  <li><code>cx</code> = image center height</li>
  <li><code>cy</code> = image center width</li>
  <li><code>fx</code> and <code>fy</code> = <code>250</code>, chosen by iterating through a few options</li>
  </ul>
  
  <p>The depth measurements have been taken from a pin hole camera and the point cloud is projecting away from the centre (example images below). Can anyone help me understand why and how I can solve this?</p>
  
  <p><a href="https://i.stack.imgur.com/Zbg8C.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Zbg8C.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/LhDuS.png" rel="noreferrer"><img src="https://i.stack.imgur.com/LhDuS.png" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/BID9P.png" rel="noreferrer"><img src="https://i.stack.imgur.com/BID9P.png" alt="enter image description here"></a></p>