SlideShare a Scribd company logo
SPACIAL DOMAIN
image processing
Contents
• Mathematical Operations in DIP
• Spatial Operations
• Geometric Spatial Transformations
• Intensity Assignment
Weeks 1 & 2 3
Introduction to Mathematical Operations in DIP
• Array vs. Matrix Operation
11 12
21 22
b b
B
b b
 
  
 
11 12
21 22
a a
A
a a
 
  
 
11 11 12 21 11 12 12 22
21 11 22 21 21 12 22 22
*
a b a b a b a b
A B
a b a b a b a b
 
 
  
 
 
11 11 12 12
21 21 22 22
.*
a b a b
A B
a b a b
 
  
 
Array product
Matrix product
Array
product
operator
Matrix
product
operator
Weeks 1 & 2 4
Introduction to Mathematical Operations in DIP
• Linear vs. Nonlinear Operation:
H is operator, f(x,y) is input image, g(x,y) is output image.
H is said to be a linear operator;
H is said to be a nonlinear operator if it does not meet the above
qualification.
 
( , ) ( , )
H f x y g x y

Additivity
Homogeneity
 
 
( , ) ( , )
( , ) ( , )
( , ) ( , )
( , ) ( , )
i i j j
i i j j
i i j j
i i j j
H a f x y a f x y
H a f x y H a f x y
a H f x y a H f x y
a g x y a g x y
 

 
 
   
 
   
 
Weeks 1 & 2 5
Arithmetic Operations
• Arithmetic operations between images are array operations.
The four arithmetic operations are denoted as
s(x,y) = f(x,y) + g(x,y)
d(x,y) = f(x,y) – g(x,y)
p(x,y) = f(x,y) × g(x,y)
v(x,y) = f(x,y) ÷ g(x,y)
6
Example: Addition of Noisy Images for Noise Reduction
Noiseless image: f(x,y)
Noise: n(x,y) (at every pair of coordinates (x,y), the noise is uncorrelated and has zero
average value)
Corrupted image: g(x,y)
g(x,y) = f(x,y) + n(x,y)
Reducing the noise by adding a K set of noisy images, {gi(x,y)}
1
1
( , ) ( , )
K
i
i
g x y g x y
K 
 
Image averaging
• Image averaging is a digital image processing technique that is often
employed to enhance video images that have been corrupted by
random noise.
• The algorithm operates by computing an average or arithmetic mean
of the intensity values for each pixel position in a set of
captured images from the same scene or viewfield.
8
Image Averaging
Weeks 1 & 2 9
An Example of Image Subtraction: Mask Mode Radiography
Mask h(x,y): an X-ray image of a region of a patient’s body
Live images f(x,y): X-ray images captured at TV rates after injection of the contrast medium
Enhanced detail g(x,y)
g(x,y) = f(x,y) - h(x,y)
The procedure gives a movie showing how the contrast medium propagates through the various
arteries in the area being observed.
10
(b): X-ray images captured after injection of the contrast medium into
the bloodstream (iodine medium: Halogen – dark blue colored)
Image Subtraction
Weeks 1 & 2 11
An Example of Image Multiplication
Weeks 1 & 2 12
Set and Logical Operations
Weeks 1 & 2 13
Spatial Operations (P 107)
1) Single-pixel operations
Alter the values of an image’s pixels based on the intensity.
e.g.,
( )
s T z

Weeks 1 & 2 14
Spatial Operations
1) Single-pixel operations
Alter the values of an image’s pixels based on the intensity.
e.g.,
( )
s T z

Coding implementation
example
h
w
Weeks 1 & 2 15
Spatial Operations
1) Single-pixel operations
- Inverse imaging program --- running result
Input “Lenna” image Output inversed
“Lenna” image
Weeks 1 & 2 16
Geometric Spatial Transformations
► Geometric transformation (rubber-sheet transformation)
— A spatial transformation of coordinates
— intensity interpolation that assigns intensity values to the spatially transformed
pixels.
► Affine transform
( , ) {( , )}
x y T v w

   
11 12
21 22
31 32
0
1 1 0
1
t t
x y v w t t
t t
 
 
  
 
 
Weeks 1 & 2 17
( , ) {( , )}
x y T v w

   
11 12
21 22
31 32
0
1 1 0
1
t t
x y v w t t
t t
 
 
  
 
 
 Affine transform
 Geometric transformation
Weeks 1 & 2 18
Intensity Assignment
► Forward Mapping
It scans the pixels of the input image and, at each location, (v,w), computes the location (x,y) of
the corresponding pixel in the output image.
- Problem is that it’s possible that two or more pixels can be transformed to the same location
in the output image.
(v,w) is coordinate of input image pixel and (x,y) is coordinate of output image pixel.
► Inverse Mapping
Inverse mapping scans the output pixel location, and then, at each location (x,y) computes the
corresponding location in the input image using inverse mapping equation. It then
interpolates the nearest input pixels to determine the intensity of the output pixel value.
- Inverse mappings are more efficient to implement than forward mappings.
( , ) {( , )}
x y T v w

1
( , ) {( , )}
v w T x y


Forward Mapping / Backward Mapping
• Forward Mapping • Backward Mapping
(Inverse Mapping)
20
Forward Mapping / Backward Mapping
• Forward Mapping
- problem: holes
• Backward Mapping

More Related Content

Similar to chapter-2 SPACIAL DOMAIN.pptx

Image Processing 2
Image Processing 2Image Processing 2
Image Processing 2jainatin
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
nagwaAboElenein
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformationsYahya Alkhaldi
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
AAKANKSHA JAIN
 
07 cie552 image_mosaicing
07 cie552 image_mosaicing07 cie552 image_mosaicing
07 cie552 image_mosaicing
Elsayed Hemayed
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
Manas Mantri
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
Mohammed Kamel
 
Lecture-11.pdf
Lecture-11.pdfLecture-11.pdf
Lecture-11.pdf
NiharikaThakur32
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
DEEPASHRI HK
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
Surabhi Ks
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
Moe Moe Myint
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
Wael Sharba
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
Varun Ojha
 
Fast Object Recognition from 3D Depth Data with Extreme Learning Machine
Fast Object Recognition from 3D Depth Data with Extreme Learning MachineFast Object Recognition from 3D Depth Data with Extreme Learning Machine
Fast Object Recognition from 3D Depth Data with Extreme Learning Machine
Soma Boubou
 
imageCorrectionLinearDiffusion
imageCorrectionLinearDiffusionimageCorrectionLinearDiffusion
imageCorrectionLinearDiffusionKellen Betts
 
SpatialEnhancement of course CE7491 of NTU
SpatialEnhancement of course CE7491 of NTUSpatialEnhancement of course CE7491 of NTU
SpatialEnhancement of course CE7491 of NTU
lyumingzhi
 
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
Edge AI and Vision Alliance
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
Shajun Nisha
 
Computer Vision transformations
Computer Vision  transformationsComputer Vision  transformations
Computer Vision transformations
Wael Badawy
 

Similar to chapter-2 SPACIAL DOMAIN.pptx (20)

Image Processing 2
Image Processing 2Image Processing 2
Image Processing 2
 
Point Processing
Point ProcessingPoint Processing
Point Processing
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
4.intensity transformations
4.intensity transformations4.intensity transformations
4.intensity transformations
 
Image processing second unit Notes
Image processing second unit NotesImage processing second unit Notes
Image processing second unit Notes
 
07 cie552 image_mosaicing
07 cie552 image_mosaicing07 cie552 image_mosaicing
07 cie552 image_mosaicing
 
Dip 5 mathematical preliminaries
Dip 5 mathematical preliminariesDip 5 mathematical preliminaries
Dip 5 mathematical preliminaries
 
Notes on image processing
Notes on image processingNotes on image processing
Notes on image processing
 
Lecture-11.pdf
Lecture-11.pdfLecture-11.pdf
Lecture-11.pdf
 
Image Enhancement in Spatial Domain
Image Enhancement in Spatial DomainImage Enhancement in Spatial Domain
Image Enhancement in Spatial Domain
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
Chapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image EnhancementChapter 6 Image Processing: Image Enhancement
Chapter 6 Image Processing: Image Enhancement
 
Fast Object Recognition from 3D Depth Data with Extreme Learning Machine
Fast Object Recognition from 3D Depth Data with Extreme Learning MachineFast Object Recognition from 3D Depth Data with Extreme Learning Machine
Fast Object Recognition from 3D Depth Data with Extreme Learning Machine
 
imageCorrectionLinearDiffusion
imageCorrectionLinearDiffusionimageCorrectionLinearDiffusion
imageCorrectionLinearDiffusion
 
SpatialEnhancement of course CE7491 of NTU
SpatialEnhancement of course CE7491 of NTUSpatialEnhancement of course CE7491 of NTU
SpatialEnhancement of course CE7491 of NTU
 
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence"The Perspective Transform in Embedded Vision," a Presentation from Cadence
"The Perspective Transform in Embedded Vision," a Presentation from Cadence
 
Intensity Transformation and Spatial filtering
Intensity Transformation and Spatial filteringIntensity Transformation and Spatial filtering
Intensity Transformation and Spatial filtering
 
Computer Vision transformations
Computer Vision  transformationsComputer Vision  transformations
Computer Vision transformations
 

Recently uploaded

一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
TravisMalana
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
mbawufebxi
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
AnirbanRoy608946
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
2023240532
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
dwreak4tg
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
yhkoc
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Linda486226
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 

Recently uploaded (20)

一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)Malana- Gimlet Market Analysis (Portfolio 2)
Malana- Gimlet Market Analysis (Portfolio 2)
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
一比一原版(Bradford毕业证书)布拉德福德大学毕业证如何办理
 
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptxData_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
Data_and_Analytics_Essentials_Architect_an_Analytics_Platform.pptx
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
Quantitative Data AnalysisReliability Analysis (Cronbach Alpha) Common Method...
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
一比一原版(BCU毕业证书)伯明翰城市大学毕业证如何办理
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
一比一原版(CU毕业证)卡尔顿大学毕业证成绩单
 
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdfSample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
Sample_Global Non-invasive Prenatal Testing (NIPT) Market, 2019-2030.pdf
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 

chapter-2 SPACIAL DOMAIN.pptx

  • 2. Contents • Mathematical Operations in DIP • Spatial Operations • Geometric Spatial Transformations • Intensity Assignment
  • 3. Weeks 1 & 2 3 Introduction to Mathematical Operations in DIP • Array vs. Matrix Operation 11 12 21 22 b b B b b        11 12 21 22 a a A a a        11 11 12 21 11 12 12 22 21 11 22 21 21 12 22 22 * a b a b a b a b A B a b a b a b a b            11 11 12 12 21 21 22 22 .* a b a b A B a b a b        Array product Matrix product Array product operator Matrix product operator
  • 4. Weeks 1 & 2 4 Introduction to Mathematical Operations in DIP • Linear vs. Nonlinear Operation: H is operator, f(x,y) is input image, g(x,y) is output image. H is said to be a linear operator; H is said to be a nonlinear operator if it does not meet the above qualification.   ( , ) ( , ) H f x y g x y  Additivity Homogeneity     ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) ( , ) i i j j i i j j i i j j i i j j H a f x y a f x y H a f x y H a f x y a H f x y a H f x y a g x y a g x y                   
  • 5. Weeks 1 & 2 5 Arithmetic Operations • Arithmetic operations between images are array operations. The four arithmetic operations are denoted as s(x,y) = f(x,y) + g(x,y) d(x,y) = f(x,y) – g(x,y) p(x,y) = f(x,y) × g(x,y) v(x,y) = f(x,y) ÷ g(x,y)
  • 6. 6 Example: Addition of Noisy Images for Noise Reduction Noiseless image: f(x,y) Noise: n(x,y) (at every pair of coordinates (x,y), the noise is uncorrelated and has zero average value) Corrupted image: g(x,y) g(x,y) = f(x,y) + n(x,y) Reducing the noise by adding a K set of noisy images, {gi(x,y)} 1 1 ( , ) ( , ) K i i g x y g x y K   
  • 7. Image averaging • Image averaging is a digital image processing technique that is often employed to enhance video images that have been corrupted by random noise. • The algorithm operates by computing an average or arithmetic mean of the intensity values for each pixel position in a set of captured images from the same scene or viewfield.
  • 9. Weeks 1 & 2 9 An Example of Image Subtraction: Mask Mode Radiography Mask h(x,y): an X-ray image of a region of a patient’s body Live images f(x,y): X-ray images captured at TV rates after injection of the contrast medium Enhanced detail g(x,y) g(x,y) = f(x,y) - h(x,y) The procedure gives a movie showing how the contrast medium propagates through the various arteries in the area being observed.
  • 10. 10 (b): X-ray images captured after injection of the contrast medium into the bloodstream (iodine medium: Halogen – dark blue colored) Image Subtraction
  • 11. Weeks 1 & 2 11 An Example of Image Multiplication
  • 12. Weeks 1 & 2 12 Set and Logical Operations
  • 13. Weeks 1 & 2 13 Spatial Operations (P 107) 1) Single-pixel operations Alter the values of an image’s pixels based on the intensity. e.g., ( ) s T z 
  • 14. Weeks 1 & 2 14 Spatial Operations 1) Single-pixel operations Alter the values of an image’s pixels based on the intensity. e.g., ( ) s T z  Coding implementation example h w
  • 15. Weeks 1 & 2 15 Spatial Operations 1) Single-pixel operations - Inverse imaging program --- running result Input “Lenna” image Output inversed “Lenna” image
  • 16. Weeks 1 & 2 16 Geometric Spatial Transformations ► Geometric transformation (rubber-sheet transformation) — A spatial transformation of coordinates — intensity interpolation that assigns intensity values to the spatially transformed pixels. ► Affine transform ( , ) {( , )} x y T v w      11 12 21 22 31 32 0 1 1 0 1 t t x y v w t t t t           
  • 17. Weeks 1 & 2 17 ( , ) {( , )} x y T v w      11 12 21 22 31 32 0 1 1 0 1 t t x y v w t t t t             Affine transform  Geometric transformation
  • 18. Weeks 1 & 2 18 Intensity Assignment ► Forward Mapping It scans the pixels of the input image and, at each location, (v,w), computes the location (x,y) of the corresponding pixel in the output image. - Problem is that it’s possible that two or more pixels can be transformed to the same location in the output image. (v,w) is coordinate of input image pixel and (x,y) is coordinate of output image pixel. ► Inverse Mapping Inverse mapping scans the output pixel location, and then, at each location (x,y) computes the corresponding location in the input image using inverse mapping equation. It then interpolates the nearest input pixels to determine the intensity of the output pixel value. - Inverse mappings are more efficient to implement than forward mappings. ( , ) {( , )} x y T v w  1 ( , ) {( , )} v w T x y  
  • 19. Forward Mapping / Backward Mapping • Forward Mapping • Backward Mapping (Inverse Mapping)
  • 20. 20 Forward Mapping / Backward Mapping • Forward Mapping - problem: holes • Backward Mapping