SlideShare a Scribd company logo
CSC447: Digital Image
Processing
Chapter 2: Digital Image Fundamentals
Prof. Dr. Mostafa Gadal-Haqq M. Mostafa
Computer Science Department
Faculty of Computer & Information Sciences
AIN SHAMS UNIVERSITY
What is a Digital Image?
 Real Images
 A real image can be
represented as a two-
dimensional continuous
light intensity function
g(x,y); where x and y
denote the spatial
coordinates and the value
of g is proportional to the
brightness (or gray level)
of the image at that point.
g(x,y)
y
x
2CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
What is a Digital Image?
 Digital Images
 A digital image is the
sampling and quantization
of a two-dimensional real
image both in spatial
coordinates and brightness.
 A digital image I(m,n) =
samples of g(x,y); where m
and n are integers, and I is
the intensity at m and n .
n
m
I(m,n)
3CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Acquisition
 A digital imaging system (digital camera).
4CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Acquisition
 Sampling & Quantization
5CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Acquisition
 What is the best quantization level ?
 Digital images are typically quantized to 256
gray levels.
6CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Acquisition
 Sampling & Quantization
7CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Acquisition
 Effect of Quantization
256
64
128
32
16
4
8
2
8CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Representation
 A digital image can be
represented as a two-dimensional
matrix.
n
m
I(m,n)
i(1,1) i(1,2) ……. i(1, n-1)
i(2,1) i(2,2) ……. i(2, n-1)
. .
. . . . . . . . . . . .
. .
i(m-1,1) i(m-1,2) … i(m-1, n-1)
I(mn) =
• Each element is called a pixel (picture
element).
• A color (RGB) image is represented
by a 3-dimensional matrix I(mxnx3)
9CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Size
 The size of a digital image is determines by its
dimensions ( M x N ) multiplied by the number of
bits b required to store the intensity levels (L = 2b).
 image size = M x N x b (bits)
 Typical values of b are:
 b = 1 black and white (binary) images.
 b = 8 grayscale (256 gray levels), or
indexed color images
 b = 24 RGB color image.
10CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Resolution
 Digital image resolution is determined by the
number of pixels (samples) in the image.
11CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital Image Resolution
 Digital image with low resolution has low
quality.
1024x1024x8 512x512x8 256x256x8
128x128x8 64x64x8 32x32x8
12CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital image Types
 RGB (Color) Images
Each pixel is a mixture of
three values of Red, Geen,
and Blue.
R,G,B = {0-255, 0-255, 0-255}
0 = Black
255 = White
In normalized values:
R,G,B = {0-1, 0-1, 0-1}
0 = Black
1 = White
13CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Color Map
Indices
R G BIndex
1
2
3
4
5
6
7
8
.
.
Digital image Types
 Indexed (Color) Images
In order to reduce the color image
size,each pixel is given the index
of a color In a color table (color
map).
14CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital image Types
 Grayscale (Intensity) Images
Each pixel is given
a gray level value
between 0 – 255 or
between 0 – 1.
We need 8 bits to
store a grayscale
value.
15CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Digital image Types
 Black and white (Binary) Images
• Each pixel has one of two gray levels either black (0) or white (1).
• We need 8 bits to store a grayscale value.
16CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of Pixel Neighborhoods
•Image sampling:
•Rectangular sampling - In most cases, images are sampled by laying
a rectangular grid over an image.
•Hexagonal sampling - An alternative sampling scheme is shown.
•Pixel Neighborhoods:
•4-connected and 8-connected neighborhood (Rectangular sampling)
•6-connected neighborhood (Hexagonal sampling)
17CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of Pixel Neighborhoods
4-connected 8-connected 6-connected
 Basic Relationships Between Pixels
18CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Distance Measures
 If pixels p and q have coordinates (x, y) and (s, t),
respectively.
 The Euclidean distance between p and q
 De(p, q) = [(x – s)2 + (y – t) 2] ½
 The D4 (City-block ) distance between p and q
 D4(p, q) = |x – s| + |y – t|
 The D8 (Chessboard ) distance between p and q
 D8(p, q) = max( |x – s| , |y – t| )
19CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Distance Measures
 Results of D4 and D8 distances
 The pixels with D4=1 are the 4-neighbors
 The pixels with D8=1 are the 8-neighbors
20CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Adjacency, Connectivity, Regions, and Boundaries
 Adjacency:
 4-adjacency : Two pixels p and q are 4-adjacent if
q is in the set N4(p).
 8-adjacency. Two pixels p and q are 8-adjacent if
q is in the set N8(p).
 Connectivity: Let S represent a subset of pixels:
 Two pixels p and q are said to be connected in S
if there exists a path between them consisting
entirely of pixels in S.
 the set of pixels that are connected to each other
in S is called a connected component of S.
21CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Adjacency, Connectivity, Regions, and Boundaries
 Path:
 A (digital) path (or curve) from pixel p with coordinates (x, y)
to pixel q with coordinates (s, t) is a sequence of distinct
pixels with coordinates
(x0 , y0), (x1 , y1), …, (xn , yn)
where (x0 , y0)= (x, y); (xn , yn)= (s, t); and
pixels (xi , yi) and (xi-1 , yi-1) are adjacent for 1<= i <= n.
 In this case, n is the length of the path. If (x0 , y0)= (s, t) the
path is a closed path.
 We can define 4- or 8-paths depending on the type of
adjacency specified.
22CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Adjacency, Connectivity, Regions, and Boundaries
 Region:
 If R be a subset of pixels in an image, we call R a
region of the image if R is a connected set.
 Boundary:
 The boundary (also called border or contour) of a
region R is the set of pixels in the region that have
one or more neighbors that are not in R.
23CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Adjacency, Connectivity, Regions, and Boundaries
24CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
Operation Characterization Complexity/Pixel
Point
the output value at a specific coordinate is
dependent only on the input value at
that same coordinate.
constant
Local
the output value at a specific coordinate is
dependent on the input values in the
neighborhood of that same coordinate.
P2
Global
the output value at a specific coordinate is
dependent on all the values in the input
image.
N2
 Operation Domain
25CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
26CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Pixel Operations
27CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Local Operations
28CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Local Operations
29CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Arithmetic Operations
30CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Arithmetic Operations
31CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Logical Operations
32CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Sets Operations
33CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Sets Operations
34CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Geometric Operation
(Transformation)
35CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Space Transformations
36CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Types of image Operations
 Space Transformation
37CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Categories of Image Operations
 Linear and Nonlinear Operations
 H is said to be a linear operator if, for any two
images f and g and any two scalars a and b,
H( a f + b g ) = a H( f ) + b H( g )
 Operations that do not satisfy this condition is
called nonlinear operations
38CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Homework 1
 Problems:
 Page 72: 2.9, 2.10, 2.11
 Page 73: 2.12, 2.14, 2.15, 2.20
39CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Next time
Image Enhancement
In
The Spatial Domain
40CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
Ad

More Related Content

What's hot (20)

Image Sampling and Quantization.pptx
Image Sampling and Quantization.pptxImage Sampling and Quantization.pptx
Image Sampling and Quantization.pptx
RUBIN (A) JEBIN
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
Dr. A. B. Shinde
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
Amnaakhaan
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
kiruthiammu
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
Mostafa G. M. Mostafa
 
Image Processing Basics
Image Processing BasicsImage Processing Basics
Image Processing Basics
Dr. A. B. Shinde
 
image compression ppt
image compression pptimage compression ppt
image compression ppt
Shivangi Saxena
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
asodariyabhavesh
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
Dr. A. B. Shinde
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
Dr. A. B. Shinde
 
Histogram Equalization
Histogram EqualizationHistogram Equalization
Histogram Equalization
Kalyan Acharjya
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
Priyanka Pachori
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
Pallavi Agarwal
 
Sharpening spatial filters
Sharpening spatial filtersSharpening spatial filters
Sharpening spatial filters
Research Scholar in Manonmaniam Sundaranar University
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Poonam Seth
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
Visvesvaraya National Institute of Technology, Nagpur, Maharashtra, India
 
Image compression .
Image compression .Image compression .
Image compression .
Payal Vishwakarma
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
BCET, Balasore
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
Gayathri31093
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
asodariyabhavesh
 
Image Sampling and Quantization.pptx
Image Sampling and Quantization.pptxImage Sampling and Quantization.pptx
Image Sampling and Quantization.pptx
RUBIN (A) JEBIN
 
Digital Image Fundamentals
Digital Image FundamentalsDigital Image Fundamentals
Digital Image Fundamentals
Dr. A. B. Shinde
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
Amnaakhaan
 
Color Image Processing
Color Image ProcessingColor Image Processing
Color Image Processing
kiruthiammu
 
Digital Image Processing: Image Segmentation
Digital Image Processing: Image SegmentationDigital Image Processing: Image Segmentation
Digital Image Processing: Image Segmentation
Mostafa G. M. Mostafa
 
Chapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woodsChapter 1 and 2 gonzalez and woods
Chapter 1 and 2 gonzalez and woods
asodariyabhavesh
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
Dr. A. B. Shinde
 
Edge Detection and Segmentation
Edge Detection and SegmentationEdge Detection and Segmentation
Edge Detection and Segmentation
Dr. A. B. Shinde
 
Wavelet based image compression technique
Wavelet based image compression techniqueWavelet based image compression technique
Wavelet based image compression technique
Priyanka Pachori
 
Smoothing in Digital Image Processing
Smoothing in Digital Image ProcessingSmoothing in Digital Image Processing
Smoothing in Digital Image Processing
Pallavi Agarwal
 
Image Restoration
Image RestorationImage Restoration
Image Restoration
Poonam Seth
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
BCET, Balasore
 
Image Enhancement - Point Processing
Image Enhancement - Point ProcessingImage Enhancement - Point Processing
Image Enhancement - Point Processing
Gayathri31093
 
Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)Chapter 3 image enhancement (spatial domain)
Chapter 3 image enhancement (spatial domain)
asodariyabhavesh
 

Similar to Digital Image Processing: Digital Image Fundamentals (20)

Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
Mostafa G. M. Mostafa
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
Taymoor Nazmy
 
Fundamentals of image processing
Fundamentals of image processing  Fundamentals of image processing
Fundamentals of image processing
BCET, Balasore
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processing
nikesh gadare
 
03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
babak danyal
 
3958594.ppt
3958594.ppt3958594.ppt
3958594.ppt
faizalkhan673954
 
Distance measures in Image in Digital Image Processing
Distance measures in Image in Digital Image ProcessingDistance measures in Image in Digital Image Processing
Distance measures in Image in Digital Image Processing
sahooarka582
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentals
KNaveenKumarECE
 
Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
Mostafa G. M. Mostafa
 
Chapter-1.pptx
Chapter-1.pptxChapter-1.pptx
Chapter-1.pptx
SMohiuddin1
 
Digital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptDigital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.ppt
MrsSDivyaBME
 
From Image Processing To Computer Vision
From Image Processing To Computer VisionFrom Image Processing To Computer Vision
From Image Processing To Computer Vision
Joud Khattab
 
2. IP Fundamentals.pdf
2. IP Fundamentals.pdf2. IP Fundamentals.pdf
2. IP Fundamentals.pdf
DrNVaijayanthiDeanRD
 
chap2.ppt
chap2.pptchap2.ppt
chap2.ppt
akshaya870130
 
Module 1.pptx
Module 1.pptxModule 1.pptx
Module 1.pptx
Mattupallipardhu
 
digital image processing, image processing
digital image processing, image processingdigital image processing, image processing
digital image processing, image processing
Kalyan Acharjya
 
csc447dipch10-160628144302.pdf
csc447dipch10-160628144302.pdfcsc447dipch10-160628144302.pdf
csc447dipch10-160628144302.pdf
satyanarayana242612
 
Noise recognition in digital image
Noise recognition in digital imageNoise recognition in digital image
Noise recognition in digital image
Reyad Hossain
 
Noise recognition in digital image
Noise recognition in digital imageNoise recognition in digital image
Noise recognition in digital image
Reyad Hossain
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation ppt
KNaveenKumarECE
 
Digital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial DomainDigital Image Processing: Image Enhancement in the Spatial Domain
Digital Image Processing: Image Enhancement in the Spatial Domain
Mostafa G. M. Mostafa
 
Image processing 1-lectures
Image processing  1-lecturesImage processing  1-lectures
Image processing 1-lectures
Taymoor Nazmy
 
Fundamentals of image processing
Fundamentals of image processing  Fundamentals of image processing
Fundamentals of image processing
BCET, Balasore
 
introduction to Digital Image Processing
introduction to Digital Image Processingintroduction to Digital Image Processing
introduction to Digital Image Processing
nikesh gadare
 
03 digital image fundamentals DIP
03 digital image fundamentals DIP03 digital image fundamentals DIP
03 digital image fundamentals DIP
babak danyal
 
Distance measures in Image in Digital Image Processing
Distance measures in Image in Digital Image ProcessingDistance measures in Image in Digital Image Processing
Distance measures in Image in Digital Image Processing
sahooarka582
 
digital image processing chapter two, fundamentals
digital image processing chapter two, fundamentalsdigital image processing chapter two, fundamentals
digital image processing chapter two, fundamentals
KNaveenKumarECE
 
Digital Image Processing: An Introduction
Digital Image Processing: An IntroductionDigital Image Processing: An Introduction
Digital Image Processing: An Introduction
Mostafa G. M. Mostafa
 
Digital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.pptDigital Image Fundamentals 1.ppt
Digital Image Fundamentals 1.ppt
MrsSDivyaBME
 
From Image Processing To Computer Vision
From Image Processing To Computer VisionFrom Image Processing To Computer Vision
From Image Processing To Computer Vision
Joud Khattab
 
digital image processing, image processing
digital image processing, image processingdigital image processing, image processing
digital image processing, image processing
Kalyan Acharjya
 
Noise recognition in digital image
Noise recognition in digital imageNoise recognition in digital image
Noise recognition in digital image
Reyad Hossain
 
Noise recognition in digital image
Noise recognition in digital imageNoise recognition in digital image
Noise recognition in digital image
Reyad Hossain
 
quantization and sampling presentation ppt
quantization and sampling presentation pptquantization and sampling presentation ppt
quantization and sampling presentation ppt
KNaveenKumarECE
 
Ad

More from Mostafa G. M. Mostafa (20)

Csc446: Pattern Recognition
Csc446: Pattern Recognition Csc446: Pattern Recognition
Csc446: Pattern Recognition
Mostafa G. M. Mostafa
 
CSC446: Pattern Recognition (LN8)
CSC446: Pattern Recognition (LN8)CSC446: Pattern Recognition (LN8)
CSC446: Pattern Recognition (LN8)
Mostafa G. M. Mostafa
 
CSC446: Pattern Recognition (LN7)
CSC446: Pattern Recognition (LN7)CSC446: Pattern Recognition (LN7)
CSC446: Pattern Recognition (LN7)
Mostafa G. M. Mostafa
 
CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)CSC446: Pattern Recognition (LN6)
CSC446: Pattern Recognition (LN6)
Mostafa G. M. Mostafa
 
CSC446: Pattern Recognition (LN5)
CSC446: Pattern Recognition (LN5)CSC446: Pattern Recognition (LN5)
CSC446: Pattern Recognition (LN5)
Mostafa G. M. Mostafa
 
CSC446: Pattern Recognition (LN4)
CSC446: Pattern Recognition (LN4)CSC446: Pattern Recognition (LN4)
CSC446: Pattern Recognition (LN4)
Mostafa G. M. Mostafa
 
CSC446: Pattern Recognition (LN3)
CSC446: Pattern Recognition (LN3)CSC446: Pattern Recognition (LN3)
CSC446: Pattern Recognition (LN3)
Mostafa G. M. Mostafa
 
Csc446: Pattren Recognition (LN2)
Csc446: Pattren Recognition (LN2)Csc446: Pattren Recognition (LN2)
Csc446: Pattren Recognition (LN2)
Mostafa G. M. Mostafa
 
Csc446: Pattren Recognition
Csc446: Pattren RecognitionCsc446: Pattren Recognition
Csc446: Pattren Recognition
Mostafa G. M. Mostafa
 
Csc446: Pattren Recognition (LN1)
Csc446: Pattren Recognition (LN1)Csc446: Pattren Recognition (LN1)
Csc446: Pattren Recognition (LN1)
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Neural Networks: Introducton
Neural Networks: IntroductonNeural Networks: Introducton
Neural Networks: Introducton
Mostafa G. M. Mostafa
 
Neural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) Algorithm
Mostafa G. M. Mostafa
 
Neural Networks: Support Vector machines
Neural Networks: Support Vector machinesNeural Networks: Support Vector machines
Neural Networks: Support Vector machines
Mostafa G. M. Mostafa
 
Neural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's PerceptronNeural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's Perceptron
Mostafa G. M. Mostafa
 
Neural Networks: Model Building Through Linear Regression
Neural Networks: Model Building Through Linear RegressionNeural Networks: Model Building Through Linear Regression
Neural Networks: Model Building Through Linear Regression
Mostafa G. M. Mostafa
 
Neural Networks: Multilayer Perceptron
Neural Networks: Multilayer PerceptronNeural Networks: Multilayer Perceptron
Neural Networks: Multilayer Perceptron
Mostafa G. M. Mostafa
 
Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)
Mostafa G. M. Mostafa
 
Neural Networks: Self-Organizing Maps (SOM)
Neural Networks:  Self-Organizing Maps (SOM)Neural Networks:  Self-Organizing Maps (SOM)
Neural Networks: Self-Organizing Maps (SOM)
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Restoration
Digital Image Processing: Image RestorationDigital Image Processing: Image Restoration
Digital Image Processing: Image Restoration
Mostafa G. M. Mostafa
 
Digital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency DomainDigital Image Processing: Image Enhancement in the Frequency Domain
Digital Image Processing: Image Enhancement in the Frequency Domain
Mostafa G. M. Mostafa
 
Neural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) AlgorithmNeural Networks: Least Mean Square (LSM) Algorithm
Neural Networks: Least Mean Square (LSM) Algorithm
Mostafa G. M. Mostafa
 
Neural Networks: Support Vector machines
Neural Networks: Support Vector machinesNeural Networks: Support Vector machines
Neural Networks: Support Vector machines
Mostafa G. M. Mostafa
 
Neural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's PerceptronNeural Networks: Rosenblatt's Perceptron
Neural Networks: Rosenblatt's Perceptron
Mostafa G. M. Mostafa
 
Neural Networks: Model Building Through Linear Regression
Neural Networks: Model Building Through Linear RegressionNeural Networks: Model Building Through Linear Regression
Neural Networks: Model Building Through Linear Regression
Mostafa G. M. Mostafa
 
Neural Networks: Multilayer Perceptron
Neural Networks: Multilayer PerceptronNeural Networks: Multilayer Perceptron
Neural Networks: Multilayer Perceptron
Mostafa G. M. Mostafa
 
Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)Neural Networks: Radial Bases Functions (RBF)
Neural Networks: Radial Bases Functions (RBF)
Mostafa G. M. Mostafa
 
Neural Networks: Self-Organizing Maps (SOM)
Neural Networks:  Self-Organizing Maps (SOM)Neural Networks:  Self-Organizing Maps (SOM)
Neural Networks: Self-Organizing Maps (SOM)
Mostafa G. M. Mostafa
 
Ad

Recently uploaded (20)

PUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for HealthPUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for Health
JonathanHallett4
 
Module_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptxModule_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptx
drroxannekemp
 
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic SuccessAerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
online college homework help
 
materi 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblrmateri 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblr
fatikhatunnajikhah1
 
Capitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptxCapitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptx
CapitolTechU
 
Dastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptxDastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptx
omorfaruqkazi
 
How to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo SlidesHow to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo Slides
Celine George
 
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docxPeer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
19lburrell
 
How to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 InventoryHow to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 Inventory
Celine George
 
Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025
Mebane Rash
 
Conditions for Boltzmann Law – Biophysics Lecture Slide
Conditions for Boltzmann Law – Biophysics Lecture SlideConditions for Boltzmann Law – Biophysics Lecture Slide
Conditions for Boltzmann Law – Biophysics Lecture Slide
PKLI-Institute of Nursing and Allied Health Sciences Lahore , Pakistan.
 
Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...
Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...
Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...
EduSkills OECD
 
UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...
UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...
UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...
businessweekghana
 
How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18
Celine George
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Rebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter worldRebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter world
Ned Potter
 
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFAMCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-17-2025 .pptx
YSPH VMOC Special Report - Measles Outbreak  Southwest US 5-17-2025  .pptxYSPH VMOC Special Report - Measles Outbreak  Southwest US 5-17-2025  .pptx
YSPH VMOC Special Report - Measles Outbreak Southwest US 5-17-2025 .pptx
Yale School of Public Health - The Virtual Medical Operations Center (VMOC)
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
PUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health PromotionPUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health Promotion
JonathanHallett4
 
PUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for HealthPUBH1000 Slides - Module 11: Governance for Health
PUBH1000 Slides - Module 11: Governance for Health
JonathanHallett4
 
Module_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptxModule_2_Types_and_Approaches_of_Research (2).pptx
Module_2_Types_and_Approaches_of_Research (2).pptx
drroxannekemp
 
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic SuccessAerospace Engineering Homework Help Guide – Expert Support for Academic Success
Aerospace Engineering Homework Help Guide – Expert Support for Academic Success
online college homework help
 
materi 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblrmateri 3D Augmented Reality dengan assemblr
materi 3D Augmented Reality dengan assemblr
fatikhatunnajikhah1
 
Capitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptxCapitol Doctoral Presentation -May 2025.pptx
Capitol Doctoral Presentation -May 2025.pptx
CapitolTechU
 
Dastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptxDastur_ul_Amal under Jahangir Key Features.pptx
Dastur_ul_Amal under Jahangir Key Features.pptx
omorfaruqkazi
 
How to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo SlidesHow to Add Button in Chatter in Odoo 18 - Odoo Slides
How to Add Button in Chatter in Odoo 18 - Odoo Slides
Celine George
 
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docxPeer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
Peer Assessment_ Unit 2 Skills Development for Live Performance - for Libby.docx
19lburrell
 
How to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 InventoryHow to Manage Manual Reordering Rule in Odoo 18 Inventory
How to Manage Manual Reordering Rule in Odoo 18 Inventory
Celine George
 
Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025Statement by Linda McMahon on May 21, 2025
Statement by Linda McMahon on May 21, 2025
Mebane Rash
 
Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...
Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...
Launch of The State of Global Teenage Career Preparation - Andreas Schleicher...
EduSkills OECD
 
UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...
UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...
UPSA JUDGEMENT.pdfCopyright Infringement: High Court Rules against UPSA: A Wa...
businessweekghana
 
How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18How to Use Upgrade Code Command in Odoo 18
How to Use Upgrade Code Command in Odoo 18
Celine George
 
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales moduleHow To Maximize Sales Performance using Odoo 18 Diverse views in sales module
How To Maximize Sales Performance using Odoo 18 Diverse views in sales module
Celine George
 
Rebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter worldRebuilding the library community in a post-Twitter world
Rebuilding the library community in a post-Twitter world
Ned Potter
 
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFAMCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
MCQS (EMERGENCY NURSING) DR. NASIR MUSTAFA
Dr. Nasir Mustafa
 
The role of wall art in interior designing
The role of wall art in interior designingThe role of wall art in interior designing
The role of wall art in interior designing
meghaark2110
 
PUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health PromotionPUBH1000 Slides - Module 10: Health Promotion
PUBH1000 Slides - Module 10: Health Promotion
JonathanHallett4
 

Digital Image Processing: Digital Image Fundamentals

  • 1. CSC447: Digital Image Processing Chapter 2: Digital Image Fundamentals Prof. Dr. Mostafa Gadal-Haqq M. Mostafa Computer Science Department Faculty of Computer & Information Sciences AIN SHAMS UNIVERSITY
  • 2. What is a Digital Image?  Real Images  A real image can be represented as a two- dimensional continuous light intensity function g(x,y); where x and y denote the spatial coordinates and the value of g is proportional to the brightness (or gray level) of the image at that point. g(x,y) y x 2CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 3. What is a Digital Image?  Digital Images  A digital image is the sampling and quantization of a two-dimensional real image both in spatial coordinates and brightness.  A digital image I(m,n) = samples of g(x,y); where m and n are integers, and I is the intensity at m and n . n m I(m,n) 3CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 4. Digital Image Acquisition  A digital imaging system (digital camera). 4CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 5. Digital Image Acquisition  Sampling & Quantization 5CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 6. Digital Image Acquisition  What is the best quantization level ?  Digital images are typically quantized to 256 gray levels. 6CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 7. Digital Image Acquisition  Sampling & Quantization 7CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 8. Digital Image Acquisition  Effect of Quantization 256 64 128 32 16 4 8 2 8CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 9. Digital Image Representation  A digital image can be represented as a two-dimensional matrix. n m I(m,n) i(1,1) i(1,2) ……. i(1, n-1) i(2,1) i(2,2) ……. i(2, n-1) . . . . . . . . . . . . . . . . i(m-1,1) i(m-1,2) … i(m-1, n-1) I(mn) = • Each element is called a pixel (picture element). • A color (RGB) image is represented by a 3-dimensional matrix I(mxnx3) 9CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 10. Digital Image Size  The size of a digital image is determines by its dimensions ( M x N ) multiplied by the number of bits b required to store the intensity levels (L = 2b).  image size = M x N x b (bits)  Typical values of b are:  b = 1 black and white (binary) images.  b = 8 grayscale (256 gray levels), or indexed color images  b = 24 RGB color image. 10CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 11. Digital Image Resolution  Digital image resolution is determined by the number of pixels (samples) in the image. 11CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 12. Digital Image Resolution  Digital image with low resolution has low quality. 1024x1024x8 512x512x8 256x256x8 128x128x8 64x64x8 32x32x8 12CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 13. Digital image Types  RGB (Color) Images Each pixel is a mixture of three values of Red, Geen, and Blue. R,G,B = {0-255, 0-255, 0-255} 0 = Black 255 = White In normalized values: R,G,B = {0-1, 0-1, 0-1} 0 = Black 1 = White 13CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 14. Color Map Indices R G BIndex 1 2 3 4 5 6 7 8 . . Digital image Types  Indexed (Color) Images In order to reduce the color image size,each pixel is given the index of a color In a color table (color map). 14CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 15. Digital image Types  Grayscale (Intensity) Images Each pixel is given a gray level value between 0 – 255 or between 0 – 1. We need 8 bits to store a grayscale value. 15CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 16. Digital image Types  Black and white (Binary) Images • Each pixel has one of two gray levels either black (0) or white (1). • We need 8 bits to store a grayscale value. 16CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 17. Types of Pixel Neighborhoods •Image sampling: •Rectangular sampling - In most cases, images are sampled by laying a rectangular grid over an image. •Hexagonal sampling - An alternative sampling scheme is shown. •Pixel Neighborhoods: •4-connected and 8-connected neighborhood (Rectangular sampling) •6-connected neighborhood (Hexagonal sampling) 17CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 18. Types of Pixel Neighborhoods 4-connected 8-connected 6-connected  Basic Relationships Between Pixels 18CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 19. Distance Measures  If pixels p and q have coordinates (x, y) and (s, t), respectively.  The Euclidean distance between p and q  De(p, q) = [(x – s)2 + (y – t) 2] ½  The D4 (City-block ) distance between p and q  D4(p, q) = |x – s| + |y – t|  The D8 (Chessboard ) distance between p and q  D8(p, q) = max( |x – s| , |y – t| ) 19CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 20. Distance Measures  Results of D4 and D8 distances  The pixels with D4=1 are the 4-neighbors  The pixels with D8=1 are the 8-neighbors 20CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 21. Adjacency, Connectivity, Regions, and Boundaries  Adjacency:  4-adjacency : Two pixels p and q are 4-adjacent if q is in the set N4(p).  8-adjacency. Two pixels p and q are 8-adjacent if q is in the set N8(p).  Connectivity: Let S represent a subset of pixels:  Two pixels p and q are said to be connected in S if there exists a path between them consisting entirely of pixels in S.  the set of pixels that are connected to each other in S is called a connected component of S. 21CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 22. Adjacency, Connectivity, Regions, and Boundaries  Path:  A (digital) path (or curve) from pixel p with coordinates (x, y) to pixel q with coordinates (s, t) is a sequence of distinct pixels with coordinates (x0 , y0), (x1 , y1), …, (xn , yn) where (x0 , y0)= (x, y); (xn , yn)= (s, t); and pixels (xi , yi) and (xi-1 , yi-1) are adjacent for 1<= i <= n.  In this case, n is the length of the path. If (x0 , y0)= (s, t) the path is a closed path.  We can define 4- or 8-paths depending on the type of adjacency specified. 22CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 23. Adjacency, Connectivity, Regions, and Boundaries  Region:  If R be a subset of pixels in an image, we call R a region of the image if R is a connected set.  Boundary:  The boundary (also called border or contour) of a region R is the set of pixels in the region that have one or more neighbors that are not in R. 23CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 24. Adjacency, Connectivity, Regions, and Boundaries 24CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 25. Types of image Operations Operation Characterization Complexity/Pixel Point the output value at a specific coordinate is dependent only on the input value at that same coordinate. constant Local the output value at a specific coordinate is dependent on the input values in the neighborhood of that same coordinate. P2 Global the output value at a specific coordinate is dependent on all the values in the input image. N2  Operation Domain 25CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 26. Types of image Operations 26CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 27. Types of image Operations  Pixel Operations 27CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 28. Types of image Operations  Local Operations 28CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 29. Types of image Operations  Local Operations 29CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 30. Types of image Operations  Arithmetic Operations 30CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 31. Types of image Operations  Arithmetic Operations 31CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 32. Types of image Operations  Logical Operations 32CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 33. Types of image Operations  Sets Operations 33CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 34. Types of image Operations  Sets Operations 34CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 35. Types of image Operations  Geometric Operation (Transformation) 35CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 36. Types of image Operations  Space Transformations 36CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 37. Types of image Operations  Space Transformation 37CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 38. Categories of Image Operations  Linear and Nonlinear Operations  H is said to be a linear operator if, for any two images f and g and any two scalars a and b, H( a f + b g ) = a H( f ) + b H( g )  Operations that do not satisfy this condition is called nonlinear operations 38CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 39. Homework 1  Problems:  Page 72: 2.9, 2.10, 2.11  Page 73: 2.12, 2.14, 2.15, 2.20 39CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.
  • 40. Next time Image Enhancement In The Spatial Domain 40CSC447: Digital Image Processing Prof. Dr. Mostafa GadalHaqq.