SlideShare a Scribd company logo
1 of 92
Lectures on
Image Formation
and
Processing
MAN-522: Computer Vision
Weeks 1 & 2 2
Image Transform
► A particularly important class of 2-D linear transforms,
denoted T(u, v)
1 1
0 0
( , ) ( , ) ( , , , )
where ( , ) is the input image,
( , , , ) is the ker ,
variables and are the transform variables,
= 0, 1, 2, ..., M-1 and = 0, 1,
M N
x y
T u v f x y r x y u v
f x y
r x y u v forward transformation nel
u v
u v
 
 
 
..., N-1.
Weeks 1 & 2 3
Image Transform
► Given T(u, v), the original image f(x, y) can be recoverd
using the inverse tranformation of T(u, v).
1 1
0 0
( , ) ( , ) ( , , , )
where ( , , , ) is the ker ,
= 0, 1, 2, ..., M-1 and = 0, 1, ..., N-1.
M N
u v
f x y T u v s x y u v
s x y u v inverse transformation nel
x y
 
 
 
Weeks 1 & 2 4
Image Transform
Weeks 1 & 2 5
Example: Image Denoising by Using DCT Transform
Weeks 1 & 2 6
Forward Transform Kernel
1 1
0 0
1 2
1 2
( , ) ( , ) ( , , , )
The kernel ( , , , ) is said to be SEPERABLE if
( , , , ) ( , ) ( , )
In addition, the kernel is said to be SYMMETRIC if
( , ) is functionally equal to ( ,
M N
x y
T u v f x y r x y u v
r x y u v
r x y u v r x u r y v
r x u r y v
 
 



1 1
), so that
( , , , ) ( , ) ( , )
r x y u v r x u r y u

Weeks 1 & 2 7
The Kernels for 2-D Fourier Transform
2 ( / / )
2 ( / / )
The kernel
( , , , )
Where = 1
The kernel
1
( , , , )
j ux M vy N
j ux M vy N
forward
r x y u v e
j
inverse
s x y u v e
MN


 




Weeks 1 & 2 8
2-D Fourier Transform
1 1
2 ( / / )
0 0
1 1
2 ( / / )
0 0
( , ) ( , )
1
( , ) ( , )
M N
j ux M vy N
x y
M N
j ux M vy N
u v
T u v f x y e
f x y T u v e
MN


 
 
 
 

 




Weeks 1 & 2 9
Probabilistic Methods
Let , 0, 1, 2, ..., -1, denote the values of all possible intensities
in an digital image. The probability, ( ), of intensity level
occurring in a given image is estimated as
i
k
k
z i L
M N p z
z


( ) ,
where is the number of times that intensity occurs in the image.
k
k
k k
n
p z
MN
n z

1
0
( ) 1
L
k
k
p z




1
0
The mean (average) intensity is given by
= ( )
L
k k
k
m z p z



Weeks 1 & 2 10
Probabilistic Methods
1
2 2
0
The variance of the intensities is given by
= ( ) ( )
L
k k
k
z m p z





th
1
0
The moment of the intensity variable is
( ) = ( ) ( )
L
n
n k k
k
n z
u z z m p z




Weeks 1 & 2 11
Example: Comparison of Standard Deviation
Values
31.6
 
14.3
  49.2
 
4/21/2021 12
Spatial Domain vs. Transform Domain
► Spatial domain
image plane itself, directly process the intensity values of
the image plane
► Transform domain
process the transform coefficients, not directly process the
intensity values of the image plane
4/21/2021 13
Spatial Domain Process
( , ) [ ( , )])
( , ) :input image
( , ) :output image
:an operator on defined over
a neighborhood of point ( , )
g x y T f x y
f x y
g x y
T f
x y

4/21/2021 14
Spatial Domain Process
4/21/2021 15
Spatial Domain Process
Intensity transformation function
( )
s T r

4/21/2021 16
Some Basic Intensity Transformation
Functions
4/21/2021 17
Image Negatives
Image negatives
1
s L r
  
4/21/2021 18
Example: Image Negatives
Small
lesion
4/21/2021 19
Log Transformations
Log Transformations
log(1 )
s c r
 
4/21/2021 20
Log Transformations
► This maps a narrow range of low intensity values
in the input into a wider range of output levels.
► The opposite is true for the higher intensity values
of input image.
► We use such a transformation for expanding the
values of dark pixels in an image while
compressing the higher level values.
4/21/2021 21
Example: Log Transformations
4/21/2021 22
Piecewise-Linear Transformations
► Contrast Stretching
— Expands the range of intensity levels in an image so that it spans
the full intensity range of the recording medium or display device.
► Intensity-level Slicing
— Highlighting a specific range of intensities in an image often is of
interest.
4/21/2021 23
4/21/2021 24
Highlight the major
blood vessels and
study the shape of the
flow of the contrast
medium (to detect
blockages, etc.)
Measuring the actual
flow of the contrast
medium as a function
of time in a series of
images
4/21/2021 25
Histogram Processing
► Histogram Equalization
► Histogram Matching
► Local Histogram Processing
► Using Histogram Statistics for Image Enhancement
4/21/2021 26
Histogram Processing
Histogram ( )
is the intensity value
is the number of pixels in the image with intensity
k k
th
k
k k
h r n
r k
n r

Normalized histogram ( )
: the number of pixels in the image of
size M N with intensity
k
k
k
k
n
p r
MN
n
r


4/21/2021 27
► Histogram equalization is a method in image
processing of contrast adjustment using
the image's histogram.
► This method usually increases the global contrast of many
images, especially when the usable data of the image is
represented by close contrast values.
► Through this adjustment, the intensities can be better
distributed on the histogram.
► This allows for areas of lower local contrast to gain a higher
contrast.
► Histogram equalization accomplishes this by effectively
spreading out the most frequent intensity values.
Weeks 1 & 2 28
Histogram Equalization
Weeks 1 & 2 29
Histogram Equalization
4/21/2021 30
Histogram Equalization
The intensity levels in an image may be viewed as
random variables in the interval [0, L-1].
Let ( ) and ( ) denote the probability density
function (PDF) of random variables and .
r s
p r p s
r s
4/21/2021 31
Histogram Equalization
( ) 0 1
s T r r L
   
. T(r) is a strictly monotonically increasing function
in the interval 0 -1;
. 0 ( ) -1 for 0 -1.
a
r L
b T r L r L
 
   
4/21/2021 32
Histogram Equalization
. T(r) is a strictly monotonically increasing function
in the interval 0 -1;
. 0 ( ) -1 for 0 -1.
a
r L
b T r L r L
 
   
( ) 0 1
s T r r L
   
( ) is continuous and differentiable.
T r
( ) ( )
s r
p s ds p r dr

4/21/2021 33
Histogram Equalization
0
( ) ( 1) ( )
r
r
s T r L p w dw
   
0
( )
( 1) ( )
r
r
ds dT r d
L p w dw
dr dr dr
 
  
 
 

( 1) ( )
r
L p r
 
 
( ) 1
( ) ( )
( )
( 1) ( ) 1
r r r
s
r
p r dr p r p r
p s
L p r
ds
ds L
dr
   

  
 
 
4/21/2021 34
Example
2
Suppose that the (continuous) intensity values
in an image have the PDF
2
, for 0 r L-1
( 1)
( )
0, otherwise
Find the transformation function for equalizing
the image histogra
r
r
L
p r

 


 


m.
4/21/2021 35
Example
0
( ) ( 1) ( )
r
r
s T r L p w dw
   
2
0
2
( 1)
( 1)
r w
L dw
L
 


2
1
r
L


4/21/2021 36
Histogram Equalization
0
Continuous case:
( ) ( 1) ( )
r
r
s T r L p w dw
   
0
Discrete values:
( ) ( 1) ( )
k
k k r j
j
s T r L p r

   
0 0
1
( 1) k=0,1,..., L-1
k k
j
j
j j
n L
L n
MN MN
 

  
 
4/21/2021 37
Example: Histogram Equalization
Suppose that a 3-bit image (L=8) of size 64 × 64 pixels (MN = 4096)
has the intensity distribution shown in following table.
Get the histogram equalization transformation function and give the
ps(sk) for each sk.
4/21/2021 38
Example: Histogram Equalization
0
0 0
0
( ) 7 ( ) 7 0.19 1.33
r j
j
s T r p r

    
 1

1
1 1
0
( ) 7 ( ) 7 (0.19 0.25) 3.08
r j
j
s T r p r

     
 3

2 3
4 5
6 7
4.55 5 5.67 6
6.23 6 6.65 7
6.86 7 7.00 7
s s
s s
s s
   
   
   
4/21/2021 39
Example: Histogram Equalization
4/21/2021 40
4/21/2021 41
4/21/2021 42
Question
Is histogram equalization always good?
No
4/21/2021 43
Histogram Matching
Histogram matching (histogram specification)
— generate a processed image that has a specified histogram
Let ( ) and ( ) denote the continous probability
density functions of the variables and . ( ) is the
specified probability density function.
Let be the random variable with the prob
r z
z
p r p z
r z p z
s
0
0
ability
( ) ( 1) ( )
Define a random variable with the probability
( ) ( 1) ( )
r
r
z
z
s T r L p w dw
z
G z L p t dt s
  
  


4/21/2021 44
Histogram Matching
0
0
( ) ( 1) ( )
( ) ( 1) ( )
r
r
z
z
s T r L p w dw
G z L p t dt s
  
  


 
1 1
( ) ( )
z G s G T r
 
 
4/21/2021 45
Histogram Matching: Procedure
► Obtain pr(r) from the input image and then obtain the values of s
► Use the specified PDF and obtain the transformation function G(z)
► Mapping from s to z
0
( 1) ( )
r
r
s L p w dw
  
0
( ) ( 1) ( )
z
z
G z L p t dt s
  

1
( )
z G s


4/21/2021 46
Histogram Matching: Example
Assuming continuous intensity values, suppose that an image has
the intensity PDF
Find the transformation function that will produce an image
whose intensity PDF is
2
2
, for 0 -1
( 1)
( )
0 , otherwise
r
r
r L
L
p r

 


 


2
3
3
, for 0 ( -1)
( ) ( 1)
0, otherwise
z
z
z L
p z L

 

 



4/21/2021 47
Histogram Matching: Example
Find the histogram equalization transformation for the input image
Find the histogram equalization transformation for the specified histogram
The transformation function
2
0 0
2
( ) ( 1) ( ) ( 1)
( 1)
r r
r
w
s T r L p w dw L dw
L
    

 
2 3
3 2
0 0
3
( ) ( 1) ( ) ( 1)
( 1) ( 1)
z z
z
t z
G z L p t dt L dt s
L L
     
 
 
2
1
r
L


1/3
2
1/3 1/3
2 2 2
( 1) ( 1) ( 1)
1
r
z L s L L r
L
 
   
     
 
   

 
4/21/2021 48
Histogram Matching: Discrete Cases
► Obtain pr(rj) from the input image and then obtain the values of
sk, round the value to the integer range [0, L-1].
► Use the specified PDF and obtain the transformation function
G(zq), round the value to the integer range [0, L-1].
► Mapping from sk to zq
0 0
( 1)
( ) ( 1) ( )
k k
k k r j j
j j
L
s T r L p r n
MN
 

   
 
0
( ) ( 1) ( )
q
q z i k
i
G z L p z s

  

1
( )
q k
z G s


4/21/2021 49
Example: Histogram Matching
Suppose that a 3-bit image (L=8) of size 64 × 64 pixels (MN = 4096)
has the intensity distribution shown in the following table (on the
left). Get the histogram transformation function and make the output
image with the specified histogram, listed in the table on the right.
4/21/2021 50
Example: Histogram Matching
Obtain the scaled histogram-equalized values,
Compute all the values of the transformation function G,
0 1 2 3 4
5 6 7
1, 3, 5, 6, 7,
7, 7, 7.
s s s s s
s s s
    
  
0
0
0
( ) 7 ( ) 0.00
z j
j
G z p z

 

1 2
3 4
5 6
7
( ) 0.00 ( ) 0.00
( ) 1.05 ( ) 2.45
( ) 4.55 ( ) 5.95
( ) 7.00
G z G z
G z G z
G z G z
G z
 
 
 

0

0
 0

1
 2

6

5

7

4/21/2021 51
Example: Histogram Matching
4/21/2021 52
Example: Histogram Matching
Obtain the scaled histogram-equalized values,
Compute all the values of the transformation function G,
0 1 2 3 4
5 6 7
1, 3, 5, 6, 7,
7, 7, 7.
s s s s s
s s s
    
  
0
0
0
( ) 7 ( ) 0.00
z j
j
G z p z

 

1 2
3 4
5 6
7
( ) 0.00 ( ) 0.00
( ) 1.05 ( ) 2.45
( ) 4.55 ( ) 5.95
( ) 7.00
G z G z
G z G z
G z G z
G z
 
 
 

0

0
 0

1
 2

6

5

7

s0
s2 s3
s5 s6 s7
s1
s4
4/21/2021 53
Example: Histogram Matching
0 1 2 3 4
5 6 7
1, 3, 5, 6, 7,
7, 7, 7.
s s s s s
s s s
    
  
0
1
2
3
4
5
6
7
k
r
4/21/2021 54
Example: Histogram Matching
0 3
1 4
2 5
3 6
4 7
5 7
6 7
7 7
k q
r z









4/21/2021 55
Example: Histogram Matching
4/21/2021 56
Example: Histogram Matching
4/21/2021 57
Example: Histogram Matching
4/21/2021 58
Local Histogram Processing
Define a neighborhood and move its center from pixel to
pixel
At each location, the histogram of the points in the
neighborhood is computed. Either histogram equalization or
histogram specification transformation function is obtained
Map the intensity of the pixel centered in the neighborhood
Move to the next location and repeat the procedure
4/21/2021 59
Local Histogram Processing: Example
4/21/2021 60
Using Histogram Statistics for Image
Enhancement
1
0
( )
L
i i
i
m r p r


 
1
0
( ) ( ) ( )
L
n
n i i
i
u r r m p r


 

1
2 2
2
0
( ) ( ) ( )
L
i i
i
u r r m p r



  

1 1
0 0
1
( , )
M N
x y
f x y
MN
 
 
 
 
1 1
2
0 0
1
( , )
M N
x y
f x y m
MN
 
 
 

Average Intensity
Variance
4/21/2021 61
Using Histogram Statistics for Image
Enhancement
1
0
Local average intensity
( )
denotes a neighborhood
xy xy
L
s i s i
i
xy
m r p r
s


 
1
2 2
0
Local variance
( ) ( )
xy xy xy
L
s i s s i
i
r m p r



 

4/21/2021 62
Using Histogram Statistics for Image
Enhancement: Example
0 1 2
0 1 2
( , ), if and
( , )
( , ), otherwise
:global mean; :global standard deviation
0.4; 0.02; 0.4; 4
xy xy
s G G s G
G G
E f x y m k m k k
g x y
f x y
m
k k k E
  

  


 


   
4/21/2021 63
Spatial Filtering
A spatial filter consists of (a) a neighborhood, and (b) a
predefined operation
Linear spatial filtering of an image of size MxN with a filter
of size mxn is given by the expression
( , ) ( , ) ( , )
a b
s a t b
g x y w s t f x s y t
 
  
 
4/21/2021 64
Spatial Filtering
4/21/2021 65
Spatial Correlation
The correlation of a filter ( , ) of size
with an image ( , ), denoted as ( , ) ( , )
w x y m n
f x y w x y f x y

( , ) ( , ) ( , ) ( , )
a b
s a t b
w x y f x y w s t f x s y t
 
  
 
4/21/2021 66
Spatial Convolution
The convolution of a filter ( , ) of size
with an image ( , ), denoted as ( , ) ( , )
w x y m n
f x y w x y f x y

( , ) ( , ) ( , ) ( , )
a b
s a t b
w x y f x y w s t f x s y t
 
  
 
4/21/2021 67
4/21/2021 68
Smoothing Spatial Filters
Smoothing filters are used for blurring and for noise
reduction
Blurring is used in removal of small details and bridging of
small gaps in lines or curves
Smoothing spatial filters include linear filters and nonlinear
filters.
4/21/2021 69
Spatial Smoothing Linear Filters
The general implementation for filtering an M N image
with a weighted averaging filter of size m n is given
( , ) ( , )
( , )
( , )
where 2 1
a b
s a t b
a b
s a t b
w s t f x s y t
g x y
w s t
m a
 
 


 

 
 
 
, 2 1.
n b
 
4/21/2021 70
Two Smoothing Averaging Filter Masks
4/21/2021 71
4/21/2021 72
Example: Gross Representation of Objects
4/21/2021 73
Order-statistic (Nonlinear) Filters
— Nonlinear
— Based on ordering (ranking) the pixels contained in the
filter mask
— Replacing the value of the center pixel with the value
determined by the ranking result
E.g., median filter, max filter, min filter
4/21/2021 74
Example: Use of Median Filtering for Noise Reduction
4/21/2021 75
Sharpening Spatial Filters
► Foundation
► Laplacian Operator
► Unsharp Masking and Highboost Filtering
► Using First-Order Derivatives for Nonlinear Image
Sharpening — The Gradient
4/21/2021 76
Sharpening Spatial Filters: Foundation
► The first-order derivative of a one-dimensional function f(x)
is the difference
► The second-order derivative of f(x) as the difference
( 1) ( )
f
f x f x
x

  

2
2
( 1) ( 1) 2 ( )
f
f x f x f x
x

    

4/21/2021 77
4/21/2021 78
Sharpening Spatial Filters: Laplace Operator
The second-order isotropic derivative operator is the
Laplacian for a function (image) f(x,y)
2 2
2
2 2
f f
f
x y
 
  
 
2
2
( 1, ) ( 1, ) 2 ( , )
f
f x y f x y f x y
x

    

2
2
( , 1) ( , 1) 2 ( , )
f
f x y f x y f x y
y

    

2
( 1, ) ( 1, ) ( , 1) ( , 1)
-4 ( , )
f f x y f x y f x y f x y
f x y
        
4/21/2021 79
Sharpening Spatial Filters: Laplace Operator
4/21/2021 80
Sharpening Spatial Filters: Laplace Operator
Image sharpening in the way of using the Laplacian:
2
2
( , ) ( , ) ( , )
where,
( , ) is input image,
( , ) is sharpenend images,
-1 if ( , ) corresponding to Fig. 3.37(a) or (b)
and 1 if either of the other two filters is us
g x y f x y c f x y
f x y
g x y
c f x y
c
 
  
 
 
 ed.
4/21/2021 81
4/21/2021 82
Unsharp Masking and Highboost Filtering
► Unsharp masking
Sharpen images consists of subtracting an unsharp (smoothed)
version of an image from the original image
e.g., printing and publishing industry
► Steps
1. Blur the original image
2. Subtract the blurred image from the original
3. Add the mask to the original
4/21/2021 83
Unsharp Masking and Highboost Filtering
Let ( , ) denote the blurred image, unsharp masking is
( , ) ( , ) ( , )
Then add a weighted portion of the mask back to the original
( , ) ( , ) * ( , )
mask
mask
f x y
g x y f x y f x y
g x y f x y k g x y
 
  0
k 
when 1, the process is referred to as highboost filtering.
k 
4/21/2021 84
Unsharp Masking: Demo
4/21/2021 85
Unsharp Masking and Highboost Filtering: Example
4/21/2021 86
Image Sharpening based on First-Order Derivatives
For function ( , ), the gradient of at coordinates ( , )
is defined as
grad( )
x
y
f x y f x y
f
g x
f f
f
g
y

 
 
  
 
   
  
 
 
 

 
2 2
The of vector , denoted as ( , )
( , ) mag( ) x y
magnitude f M x y
M x y f g g

   
Gradient Image
4/21/2021 87
Image Sharpening based on First-Order Derivatives
2 2
The of vector , denoted as ( , )
( , ) mag( ) x y
magnitude f M x y
M x y f g g

   
( , ) | | | |
x y
M x y g g
 
z1 z2 z3
z4 z5 z6
z7 z8 z9
8 5 6 5
( , ) | | | |
M x y z z z z
   
4/21/2021 88
Image Sharpening based on First-Order Derivatives
z1 z2 z3
z4 z5 z6
z7 z8 z9
9 5 8 6
Roberts Cross-gradient Operators
( , ) | | | |
M x y z z z z
   
7 8 9 1 2 3
3 6 9 1 4 7
Sobel Operators
( , ) | ( 2 ) ( 2 ) |
| ( 2 ) ( 2 ) |
M x y z z z z z z
z z z z z z
     
     
4/21/2021 89
Image Sharpening based on First-Order Derivatives
4/21/2021 90
Example
4/21/2021 91
Example:
Combining
Spatial
Enhancement
Methods
Goal:
Enhance the
image by
sharpening it
and by bringing
out more of the
skeletal detail
4/21/2021 92
Example:
Combining
Spatial
Enhancement
Methods
Goal:
Enhance the
image by
sharpening it
and by bringing
out more of the
skeletal detail

More Related Content

What's hot

Image segmentation
Image segmentation Image segmentation
Image segmentation Amnaakhaan
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantizationBCET, Balasore
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...Shahbaz Alam
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portionMoe Moe Myint
 
Inessa Gracheva and Andrey Kopylov - Image Processing Algorithms with Struct...
Inessa Gracheva and  Andrey Kopylov - Image Processing Algorithms with Struct...Inessa Gracheva and  Andrey Kopylov - Image Processing Algorithms with Struct...
Inessa Gracheva and Andrey Kopylov - Image Processing Algorithms with Struct...AIST
 
VARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIP
VARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIPVARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIP
VARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIPcsandit
 
Lecture 12 (Image transformation)
Lecture 12 (Image transformation)Lecture 12 (Image transformation)
Lecture 12 (Image transformation)VARUN KUMAR
 
R package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable LikelihoodsR package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable LikelihoodsMatt Moores
 
Lecture 3 image sampling and quantization
Lecture 3 image sampling and quantizationLecture 3 image sampling and quantization
Lecture 3 image sampling and quantizationVARUN KUMAR
 
short course on Subsurface stochastic modelling and geostatistics
short course on Subsurface stochastic modelling and geostatisticsshort course on Subsurface stochastic modelling and geostatistics
short course on Subsurface stochastic modelling and geostatisticsAmro Elfeki
 
Iaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detectionIaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detectionIaetsd Iaetsd
 
Anatomy of a Texture Fetch
Anatomy of a Texture FetchAnatomy of a Texture Fetch
Anatomy of a Texture FetchMark Kilgard
 

What's hot (20)

Image segmentation
Image segmentation Image segmentation
Image segmentation
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 
Histogram processing
Histogram processingHistogram processing
Histogram processing
 
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
A Comparative Study of Histogram Equalization Based Image Enhancement Techniq...
 
Lect 03 - first portion
Lect 03 - first portionLect 03 - first portion
Lect 03 - first portion
 
Inessa Gracheva and Andrey Kopylov - Image Processing Algorithms with Struct...
Inessa Gracheva and  Andrey Kopylov - Image Processing Algorithms with Struct...Inessa Gracheva and  Andrey Kopylov - Image Processing Algorithms with Struct...
Inessa Gracheva and Andrey Kopylov - Image Processing Algorithms with Struct...
 
Image restoration and reconstruction
Image restoration and reconstructionImage restoration and reconstruction
Image restoration and reconstruction
 
VARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIP
VARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIPVARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIP
VARIATION-FREE WATERMARKING TECHNIQUE BASED ON SCALE RELATIONSHIP
 
Lecture 12 (Image transformation)
Lecture 12 (Image transformation)Lecture 12 (Image transformation)
Lecture 12 (Image transformation)
 
Image enhancement
Image enhancementImage enhancement
Image enhancement
 
Image transforms
Image transformsImage transforms
Image transforms
 
R package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable LikelihoodsR package bayesImageS: Scalable Inference for Intractable Likelihoods
R package bayesImageS: Scalable Inference for Intractable Likelihoods
 
DCT
DCTDCT
DCT
 
Section4 stochastic
Section4 stochasticSection4 stochastic
Section4 stochastic
 
Pixelrelationships
PixelrelationshipsPixelrelationships
Pixelrelationships
 
Lecture 3 image sampling and quantization
Lecture 3 image sampling and quantizationLecture 3 image sampling and quantization
Lecture 3 image sampling and quantization
 
short course on Subsurface stochastic modelling and geostatistics
short course on Subsurface stochastic modelling and geostatisticsshort course on Subsurface stochastic modelling and geostatistics
short course on Subsurface stochastic modelling and geostatistics
 
Ch13
Ch13Ch13
Ch13
 
Iaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detectionIaetsd vlsi implementation of gabor filter based image edge detection
Iaetsd vlsi implementation of gabor filter based image edge detection
 
Anatomy of a Texture Fetch
Anatomy of a Texture FetchAnatomy of a Texture Fetch
Anatomy of a Texture Fetch
 

Similar to Computer vision 3 4

G Intensity transformation and spatial filtering(1).ppt
G Intensity transformation and spatial filtering(1).pptG Intensity transformation and spatial filtering(1).ppt
G Intensity transformation and spatial filtering(1).pptdeekshithadasari26
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram ProcessingAmnaakhaan
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantizationBCET, Balasore
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxAyeleFeyissa1
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfnagwaAboElenein
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Varun Ojha
 
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...ieijjournal
 
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...ieijjournal
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normTuan Q. Pham
 

Similar to Computer vision 3 4 (20)

G Intensity transformation and spatial filtering(1).ppt
G Intensity transformation and spatial filtering(1).pptG Intensity transformation and spatial filtering(1).ppt
G Intensity transformation and spatial filtering(1).ppt
 
Lect02.ppt
Lect02.pptLect02.ppt
Lect02.ppt
 
annotated-chap-3-gw.ppt
annotated-chap-3-gw.pptannotated-chap-3-gw.ppt
annotated-chap-3-gw.ppt
 
Histogram Processing
Histogram ProcessingHistogram Processing
Histogram Processing
 
Lect5 v2
Lect5 v2Lect5 v2
Lect5 v2
 
chap3.ppt
chap3.pptchap3.ppt
chap3.ppt
 
chap3.ppt
chap3.pptchap3.ppt
chap3.ppt
 
Image sampling and quantization
Image sampling and quantizationImage sampling and quantization
Image sampling and quantization
 
chapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptxchapter-2 SPACIAL DOMAIN.pptx
chapter-2 SPACIAL DOMAIN.pptx
 
Presentation 1
Presentation 1Presentation 1
Presentation 1
 
Dip3
Dip3Dip3
Dip3
 
Lec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdfLec_2_Digital Image Fundamentals.pdf
Lec_2_Digital Image Fundamentals.pdf
 
Image Processing
Image ProcessingImage Processing
Image Processing
 
Digtial Image Processing Q@A
Digtial Image Processing Q@ADigtial Image Processing Q@A
Digtial Image Processing Q@A
 
Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)Chapter 1 introduction (Image Processing)
Chapter 1 introduction (Image Processing)
 
lec3.ppt
lec3.pptlec3.ppt
lec3.ppt
 
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
 
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
FITTED OPERATOR FINITE DIFFERENCE METHOD FOR SINGULARLY PERTURBED PARABOLIC C...
 
Dip mcq1
Dip mcq1Dip mcq1
Dip mcq1
 
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error normRobust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
Robust Super-Resolution by minimizing a Gaussian-weighted L2 error norm
 

Recently uploaded

Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of indiaimessage0108
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)Christopher H Felton
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsThierry TROUIN ☁
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一3sw2qly1
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Roomishabajaj13
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Roomdivyansh0kumar0
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Personfurqan222004
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts servicesonalikaur4
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607dollysharma2066
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Roomdivyansh0kumar0
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Deliverybabeytanya
 
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...akbard9823
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts servicevipmodelshub1
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITMgdsc13
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girlsstephieert
 

Recently uploaded (20)

Gram Darshan PPT cyber rural in villages of india
Gram Darshan PPT cyber rural  in villages of indiaGram Darshan PPT cyber rural  in villages of india
Gram Darshan PPT cyber rural in villages of india
 
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls KolkataLow Rate Call Girls Kolkata Avani 🤌  8250192130 🚀 Vip Call Girls Kolkata
Low Rate Call Girls Kolkata Avani 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
A Good Girl's Guide to Murder (A Good Girl's Guide to Murder, #1)
 
AlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with FlowsAlbaniaDreamin24 - How to easily use an API with Flows
AlbaniaDreamin24 - How to easily use an API with Flows
 
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in  Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Jamuna Vihar Delhi reach out to us at 🔝9953056974🔝
 
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
定制(CC毕业证书)美国美国社区大学毕业证成绩单原版一比一
 
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With RoomVIP Kolkata Call Girl Salt Lake 👉 8250192130  Available With Room
VIP Kolkata Call Girl Salt Lake 👉 8250192130 Available With Room
 
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Uttam Nagar Delhi 💯Call Us 🔝8264348440🔝
 
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With RoomVIP Kolkata Call Girl Dum Dum 👉 8250192130  Available With Room
VIP Kolkata Call Girl Dum Dum 👉 8250192130 Available With Room
 
Complet Documnetation for Smart Assistant Application for Disabled Person
Complet Documnetation   for Smart Assistant Application for Disabled PersonComplet Documnetation   for Smart Assistant Application for Disabled Person
Complet Documnetation for Smart Assistant Application for Disabled Person
 
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICECall Girls Service Dwarka @9999965857 Delhi 🫦 No Advance  VVIP 🍎 SERVICE
Call Girls Service Dwarka @9999965857 Delhi 🫦 No Advance VVIP 🍎 SERVICE
 
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Porur Phone 🍆 8250192130 👅 celebrity escorts service
 
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mayur Vihar Delhi Contact Us 8377087607
 
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130  Available With RoomVIP Kolkata Call Girl Alambazar 👉 8250192130  Available With Room
VIP Kolkata Call Girl Alambazar 👉 8250192130 Available With Room
 
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on DeliveryCall Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
Call Girls In Mumbai Central Mumbai ❤️ 9920874524 👈 Cash on Delivery
 
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
Sushant Golf City / best call girls in Lucknow | Service-oriented sexy call g...
 
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts serviceChennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
Chennai Call Girls Alwarpet Phone 🍆 8250192130 👅 celebrity escorts service
 
Git and Github workshop GDSC MLRITM
Git and Github  workshop GDSC MLRITMGit and Github  workshop GDSC MLRITM
Git and Github workshop GDSC MLRITM
 
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No AdvanceRohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
Rohini Sector 26 Call Girls Delhi 9999965857 @Sabina Saikh No Advance
 
Russian Call girls in Dubai +971563133746 Dubai Call girls
Russian  Call girls in Dubai +971563133746 Dubai  Call girlsRussian  Call girls in Dubai +971563133746 Dubai  Call girls
Russian Call girls in Dubai +971563133746 Dubai Call girls
 

Computer vision 3 4

  • 2. Weeks 1 & 2 2 Image Transform ► A particularly important class of 2-D linear transforms, denoted T(u, v) 1 1 0 0 ( , ) ( , ) ( , , , ) where ( , ) is the input image, ( , , , ) is the ker , variables and are the transform variables, = 0, 1, 2, ..., M-1 and = 0, 1, M N x y T u v f x y r x y u v f x y r x y u v forward transformation nel u v u v       ..., N-1.
  • 3. Weeks 1 & 2 3 Image Transform ► Given T(u, v), the original image f(x, y) can be recoverd using the inverse tranformation of T(u, v). 1 1 0 0 ( , ) ( , ) ( , , , ) where ( , , , ) is the ker , = 0, 1, 2, ..., M-1 and = 0, 1, ..., N-1. M N u v f x y T u v s x y u v s x y u v inverse transformation nel x y      
  • 4. Weeks 1 & 2 4 Image Transform
  • 5. Weeks 1 & 2 5 Example: Image Denoising by Using DCT Transform
  • 6. Weeks 1 & 2 6 Forward Transform Kernel 1 1 0 0 1 2 1 2 ( , ) ( , ) ( , , , ) The kernel ( , , , ) is said to be SEPERABLE if ( , , , ) ( , ) ( , ) In addition, the kernel is said to be SYMMETRIC if ( , ) is functionally equal to ( , M N x y T u v f x y r x y u v r x y u v r x y u v r x u r y v r x u r y v        1 1 ), so that ( , , , ) ( , ) ( , ) r x y u v r x u r y u 
  • 7. Weeks 1 & 2 7 The Kernels for 2-D Fourier Transform 2 ( / / ) 2 ( / / ) The kernel ( , , , ) Where = 1 The kernel 1 ( , , , ) j ux M vy N j ux M vy N forward r x y u v e j inverse s x y u v e MN        
  • 8. Weeks 1 & 2 8 2-D Fourier Transform 1 1 2 ( / / ) 0 0 1 1 2 ( / / ) 0 0 ( , ) ( , ) 1 ( , ) ( , ) M N j ux M vy N x y M N j ux M vy N u v T u v f x y e f x y T u v e MN                 
  • 9. Weeks 1 & 2 9 Probabilistic Methods Let , 0, 1, 2, ..., -1, denote the values of all possible intensities in an digital image. The probability, ( ), of intensity level occurring in a given image is estimated as i k k z i L M N p z z   ( ) , where is the number of times that intensity occurs in the image. k k k k n p z MN n z  1 0 ( ) 1 L k k p z     1 0 The mean (average) intensity is given by = ( ) L k k k m z p z   
  • 10. Weeks 1 & 2 10 Probabilistic Methods 1 2 2 0 The variance of the intensities is given by = ( ) ( ) L k k k z m p z      th 1 0 The moment of the intensity variable is ( ) = ( ) ( ) L n n k k k n z u z z m p z    
  • 11. Weeks 1 & 2 11 Example: Comparison of Standard Deviation Values 31.6   14.3   49.2  
  • 12. 4/21/2021 12 Spatial Domain vs. Transform Domain ► Spatial domain image plane itself, directly process the intensity values of the image plane ► Transform domain process the transform coefficients, not directly process the intensity values of the image plane
  • 13. 4/21/2021 13 Spatial Domain Process ( , ) [ ( , )]) ( , ) :input image ( , ) :output image :an operator on defined over a neighborhood of point ( , ) g x y T f x y f x y g x y T f x y 
  • 15. 4/21/2021 15 Spatial Domain Process Intensity transformation function ( ) s T r 
  • 16. 4/21/2021 16 Some Basic Intensity Transformation Functions
  • 17. 4/21/2021 17 Image Negatives Image negatives 1 s L r   
  • 18. 4/21/2021 18 Example: Image Negatives Small lesion
  • 19. 4/21/2021 19 Log Transformations Log Transformations log(1 ) s c r  
  • 20. 4/21/2021 20 Log Transformations ► This maps a narrow range of low intensity values in the input into a wider range of output levels. ► The opposite is true for the higher intensity values of input image. ► We use such a transformation for expanding the values of dark pixels in an image while compressing the higher level values.
  • 21. 4/21/2021 21 Example: Log Transformations
  • 22. 4/21/2021 22 Piecewise-Linear Transformations ► Contrast Stretching — Expands the range of intensity levels in an image so that it spans the full intensity range of the recording medium or display device. ► Intensity-level Slicing — Highlighting a specific range of intensities in an image often is of interest.
  • 24. 4/21/2021 24 Highlight the major blood vessels and study the shape of the flow of the contrast medium (to detect blockages, etc.) Measuring the actual flow of the contrast medium as a function of time in a series of images
  • 25. 4/21/2021 25 Histogram Processing ► Histogram Equalization ► Histogram Matching ► Local Histogram Processing ► Using Histogram Statistics for Image Enhancement
  • 26. 4/21/2021 26 Histogram Processing Histogram ( ) is the intensity value is the number of pixels in the image with intensity k k th k k k h r n r k n r  Normalized histogram ( ) : the number of pixels in the image of size M N with intensity k k k k n p r MN n r  
  • 28. ► Histogram equalization is a method in image processing of contrast adjustment using the image's histogram. ► This method usually increases the global contrast of many images, especially when the usable data of the image is represented by close contrast values. ► Through this adjustment, the intensities can be better distributed on the histogram. ► This allows for areas of lower local contrast to gain a higher contrast. ► Histogram equalization accomplishes this by effectively spreading out the most frequent intensity values. Weeks 1 & 2 28 Histogram Equalization
  • 29. Weeks 1 & 2 29 Histogram Equalization
  • 30. 4/21/2021 30 Histogram Equalization The intensity levels in an image may be viewed as random variables in the interval [0, L-1]. Let ( ) and ( ) denote the probability density function (PDF) of random variables and . r s p r p s r s
  • 31. 4/21/2021 31 Histogram Equalization ( ) 0 1 s T r r L     . T(r) is a strictly monotonically increasing function in the interval 0 -1; . 0 ( ) -1 for 0 -1. a r L b T r L r L      
  • 32. 4/21/2021 32 Histogram Equalization . T(r) is a strictly monotonically increasing function in the interval 0 -1; . 0 ( ) -1 for 0 -1. a r L b T r L r L       ( ) 0 1 s T r r L     ( ) is continuous and differentiable. T r ( ) ( ) s r p s ds p r dr 
  • 33. 4/21/2021 33 Histogram Equalization 0 ( ) ( 1) ( ) r r s T r L p w dw     0 ( ) ( 1) ( ) r r ds dT r d L p w dw dr dr dr           ( 1) ( ) r L p r     ( ) 1 ( ) ( ) ( ) ( 1) ( ) 1 r r r s r p r dr p r p r p s L p r ds ds L dr            
  • 34. 4/21/2021 34 Example 2 Suppose that the (continuous) intensity values in an image have the PDF 2 , for 0 r L-1 ( 1) ( ) 0, otherwise Find the transformation function for equalizing the image histogra r r L p r          m.
  • 35. 4/21/2021 35 Example 0 ( ) ( 1) ( ) r r s T r L p w dw     2 0 2 ( 1) ( 1) r w L dw L     2 1 r L  
  • 36. 4/21/2021 36 Histogram Equalization 0 Continuous case: ( ) ( 1) ( ) r r s T r L p w dw     0 Discrete values: ( ) ( 1) ( ) k k k r j j s T r L p r      0 0 1 ( 1) k=0,1,..., L-1 k k j j j j n L L n MN MN        
  • 37. 4/21/2021 37 Example: Histogram Equalization Suppose that a 3-bit image (L=8) of size 64 × 64 pixels (MN = 4096) has the intensity distribution shown in following table. Get the histogram equalization transformation function and give the ps(sk) for each sk.
  • 38. 4/21/2021 38 Example: Histogram Equalization 0 0 0 0 ( ) 7 ( ) 7 0.19 1.33 r j j s T r p r        1  1 1 1 0 ( ) 7 ( ) 7 (0.19 0.25) 3.08 r j j s T r p r         3  2 3 4 5 6 7 4.55 5 5.67 6 6.23 6 6.65 7 6.86 7 7.00 7 s s s s s s            
  • 42. 4/21/2021 42 Question Is histogram equalization always good? No
  • 43. 4/21/2021 43 Histogram Matching Histogram matching (histogram specification) — generate a processed image that has a specified histogram Let ( ) and ( ) denote the continous probability density functions of the variables and . ( ) is the specified probability density function. Let be the random variable with the prob r z z p r p z r z p z s 0 0 ability ( ) ( 1) ( ) Define a random variable with the probability ( ) ( 1) ( ) r r z z s T r L p w dw z G z L p t dt s        
  • 44. 4/21/2021 44 Histogram Matching 0 0 ( ) ( 1) ( ) ( ) ( 1) ( ) r r z z s T r L p w dw G z L p t dt s           1 1 ( ) ( ) z G s G T r    
  • 45. 4/21/2021 45 Histogram Matching: Procedure ► Obtain pr(r) from the input image and then obtain the values of s ► Use the specified PDF and obtain the transformation function G(z) ► Mapping from s to z 0 ( 1) ( ) r r s L p w dw    0 ( ) ( 1) ( ) z z G z L p t dt s     1 ( ) z G s  
  • 46. 4/21/2021 46 Histogram Matching: Example Assuming continuous intensity values, suppose that an image has the intensity PDF Find the transformation function that will produce an image whose intensity PDF is 2 2 , for 0 -1 ( 1) ( ) 0 , otherwise r r r L L p r          2 3 3 , for 0 ( -1) ( ) ( 1) 0, otherwise z z z L p z L         
  • 47. 4/21/2021 47 Histogram Matching: Example Find the histogram equalization transformation for the input image Find the histogram equalization transformation for the specified histogram The transformation function 2 0 0 2 ( ) ( 1) ( ) ( 1) ( 1) r r r w s T r L p w dw L dw L         2 3 3 2 0 0 3 ( ) ( 1) ( ) ( 1) ( 1) ( 1) z z z t z G z L p t dt L dt s L L           2 1 r L   1/3 2 1/3 1/3 2 2 2 ( 1) ( 1) ( 1) 1 r z L s L L r L                     
  • 48. 4/21/2021 48 Histogram Matching: Discrete Cases ► Obtain pr(rj) from the input image and then obtain the values of sk, round the value to the integer range [0, L-1]. ► Use the specified PDF and obtain the transformation function G(zq), round the value to the integer range [0, L-1]. ► Mapping from sk to zq 0 0 ( 1) ( ) ( 1) ( ) k k k k r j j j j L s T r L p r n MN          0 ( ) ( 1) ( ) q q z i k i G z L p z s      1 ( ) q k z G s  
  • 49. 4/21/2021 49 Example: Histogram Matching Suppose that a 3-bit image (L=8) of size 64 × 64 pixels (MN = 4096) has the intensity distribution shown in the following table (on the left). Get the histogram transformation function and make the output image with the specified histogram, listed in the table on the right.
  • 50. 4/21/2021 50 Example: Histogram Matching Obtain the scaled histogram-equalized values, Compute all the values of the transformation function G, 0 1 2 3 4 5 6 7 1, 3, 5, 6, 7, 7, 7, 7. s s s s s s s s         0 0 0 ( ) 7 ( ) 0.00 z j j G z p z     1 2 3 4 5 6 7 ( ) 0.00 ( ) 0.00 ( ) 1.05 ( ) 2.45 ( ) 4.55 ( ) 5.95 ( ) 7.00 G z G z G z G z G z G z G z        0  0  0  1  2  6  5  7 
  • 52. 4/21/2021 52 Example: Histogram Matching Obtain the scaled histogram-equalized values, Compute all the values of the transformation function G, 0 1 2 3 4 5 6 7 1, 3, 5, 6, 7, 7, 7, 7. s s s s s s s s         0 0 0 ( ) 7 ( ) 0.00 z j j G z p z     1 2 3 4 5 6 7 ( ) 0.00 ( ) 0.00 ( ) 1.05 ( ) 2.45 ( ) 4.55 ( ) 5.95 ( ) 7.00 G z G z G z G z G z G z G z        0  0  0  1  2  6  5  7  s0 s2 s3 s5 s6 s7 s1 s4
  • 53. 4/21/2021 53 Example: Histogram Matching 0 1 2 3 4 5 6 7 1, 3, 5, 6, 7, 7, 7, 7. s s s s s s s s         0 1 2 3 4 5 6 7 k r
  • 54. 4/21/2021 54 Example: Histogram Matching 0 3 1 4 2 5 3 6 4 7 5 7 6 7 7 7 k q r z         
  • 58. 4/21/2021 58 Local Histogram Processing Define a neighborhood and move its center from pixel to pixel At each location, the histogram of the points in the neighborhood is computed. Either histogram equalization or histogram specification transformation function is obtained Map the intensity of the pixel centered in the neighborhood Move to the next location and repeat the procedure
  • 59. 4/21/2021 59 Local Histogram Processing: Example
  • 60. 4/21/2021 60 Using Histogram Statistics for Image Enhancement 1 0 ( ) L i i i m r p r     1 0 ( ) ( ) ( ) L n n i i i u r r m p r      1 2 2 2 0 ( ) ( ) ( ) L i i i u r r m p r        1 1 0 0 1 ( , ) M N x y f x y MN         1 1 2 0 0 1 ( , ) M N x y f x y m MN        Average Intensity Variance
  • 61. 4/21/2021 61 Using Histogram Statistics for Image Enhancement 1 0 Local average intensity ( ) denotes a neighborhood xy xy L s i s i i xy m r p r s     1 2 2 0 Local variance ( ) ( ) xy xy xy L s i s s i i r m p r      
  • 62. 4/21/2021 62 Using Histogram Statistics for Image Enhancement: Example 0 1 2 0 1 2 ( , ), if and ( , ) ( , ), otherwise :global mean; :global standard deviation 0.4; 0.02; 0.4; 4 xy xy s G G s G G G E f x y m k m k k g x y f x y m k k k E                 
  • 63. 4/21/2021 63 Spatial Filtering A spatial filter consists of (a) a neighborhood, and (b) a predefined operation Linear spatial filtering of an image of size MxN with a filter of size mxn is given by the expression ( , ) ( , ) ( , ) a b s a t b g x y w s t f x s y t       
  • 65. 4/21/2021 65 Spatial Correlation The correlation of a filter ( , ) of size with an image ( , ), denoted as ( , ) ( , ) w x y m n f x y w x y f x y  ( , ) ( , ) ( , ) ( , ) a b s a t b w x y f x y w s t f x s y t       
  • 66. 4/21/2021 66 Spatial Convolution The convolution of a filter ( , ) of size with an image ( , ), denoted as ( , ) ( , ) w x y m n f x y w x y f x y  ( , ) ( , ) ( , ) ( , ) a b s a t b w x y f x y w s t f x s y t       
  • 68. 4/21/2021 68 Smoothing Spatial Filters Smoothing filters are used for blurring and for noise reduction Blurring is used in removal of small details and bridging of small gaps in lines or curves Smoothing spatial filters include linear filters and nonlinear filters.
  • 69. 4/21/2021 69 Spatial Smoothing Linear Filters The general implementation for filtering an M N image with a weighted averaging filter of size m n is given ( , ) ( , ) ( , ) ( , ) where 2 1 a b s a t b a b s a t b w s t f x s y t g x y w s t m a                , 2 1. n b  
  • 70. 4/21/2021 70 Two Smoothing Averaging Filter Masks
  • 72. 4/21/2021 72 Example: Gross Representation of Objects
  • 73. 4/21/2021 73 Order-statistic (Nonlinear) Filters — Nonlinear — Based on ordering (ranking) the pixels contained in the filter mask — Replacing the value of the center pixel with the value determined by the ranking result E.g., median filter, max filter, min filter
  • 74. 4/21/2021 74 Example: Use of Median Filtering for Noise Reduction
  • 75. 4/21/2021 75 Sharpening Spatial Filters ► Foundation ► Laplacian Operator ► Unsharp Masking and Highboost Filtering ► Using First-Order Derivatives for Nonlinear Image Sharpening — The Gradient
  • 76. 4/21/2021 76 Sharpening Spatial Filters: Foundation ► The first-order derivative of a one-dimensional function f(x) is the difference ► The second-order derivative of f(x) as the difference ( 1) ( ) f f x f x x      2 2 ( 1) ( 1) 2 ( ) f f x f x f x x       
  • 78. 4/21/2021 78 Sharpening Spatial Filters: Laplace Operator The second-order isotropic derivative operator is the Laplacian for a function (image) f(x,y) 2 2 2 2 2 f f f x y        2 2 ( 1, ) ( 1, ) 2 ( , ) f f x y f x y f x y x        2 2 ( , 1) ( , 1) 2 ( , ) f f x y f x y f x y y        2 ( 1, ) ( 1, ) ( , 1) ( , 1) -4 ( , ) f f x y f x y f x y f x y f x y         
  • 79. 4/21/2021 79 Sharpening Spatial Filters: Laplace Operator
  • 80. 4/21/2021 80 Sharpening Spatial Filters: Laplace Operator Image sharpening in the way of using the Laplacian: 2 2 ( , ) ( , ) ( , ) where, ( , ) is input image, ( , ) is sharpenend images, -1 if ( , ) corresponding to Fig. 3.37(a) or (b) and 1 if either of the other two filters is us g x y f x y c f x y f x y g x y c f x y c           ed.
  • 82. 4/21/2021 82 Unsharp Masking and Highboost Filtering ► Unsharp masking Sharpen images consists of subtracting an unsharp (smoothed) version of an image from the original image e.g., printing and publishing industry ► Steps 1. Blur the original image 2. Subtract the blurred image from the original 3. Add the mask to the original
  • 83. 4/21/2021 83 Unsharp Masking and Highboost Filtering Let ( , ) denote the blurred image, unsharp masking is ( , ) ( , ) ( , ) Then add a weighted portion of the mask back to the original ( , ) ( , ) * ( , ) mask mask f x y g x y f x y f x y g x y f x y k g x y     0 k  when 1, the process is referred to as highboost filtering. k 
  • 85. 4/21/2021 85 Unsharp Masking and Highboost Filtering: Example
  • 86. 4/21/2021 86 Image Sharpening based on First-Order Derivatives For function ( , ), the gradient of at coordinates ( , ) is defined as grad( ) x y f x y f x y f g x f f f g y                           2 2 The of vector , denoted as ( , ) ( , ) mag( ) x y magnitude f M x y M x y f g g      Gradient Image
  • 87. 4/21/2021 87 Image Sharpening based on First-Order Derivatives 2 2 The of vector , denoted as ( , ) ( , ) mag( ) x y magnitude f M x y M x y f g g      ( , ) | | | | x y M x y g g   z1 z2 z3 z4 z5 z6 z7 z8 z9 8 5 6 5 ( , ) | | | | M x y z z z z    
  • 88. 4/21/2021 88 Image Sharpening based on First-Order Derivatives z1 z2 z3 z4 z5 z6 z7 z8 z9 9 5 8 6 Roberts Cross-gradient Operators ( , ) | | | | M x y z z z z     7 8 9 1 2 3 3 6 9 1 4 7 Sobel Operators ( , ) | ( 2 ) ( 2 ) | | ( 2 ) ( 2 ) | M x y z z z z z z z z z z z z            
  • 89. 4/21/2021 89 Image Sharpening based on First-Order Derivatives
  • 91. 4/21/2021 91 Example: Combining Spatial Enhancement Methods Goal: Enhance the image by sharpening it and by bringing out more of the skeletal detail
  • 92. 4/21/2021 92 Example: Combining Spatial Enhancement Methods Goal: Enhance the image by sharpening it and by bringing out more of the skeletal detail