Search code examples
graphicsinterpolationperspectivecamera

What is "perspective correction" in graphics and when is it applied?


So I have been working on my graphics homework and I have finished doing perspective projection, but then today I just read online something about perspective correction. Can someone explain to me what exactly this is and when is it applied? I have seen a couple of scholar articles, but they were so complex and complicated that I couldn't understand what was happening.

I commonly see articles mention 1/z and something about interpolating it but I am confused about that. So far, I have been simply using barycentric coordinates to interpolate my z coordinates.


Solution

  • this therm is used for more things like:

    1. fisheye corrections in ray-tracers

      for this usually cos function is used to handle the peripherial view a bit differently so walls are flat and not curved near edge of views. See:

    2. image reconstruction from perspective view

      to get some rectified reference frame coordinates from images like:

    3. Depth buffer (de)linearzaion

      So either you got z coordinate after perspective division (z/w) and want to retreive the original z for some computation or you got linear z and want to apply perspective division.

      Linear depth buffer have the same z accuracy on whole frustrum and perspective divided non linear depth buffer have same apparent visual accuracy on whole frustrum (the more distant from camera the less accuracy you got but visually it is the same step size) see:

      Sometimes you need linear and some times non linear depth buffer. For almost whole frustrum views or with big z coverage is linear depth buffer best but for near camera objects details is non linear better...

      Non linear:

      non linear

      Linear:

      linear

    4. perspective correct interpolation.

      its variation of #3 while texturing 3D polygons with perspective camera present. Texture coordinates interpolated linearly (affine texture mapping) creates seems on places where neighboring polygons are touching. To avoid this the interpolation is done with parameter scaled by (1/z) see:

    My bet is you are talking about #4 .