unit 2
unit 2
UNIT-2
Lecture-1
Camera
• A camera captures light from a scene.
• It records an image using a sensor.
• The sensor can be digital or analog.
• Digital sensors include CMOS and CCD types.
• sensors use film for recording images.
• Cameras help in capturing visual scene details.
Camera
Camera Geometry
• A camera captures a real 3D scene.
• The image is converted into 2D format.
• This conversion leads to losing one dimension.
• Computer vision helps recover missing information.
• It provides a high-level image understanding.
• CV restores 3D details from 2D images.
Camera Models
• A camera model represents 3D to 2D projection.
• It helps in calibration, vision, and reconstruction.
• Models vary based on lens and projection methods.
• Different applications require specific camera models.
• Understanding models improves image processing tasks.
• Camera models are essential for accurate vision.
Types of Camera Models
✅ Pinhole model for basic image projection.
✅ Thin lens model for real-world photography.
✅ Affine model for flat imaging applications.
✅ Projective model for 3D reconstruction.
✅ Fish-eye model for wide-angle imaging.
✅ Omnidirectional model for robotics and self-driving cars.
Working of Camera
Comparison of Camera Models
Camera Model Lens? Depth Info? Used in Pros Cons
Needs high
Pinhole Model ❌ No ✅ Yes CV, AI No distortion
light
Thin Lens Autofocus,
✅ Yes ✅ Yes Photography Lens distortion
Model zoom
Satellites, Fast
Affine Model ✅ Yes ❌ No No perspective
scanners processing
Projective
✅ Yes ✅ Yes 3D vision, AI Realistic Complex math
Model
VR, 360°
Fish-Eye Model ✅ Yes ✅ Yes Ultra-wide view Image warping
cameras
• .Projective Geometry:
• It extends Euclidean geometry
• by adding points at infinity,
• making it possible to handle perspective transformations.
Projective Geometry
Homogeneous coordinates
• simply add an extra dimension to the bottom of the vector
• with an entry of 1.
• We then multiply the entire new vector
• by an arbitrary scaling factor kp, like so:
Homogeneous coordinates
• To transform back to our original x, y representation,
• divide the first two vector entries by the third entry
• which is always equal to the scaling factor kp,
• and we arrive back at our original x and y terms.
Example
Homography
• A homography is a special matrix
• transforms one plane to another
• while preserving straight lines.
• It is represented as a 3×3 matrix
Homography
• It preserves collinearity and cross ratio
• collinearity (straight lines remain straight)
• cross-ratio (ratios of distances along a line remain
unchanged).
Homography
Homography
• (x,y,w) are the homogeneous coordinates
• (x′,y′,w′) are the transformed coordinates.
• H is the homography matrix.
• To convert back to Euclidean coordinates:
Properties of Homography
• A homography transformation:
• Maps straight lines to straight lines.
• Preserves collinearity
• (points that lie on a line remain on a line after transformation).
• Can handle perspective distortions
• (e.g., a tilted book page appearing rectangular).
• Needs at least 4 points to compute.
Example
Example
Example
Computing Homography from 4 Points
Applications of Homography
• Image Stitching (Panoramic Photos)
• Takes two overlapping images and aligns them.
• Used in Google Photos & Photoshop.
• Perspective Correction
• Used to correct tilted images, such as scanning documents.
Thank You