PDA

View Full Version : Projection matrix internal parameters



ozone01
04-16-2003, 04:54 AM
Hi,

I've got a question about some parameters in the projectionmatrix.

A typical call to glFrustrum gives you a matrix like this :

|E 0 A 0|
|0 F B 0|
|0 0 C D|
|0 0 1 0|

My question is about A and B. In most cases these will be 0 since left,right and top,bottom are the same except from the minus sign.

But i work with a matrix i calculated from a camera callibration. And in this matrix those values aren't zero.

I know these values stand for the optical centre, but what is their actual effect on the view i get? When i vary them manually my camera seems to move but the perspective doesn't change the way you would expect it to.

Any help would be much appreciated http://www.opengl.org/discussion_boards/ubb/smile.gif

jo

cass
04-16-2003, 06:01 AM
jo,

Have you looked at how the glFrustum
call computes these values? That is probably the simplest way to understand the effect of these matrix elements.

Thanks -
Cass

ozone01
04-17-2003, 10:33 AM
Ok I figured it out. If A and B are different form 0, they represent an offset in the filmback. You can think of it as moving the film in your photocamera so that the image is not centered anymore.

That's why an objects position could change without a change in its perspective. The object and the lens stay the same (hence the perspective stays the same).

jo