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 CV, AI No distortion
❌ No ✅ Yes light
Thin Lens Autofocus,
Photography Lens
Model ✅ Yes ✅ Yes zoom
distortion
Satellites, Fast
Affine Model No
✅ Yes ❌ No scanners processing
perspective
Projective
3D vision, AI Realistic Complex
Model ✅ Yes ✅ Yes
math
VR, 360°
Fish-Eye Ultra-wide Image
✅ Yes ✅ Yes cameras
Model view warping
Robotics, Comple
Omnidirection 360° capture
✅ Yes ✅ Yes self- x
Thank
You
INT345: COMPUTER VISION
UNIT-2
Lecture-2
Pin Hole camera
• Simplest way to represent 3D scene into 2D
image plane.
• It does not use any lenses
• It relies on a small aperture (pinhole)
• to allow light rays to pass through
• and form an inverted image on the opposite side.
Working Principle
• A pinhole camera consists of:
✅ A small hole (aperture) that lets light in.
✅ A light-tight box that prevents other light from
entering.
✅ A screen or film where the image is projected.
Projection Mechanism
• Light from a 3D object passes through the
pinhole.
• The image forms upside down on the image
plane.
• The smaller the pinhole,
• the sharper the image
• but darker it becomes.
Pin Hole Camera
Pin Hole Camera
𝑃=𝐾[𝑅∣𝑡]
projection matrix-
• .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