title: 3D points projected to form an image
body: <p>I want your intellectual suggestions for a problem i have. I have 3D points data along with intensity field <code>(x,y,z,I)</code> which represent the 3D scene. I want this 3D data converted into an image (2D matrix with intensity values <code>'I'</code>).</p>
  
  <p>I plan to do perspective projection of 3D points using pinhole camera model (<a href="http://en.wikipedia.org/wiki/Pinhole_camera_model" rel="nofollow">Wikipedia</a>). </p>
  
  <p><code>x'=f*x/z</code>  and <code>y'=f*y/z</code></p>
  
  <p>What value should I select for <code>'f'</code>? How is the size of image dependent on it? (say I need an image of size 500*500 , what value will suit for <code>'f'</code>)</p>
  
  <p>Since coordinates in 2D image are integers, how should I quantize <code>x'</code> and <code>y'</code> values and substitute the corresponding intensity value? E.g. if I get two sets(by using <code>f=10</code>) as</p>
  
  <pre><code>x,y,z,I
  (3,1,2,128) -&gt; x',y',I(15,5,128)
  (3.1,1.1,2,150) -&gt; (15.5,5.5,150)
  </code></pre>
  
  <p>Of the above two sets, should i just round off the <code>x'</code> and <code>y'</code> values and use its intensity at that coordinate or should I use an average of intensity of the non-integer coordinates ?</p>
  
  <p>Will the resulting image be clearly depicting the scene in 2D (like a photo taken from a camera)?</p>
  
  <p>Shall pay much gratitude for your ideas. Thanks</p>