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