PDA

View Full Version : focal length


dpamplona
12-08-2011, 06:04 AM
Hi!
I would like to control the focal length of the viewpoint.
I have found the field of view command, but I cannot find something equivalent to the focal length.
Do you know how can I do that?
Best,
Daniela

Jeff
12-08-2011, 04:59 PM
Can you describe the effect you are trying to achieve?

dpamplona
12-12-2011, 07:01 AM
Sure! I will try to be as clear as possible.

In normal cameras, eyes, etc, the size of the sensor is fixed and we can control manually (or automatically) the focal length. From that, the field of view of the image, is relatively easy to estimate. (If we assume the perspective tranform, then it is just the fov = 2*arctan(sensor_array_length/(2focal_length)))

In vizard, we can control easily the fov of the viewport, I would like to adjust the viewport size (in pixels) depending on the focal length. Can you help me?
Cheers,
Daniela

Jeff
12-12-2011, 06:53 PM
Do you want the viewport to remain rectangular?
When the viewport gets smaller are you wanting to see a black border around it?

dpamplona
12-19-2011, 02:53 AM
Hi!
Thank you for your reply.
I can have the viewpoint window rectangular or squared, (that we can control with the fovH, or fovV, or h2vRatio).

I think I was not very clear with my problem.
If the "frame size"/"sensor size" is fixed in Vizard, than the focal length is easy to estimate/set with the fov.

http://en.wikipedia.org/wiki/Angle_of_view#Calculating_a_camera.27s_angle_of_vi ew

For instance, it seems that openGL uses the tipical frame size:24mm x 36mm,
http://www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=193124
is Vizard also using this values?

Thank you in advance,

farshizzo
12-20-2011, 11:02 AM
You can adjust the size of the window by using the viz.window.setSize([width,height]) command.

dpamplona
12-23-2011, 04:18 AM
Hi!
I thought about that as well, but the setsize function comes in pixels, and the focal length in mm. If I could set the size of the window in mm, that would be enough!
Thank you!

dpamplona
12-25-2011, 04:26 AM
How can we set the window size in mm?