View Full Version : Frustum problems - URGENT!

Mikael Ara
11-17-2012, 01:45 PM
hey all,

How can I find out focal length - f, and chosen dimension - d (see attachment). I need them to find alpha(angle of frustum)

Or if you know better way to find out angle using intrinsic parameters, I will be happy))

Please help urgently!

Alfonse Reinheart
11-17-2012, 02:13 PM
Didn't you ask for urgent help (http://www.opengl.org/discussion_boards/showthread.php/179638-Urgent-help-needed!!?p=1244434#post1244434) on this before?

Mikael Ara
11-17-2012, 02:20 PM
yes , and don't got full answer for that, and thought it would be better to reformulate my question!

11-18-2012, 02:22 AM
I gave you "the full answer", but obviously you didn't understand. If you remains silent it assumes you are satisfied with the answer.
The formula you found on Wikipedia is exactly the same I gave you; except I divided focal length into two components: minimal focal length and zoom factor.
Focal length and sensor dimensions are not the values you can choose! You have to check a datasheet for the particular camera to get correct values.
For example: standard 1/2.5" sensor is 5.8 x 4.4 mm. In OpenGL you are setting vertical FOV, so the height is used in the formula. The previous sensor has 4:3 aspect, so you also need to obey this restriction if you need 1:1 mapping in your window.

Before going any further (except you want empirically determine all those values), find out a detailed specification of the sensor used in your camera, and pay attention to the following parameters:
- aspect
- sensor dimensions
- minimal and maximal focal length

Mikael Ara
11-18-2012, 03:32 PM
6.716550e+001 3.265328e+000 -6.422589e+000;
0.000000e+000 -7.718194e+001 -3.809459e+001;
0.000000e+000 0.000000e+000 -1.066025e-001

This is my matrix of intrinsic parameters of the camera. And I have no parameter you mentioned(focal length,Sensor size...).
And the chalange is how to estimate them.

11-19-2012, 01:49 AM
What's the meaning of those parameters?

In order to help you I need answer to the following questions:

1. What is a camera calibration? (Do you have a physical camera or a mathematical model?)

2. What do you actually have to do? (If it is a physical camera, it have sensor and lens.)

3. What are "intrinsic" and "extrinsic" parameters?

Mikael Ara
11-19-2012, 06:17 AM
1. I have mathematical models, not real cameras, I read information from files, and render them, and do calibration. (calibration example : here (http://www.youtube.com/watch?v=bV-jAnQ-tvw), same but only with virtual cameras and with open gl).
To illustrate what i mean see picture attached.908

2. The only thing is left to do, is to render frustums for all local cameras(math models)
2.1 The issue is to find angle of frustum, or FOV, then I will know were camera looks, when greed is translated or rotated. I know that all information I need can be derived from intrinsic parameters, but I don't know how!

3. Intrinsic and extrinsic parameters are matrices. Extrinsic parameters are used to define local camera position. And what we need now is intrinsic matrix, which is 3x3 triangular matrix (http://en.wikipedia.org/wiki/Intrinsic_parameters#Intrinsic_parameters).

I BELIEVE that the angle I need can be found from intrinsic matrix. If you can advice me better way, I will be only thankful.

p.s. I have only what is displayed in picture 909

Thank you.

11-23-2012, 02:42 AM
Are you serious with all those questions? All answers can be found in the links you have provided.
Aspect = 0.87 in your case (Ax/Ay), and FOV can be calculated from Ay and viewport_height in pixels...

Mikael Ara
11-26-2012, 12:08 PM
it's not really so easy to do, but I could envented nice algorithm to solve that problem, you can see results here I solved the problem, you cane see result here http://www.youtube.com/watch?v=2JL1IokHheI

Mikael Ara
11-26-2012, 12:14 PM
I don't need aspect ratio to be calculated, and I don't know sensor size to solve problem with that variables.