Sign in to follow this  
amak

Perpective Correction

Recommended Posts

Hi. On this image the tiger http://mega.ist.utl.pt/~amak/cv/imagem-deformada.JPG is deformed and all objects when they are near to a screen corner. How i resolve that?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
I would check how you are setting up your perspective matrix. I have never used Direct3D myself but from what I have been told, unlike OpenGL you have an
extra stage in calculation of final values. It might be that in setting up
the projection matrix is wrong or that bad values are being passed in (denormals
etc). Try checking your projection matrix and also to see whether it might be
passed in as a transpose of the actual values. Apart from this I can't figure
out the possibility why.

Share this post


Link to post
Share on other sites
Quote:

Perpective Correction

Adding an s as the fourth character would be correct!

On a more serious note, check your projection matrix and also your view matrix. If you are using D3D you might want to check the functions that D3DX offers for constructing both matrices. You can use them anyhow, or use them temporarily as a reference.

Greetz,

Illco

Share this post


Link to post
Share on other sites
It looks like you have a very big Field of View (FOV). This is the horizontal viewing range, expressed as an angle. A normal FOV is about 90 degrees, or pi / 2 radians. It looks like in your application it is something like 140 degrees, which will cause this kind of deformation around the edges. So check your API documentation on how to set a proper FOV for the projection matrix.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this