[Link].
CSE(AIML), V-SEMESTER
COMPUTER VISION & IMAGE PROCESSING – 2333503(Professional Core)
UNIT I: Introduction to Computer Vision and Image
Processing
Introduction
Technology has become an integral part of our daily lives. Modern computers are no longer
limited to processing text and numbers; they can also analyze and interpret images and videos.
This capability is made possible through Computer Vision and Image Processing.
Humans use their eyes and brain to observe and understand their surroundings. Similarly, a
computer uses a camera to capture images and specialized algorithms to process and understand
them. Computer Vision aims to enable machines to interpret visual information in a way similar
to human vision.
Image Processing focuses on improving the quality of images or extracting useful information
from them. It is often the first step in many Computer Vision systems.
Real-Life Examples
Face unlock in smart phones
QR code scanners
Google Lens
CCTV surveillance
Self-driving cars
Medical image analysis
Computer Vision is a branch of Artificial Intelligence (AI) that enables computers to acquire,
process, analyze, and understand digital images and videos to make meaningful decisions.
Working of Computer Vision
Scene/Object
Camera captures image
Image Processing
Feature Extraction
Object Recognition
Decision Making
Example
When you unlock your mobile phone using Face Unlock:
Camera captures your face.
Computer analyzes facial features.
Features are compared with stored data.
If matched, the phone unlocks.
This entire process is an example of Computer Vision.
Image Processing is the process of performing operations on an image to improve its quality or
extract useful information from it.
Working of Image Processing
Input Image
Image Processing
(Brightness, Noise Removal,
Filtering, Enhancement)
Enhanced Image
Examples
Increase image brightness
Remove noise from an image
Sharpen blurred images
Resize images
Improve image contrast
Differences between Image Processing & Computer Vision
Image Processing Computer Vision
Improves image quality Understands image content
Output is another image Output is information or a decision
Focuses on image enhancement Focuses on image understanding
Image Processing Computer Vision
Low-level processing High-level analysis
Example: Noise removal Example: Face recognition
Scope of Computer Vision
The scope of Computer Vision is continuously expanding because of advances in Artificial
Intelligence, Machine Learning, and Deep Learning.
Computer Vision is widely used in almost every field where image or video analysis is required.
Healthcare, Agriculture, Transportation, Security and Surveillance,
Manufacturing, Robotics, Education, Banking, Retail, Space Research
Historical Development of Computer Vision
Understanding the evolution of Computer Vision helps us appreciate how the field has
progressed over time.
1950s Research on digital image processing began.
1960s Computer Vision emerged as a separate research field.
1970s Development of edge detection and image segmentation techniques.
1980s Pattern recognition and machine vision applications expanded.
1990s Face detection and object recognition techniques became popular.
2000s Machine Learning improved object classification and recognition.
2012
Deep Learning significantly increased Computer Vision accuracy.
onwards
Computer Vision is widely used in healthcare, robotics, autonomous vehicles, smart
Present
cities, and surveillance.
Simple Timeline Diagram
1950s
Digital Image Processing
1960s
Birth of Computer Vision
1970s
Edge Detection
1980s
Pattern Recognition
1990s
Face Detection
2000s
Machine Learning
2012+
Deep Learning
Today
AI-based Computer Vision
Applications
Computer Vision is widely used in real-world applications.
1. Face Recognition
Mobile Face Unlock
Banking
Colleges and Universities
Airport security
Hospitals
Offices
Law Enforcement
Smart Homes
Social Media
2. Medical Imaging
X-ray analysis
MRI scanning
Tumor detection
3. Traffic Monitoring
Vehicle counting
Automatic traffic signal control
Accident detection
4. OCR (Optical Character Recognition)
Reading printed documents
Passport scanning
Aadhaar card verification
5. Self-driving Cars
Lane detection
Pedestrian detection
Traffic sign recognition
6. Agriculture
Crop health monitoring
Pest detection
Yield estimation
7. Industrial Automation
Defect detection
Product quality inspection
8. Robotics
Object identification
Navigation
Pick-and-place operations
9. Surveillance
CCTV monitoring
Intruder detection
Crowd analysis
10. Satellite Imaging
Weather forecasting
Disaster management
Land-use analysis
Image Formation
Definition
Image formation is the process of creating a digital image by capturing light reflected from an
object using an imaging device such as a camera or scanner.
Example
Imagine taking a selfie.
Light falls on your face.
The light is reflected.
Mobile camera lens collects the reflected light.
The image sensor converts light into electrical signals.
The processor converts the signals into a digital image.
Image Formation Process
Light Source
│
▼
Real Object
│
Reflected Light
│
▼
Camera Lens
│
▼
Image Sensor
(CCD/CMOS)
│
▼
Digital Image
Digital Image
A digital image is a two-dimensional array of tiny picture elements called pixels. Denoted as
f(x,y).
f(x,y) = Intensity (brightness) at pixel (x, y)
x = Horizontal coordinate
y = Vertical coordinate
Example:
□□□□□□□□
Each small square represents a pixel.
Pixel
Definition
A pixel (Picture Element) is the smallest unit of a digital image.
Each pixel stores intensity or color information.
Example:
5 × 5 Image
PPPPP
PPPPP
PPPPP
PPPPP
PPPPP
Total Pixels = 25
Image Acquisition Methods
Real-world light energy (photons) is transformed into electrical voltage via sensors. Cameras use
three main sensor topologies:
1. Single Sensor: A single photodiode moves mechanically in $X$ and $Y$ directions to
scan an image (very slow; used in high-precision micro-scanning).
2. Sensor Strip: An inline 1D row of sensors sweeps across a scene line-by-line (used in
flatbed scanners and satellite imaging).
3. Sensor Array: A 2D grid of sensors arranged on a single chip (CCD or CMOS). It
captures an entire frame instantaneously (used in standard digital cameras and
smartphones).
1. Digital Camera
Applications:
Mobile Camera
DSLR
CCTV
2. Scanner : Used to convert paper documents into digital images.
Applications:
Document scanning
Passport scanning
3. Medical Imaging
Examples
MRI
CT Scan
X-ray
4. Satellite Imaging
Used in
Weather forecasting
Agriculture
Remote sensing
5. Webcam
Applications
Video conferencing
Online classes
Face recognition
Acquisition Flow
Real Object
Camera / Scanner
Image Sensor
↓
Digital Image
Computer
Sampling
Sampling is the process of dividing a continuous image into small discrete pixels. If you take a
grid and place it over a painting, each square in that grid becomes a pixel. A 1024 X1024 grid
has higher spatial resolution than a 256 X 256 grid. If sampling is too low, the image looks
pixelated and suffers from aliasing (jagged edges).
Resolution=M×N
Example
Imagine drawing a picture on graph paper.
Large number of boxes
Better picture quality
Small number of boxes
Poor quality
Key Point:-
Sampling affects
Resolution
Image Size
Sharpness
Quantization
Quantization is the process of assigning intensity values to each sampled pixel. If we use k bits
per pixel, the number of discrete gray levels L is defined as:
L = 2b
For standard 8-bit grayscale images, L = 28 = 256 levels, ranging from 0 (pure black) to 255
(pure white). If quantization is too low (e.g., 2-bit or 1-bit), smooth gradients (like a sky sunset)
turn into harsh, visible bands, a distortion known as false contouring.
Example
Suppose one pixel can store
Only four intensity levels.
If it stores
0–255
It has 256 gray levels.
Diagram
Continuous Light
Sampling
Pixels
↓
Quantization
Pixel Values
(0–255)
Important Point
Sampling Number of Pixels && Quantization Intensity Values
Difference Between Sampling and Quantization
Sampling Quantization
Determines pixels Determines intensity
Affects resolution Affects brightness
Spatial resolution Gray levels
Done first Done after sampling
Color Spaces
Definition
A color space is a mathematical method used to represent colors digitally.
Common Color Spaces -
RGB – Three Primary Colors
Red = 255
Green = 0 Used in Computer Monitors, Mobile Phones, Television
Blue = 0
HSV
Hue –Type of Color
Saturation – Purity of Color Used in Color detection, Object tracking
Value - Brightness
Grayscale – Stores only Brightness
Black = 0 Use in Medical Images, OCR, Edge Detection
White = 255 0 ≤ I ≤ 255
CMYK
Cyan
Magenta used in Printers
Yellow
Black
Color Space Usage
RGB Displays
HSV Image Analysis
Grayscale Image Processing
CMYK Printing
Color Models
A color model defines how colors are represented using numerical values.
Models Difference Between Color Spaces and Color
Color Space Color Model
Defines the range or organization of Describes how individual colors are represented using
colors in a system numerical components
Examples: RGB space, HSV space Examples: RGB model, CMYK model
Used to organize colors Used to represent and manipulate colors