Jump to content

Computer Graphics: Difference between revisions

Line 108: Line 108:
[https://www.scratchapixel.com/lessons/3d-basic-rendering/perspective-and-orthographic-projection-matrix/building-basic-perspective-projection-matrix https://www.scratchapixel.com/lessons/3d-basic-rendering/perspective-and-orthographic-projection-matrix/building-basic-perspective-projection-matrix]
[https://www.scratchapixel.com/lessons/3d-basic-rendering/perspective-and-orthographic-projection-matrix/building-basic-perspective-projection-matrix https://www.scratchapixel.com/lessons/3d-basic-rendering/perspective-and-orthographic-projection-matrix/building-basic-perspective-projection-matrix]


The projection matrix applies a perspective projection based on the FOV of the camera. This is done dividing the x,y view coordinates by the z-coordinate so that further object appear closer to the center. Note that the output is typically in normalized device coordinates [-1, 1] rather than pixel coordinates.
The projection matrix applies a perspective projection based on the field of view of the camera. This is done dividing the x,y view coordinates by the z-coordinate so that further object appear closer to the center. Note that the output is typically in normalized device coordinates <math>[-1, 1]\times[-1, 1]</math> rather than image coordinates <math>[0, W] \times [0, H]</math>.


Notes: In computer vision, this is called the calibration matrix <math>K</math>.  
Notes: In computer vision, this is called the calibration matrix <math>K</math>.