0% found this document useful (0 votes)
14 views26 pages

Lecture 3 and 4

The document outlines the course details for CSET344/CMCA544 on Image and Video Processing, coordinated by Dr. Gaurav Kumar Dashondhi. It covers fundamental concepts in digital image processing, including image acquisition, storage, enhancement, and representation, as well as basic terminologies and techniques such as intensity transformation and contrast stretching. The course is scheduled from January 13 to January 17, 2025.

Uploaded by

hurraysmart141
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views26 pages

Lecture 3 and 4

The document outlines the course details for CSET344/CMCA544 on Image and Video Processing, coordinated by Dr. Gaurav Kumar Dashondhi. It covers fundamental concepts in digital image processing, including image acquisition, storage, enhancement, and representation, as well as basic terminologies and techniques such as intensity transformation and contrast stretching. The course is scheduled from January 13 to January 17, 2025.

Uploaded by

hurraysmart141
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 26

CSET344/CMCA544

Image and Video Processing

Dr. Gaurav Kumar Dashondhi


Ph.D. IIT Bombay

Overall Course Coordinator- Lect. Week


Dr. Gaurav Kumar Dashondhi 13th Jan to 17th Jan 2025
[email protected]
1
Elements of Digital Image Processing Systems

Scanners
Image Acquisition Cameras

Hard Drives
Image Storage Solid State Drives (SSD)

Image Enhancement
Image Restoration
Image Processing Image Segmentation
Image Analysis

Image Image Transmission using


Communication different networks like LAN, WAN

Image Display Monitors


Printers
2
EM Spectrum

Refer: https://www.lumitex.com/blog/visible-light-spectrum

3
Image Sampling and Quantization

The output of the sensor is


continuous voltage waveform
whose amplitude and
coordinates are continuous.

4
Image Sampling and Quantization
Z
Sampling : Discretizing the time axis or coordinate.

Quantization : Discretizing the amplitude axis.

Digital image : Sampling and Quantization

A B

Y A- Image Projected on sensor array.


B – Result of sampling and quantization.
X,Y are Coordinates.
Z is the amplitude.

5
Representation of Digital images

0 0 0 0 0 0 0 0 0 0
0 1 1 1 0 0 255 255 255 0
0 0 0 1 0 0 0 0 255 0
0 1 1 1 0 0 255 255 255 0
R,G,B
0 0 0 1 0 0 0 0 255 0
0 1 1 1 0 0 255 255 255 0
0 0 0 0 0 0 0 0 0 0

Black and White Image Gray Scale Image Colour Image


Range 0 to 1 Range 0 to 255 Red Channel Range 0 to 255
Green Channel Range 0 to 255
Blue Channel Range 0 to 255

6
Representation of digital image

It’s a two dimensional function f(x , y) where x, y are the spatial coordinate and the amplitude at that particular
coordinate will be the intensity or grey level.

Center of an Image with dimension M x N is obtained


by Dividing the M and N by 2 and rounding it off to
the nearest integer.

7
Basic Terminologies

Pixel (dots) - It’s a smallest unit of a digital image.

0 0 0 0 0 720 1080
0 255 255 255 0
0 0 0 255 0
F(4,4)
0 255 255 255 0 HD 1920
FULL HD
1320
1320 x 720 1920 x 1080
0 0 0 255 0
0 255 255 255 0
0 0 0 0 0 2100

3800
ULTRA 4k
3800 x 2100

8
Basic Terminologies
Spatial Domain

Spatial means Location.


An image made by pixels. Each pixel has some intensity values.
A domain, where intensity or magnitude values are reflected based on the location.

Image Storage and Intensity levels

Lets say size of the image is M x N and its a 8-bit image. Total bits required = M x N x k.

Example: M = 2048, N = 2048 and k = 16 bit image

Total no of bits = 2048 x 2048 x 16 = 67108864 bits


67108864/8 = 8388608 bytes (1 byte = 8 bits)
8388608/1024 = 8192 Kbytes (1kb = 1024 bytes)

No. of intensity levels = 2^k. if 8 bit image then 2^8 = 256 intensity levels or Grey levels (0 to 255).

9
Basic Terminologies
Dynamic Range, Contrast and Contrast Ratio

Dynamic Range: Dynamic range of any image processing system is the ratio of maximum measurable intensity
to minimum detectable intensity.

Example : [255, 1] = 20log(255/1) = approx. 48dB

Dynamic range in terms of images or image contrast or contrast ratio: Difference between highest and lowest
intensity levels in an image.

High dynamic range = Bright or Clear image.


Low dynamic range = Image dull

Dots per inch (Dpi), Resolution

Resolution means how many Dots per inch (DPI) or Pixel per inch (PPI). It directly refer to the clarity of the
image. If resolution is high, it means more information or details can be identified in better way.

10
Basic Terminologies

Spatial Resolution

Spatial Resolution: Capability of sensor to distinguish between two closely spaced objects.

Higher Spatial Resolution: Pixel size is small and one can see more details.

Lower Spatial Resolution: Pixel size is big and one can not distinguish between two closely spaced objects.
11
Basic Terminologies
Intensity Resolution

Capability to resolve different intensity or brightness levels or color in color image.

High Intensity Resolution:

Ability to capture wide range of brightness or intensity levels.

For 32 bit image 2^32 = 65536 intensity or grey levels.

Low Intensity Resolution:

Ability to capture small range of brightness or intensity levels.

For 8 bit image 2^8 = 256 intensity or grey levels.

12
Basic Relationship Between Pixels

Four Neighbors of P, N4(P)

(x-1,y)
(x,y-1) p(x,y) (x,y+1) 8 Neighbors of P N8(p) = N4(P) + ND(P)
(x+1,y)
(x-1,y-1) (x-1,y) (x-1,y+1)
(x,y-1) p(x,y) (x+1,y+1)
Four Diagonal Neighbors of P,ND(P)
(x+1,y-1) (x+1,y) (x+1,y+1)
(x-1,y-1) (x-1,y+1)
p(x,y)
(x+1,y-1) (x+1,y+1)

13
Distance Measures

1.Euclidean Distance:

[(x-s)^2 + (y-t)^2]1/2

2.City Block Distance:


P(3,3) Q1(3,4) Q2(3,5)
P(x,y)
|x-s|+|y-t| Q3(4,4)
P(2,2)
Q4(5,5)
Q(s,t)
Q(4,4) 3.Chess Board Distance:
Find the distance between
Max{|x-s|,|y-t|} (P,Q1)
(P,Q2)
(P,Q3)
(P,Q4)

14
Basic Relationship Between Pixels

City Block Distance Chess Board Distance

2 2 2 2 2 2
2 1 2 2 1 1 1 2
2 1 0 1 2 2 1 0 1 2
2 1 2 2 1 1 1 2
2 2 2 2 2 2

15
Image Enhancement in the Spatial Domain

Spatial Domain

Intensity Transformation Spatial Filtering

(x-1,y+1) (x,y+1) (x+1,y+1)


P(x,y) (x-1,y) p(x,y) (x+1,y)
(x-1,y-1) (x,y-1) (x+1,y-1)

It is applied on a single pixel. It is applied on group or Neighborhood of pixels.


For Example – For Example –
Contrast Manipulation, Image Smoothening,
Image Thresholding, etc. Image Sharpening, etc.
16
Intensity Transformation

Different approaches for intensity transformation:


F(X0,Y0)
1.Identity Transform, (S = T(r)), Linear Transformation

2. Image Negative (Linear Transformation)


Intensity transformation are such kind of
approaches where results are depend on the 3. Log Transform and Exponential Transform
intensity at a point.
4. Power law Transformation (Gamma Correction)
S = T(r), where S = output intensity.
T = Transformation function. 5.Piecewise Linear Transformation Function
r = input intensity. 5.1 Contrast Stretching
5.2 Grey scale to binary image using thresholding.

Smallest possible neighbourhood is 1x1, where


output of transformation function depends only on
a single point or single pixel.

17
Intensity Transformation

18
Intensity Transformation: Image
Negative
Motivation : These kind of transformation is used to enhance grey level information embedded in the dark region of
an image or it is required when black area is dominant in size as compared to white region.
S=L–1–r
where L = Maximum Intensity Level
r = Input Intensity Level
S = Output Intensity Level
Consider 8-bit (0 - 255). Where L = 255.

r S = L-r S = L-r-1 S = L-r-2 S = L-r-3 S = L-r-4

10
20
30
40
19
Intensity Transformation: Log Transformations

Motivation : These transformation used to expand the dark pixel in an image while compressing the higher-level
values.
S = clog(1+r), where L = Maximum Intensity Level
r = Input Intensity Level
S = Output Intensity Level, C = constant. C = L-1/log(1+rmax)

r S = C log(1+r)
Consider 8-bit image. Where L = 255 and rmax = 255
0
Calculate S value ?
1
5
200
220
240
20
Intensity Transformation: Power Law Transformations (Gamma Correction)
Motivation : Visual quality of image may be hampered by illumination condition or wrong setting of camera sensor.
To rectify the same, one can utilized power law transformation or Gamma Corrections.
Basic idea is to raise the pixel value with certain power to improve the overall brightness and contrast of
the image.

S = c r^y,
where

r = Input Intensity Level


S = Output Intensity Level, C = constant. C = 255 if 8-bit image.
If y< 1
Contrast Increasing
else:
Contrast Decreasing.
21
Intensity Transformation: Power Law Transformations (Gamma Correction)

3 x 3 Input Image
10 200 150
20 100 90 S = c r^y
70 50 220
C = 255
r = image(x,y)/ 255

Note: Considering 8-bit image.

Y=0.5 Y=1 Y=2

22
Piecewise Linear Transformation Function: Contrast Stretching
Motivation : Low Contrast image can result from poor illumination, lack of dynamic range in the imaging sensor
or even thought the wrong setting of a lens aperture during image acquisition.
Contrast stretching expands the intensity range to utilize the full dynamic range of the sensor.

Min-Max Contrast Stretching


S = (r – Imin) x ((Omax-Omin)/(Imax - Imin)) + Omin

S = Output Intensity Level


r = Input Intensity Level
Omax = Maximum Output
Omin = Minimum Output
Imax = Maximum input
Imin = Minimum input

23
Piecewise Linear Transformation Function: Contrast Stretching
S = (r – Imin) x ((Omax-Omin)/(Imax - Imin)) + Omin S = Output Intensity Level
r = Input Intensity Level
Omax = Maximum Output
Omin = Minimum Output
Before Transformation Imax = Maximum input
Imin = Minimum input
10 5 150
20 100 90
Apply Contrast Stretching for r =10
70 50 30
Omax = 255, Omin = 0
After Transformation Imax = 150, Imin = 5

New pixel value S = (5-5)x((255-0)/(150-5)) + 0

New pixel value S = ((150-5)x((255-0)/(150-5))) + 0

24
Piecewise Linear Transformation Function: Thresholding
output Intensity s

If r1 = r2
S1 = 0 and S2 = L-1

Input Intensity r

25
26

You might also like