Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 10 of 10

Thread: Frustum problems - URGENT!

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19

    Frustum problems - URGENT!

    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!
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	11111.JPG 
Views:	88 
Size:	9.5 KB 
ID:	905  

  2. #2

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    yes , and don't got full answer for that, and thought it would be better to reformulate my question!

  4. #4
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,160
    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

  5. #5
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    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.

  6. #6
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,160
    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?

  7. #7
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    1. I have mathematical models, not real cameras, I read information from files, and render them, and do calibration. (calibration example : here, same but only with virtual cameras and with open gl).
    To illustrate what i mean see picture attached.Click image for larger version. 

Name:	11111.JPG 
Views:	107 
Size:	38.2 KB 
ID:	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.

    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 Click image for larger version. 

Name:	1.JPG 
Views:	88 
Size:	13.3 KB 
ID:	909

    Thank you.

  8. #8
    Senior Member OpenGL Pro Aleksandar's Avatar
    Join Date
    Jul 2009
    Posts
    1,160
    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...

  9. #9
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    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

  10. #10
    Junior Member Newbie
    Join Date
    Oct 2012
    Posts
    19
    I don't need aspect ratio to be calculated, and I don't know sensor size to solve problem with that variables.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •