image enhancement using arithmetic/logical operations

43
Digital Image Processing Image Enhancement Using Arithmetic/Logical Operations

Upload: others

Post on 24-Jan-2022

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image Enhancement Using Arithmetic/Logical Operations

Digital Image Processing

Image Enhancement Using Arithmetic/Logical Operations

Page 2: Image Enhancement Using Arithmetic/Logical Operations

Enhancement Using Arithmetic/Logic

Operations

AND

OR

NOT

Subtraction

Addition

Multiplication

Division

Page 3: Image Enhancement Using Arithmetic/Logical Operations
Page 4: Image Enhancement Using Arithmetic/Logical Operations

Image subtraction

Enhancement of differences between images

),(),(),( yxhyxfyxg

Page 5: Image Enhancement Using Arithmetic/Logical Operations
Page 6: Image Enhancement Using Arithmetic/Logical Operations

Mask mode radiography

Page 7: Image Enhancement Using Arithmetic/Logical Operations

Image Averaging

Averaging K different noisy images

),(),(),( yxyxfyxg

K

i

i yxgK

yxg1

),(1

),(

),(),( yxfyxgE

2

),(

2

),(

1yxyxg

K

),(),(

1yxyxg

K ,

Page 8: Image Enhancement Using Arithmetic/Logical Operations
Page 9: Image Enhancement Using Arithmetic/Logical Operations
Page 10: Image Enhancement Using Arithmetic/Logical Operations

Basics of Spatial Filtering

)1,1()1,1(

),1()0,1(

),()0,0(

),1()0,1(

)1,1()1,1(

yxfw

yxfw

yxfw

yxfw

yxfwR

Page 11: Image Enhancement Using Arithmetic/Logical Operations

Image size:

Mask size:

and

and

NM nm

a

as

b

bt

tysxftswyxg ),(),(),(

2/)1( ma 2/)1( nb

1,...,2,1,0 Mx 1,...,2,1,0 Ny

Page 12: Image Enhancement Using Arithmetic/Logical Operations
Page 13: Image Enhancement Using Arithmetic/Logical Operations

9

1

992211

...

i

ii zw

zwzwzwR

Page 14: Image Enhancement Using Arithmetic/Logical Operations

Smoothing Spatial Filters

Smoothing

Noise reduction

Smoothing of false contours

Reduction of irrelevant detail

Page 15: Image Enhancement Using Arithmetic/Logical Operations

9

19

1

i

izR

Page 16: Image Enhancement Using Arithmetic/Logical Operations

a

as

b

bt

a

as

b

bt

tsw

tysxftsw

yxg

),(

),(),(

),(

Page 17: Image Enhancement Using Arithmetic/Logical Operations
Page 18: Image Enhancement Using Arithmetic/Logical Operations
Page 19: Image Enhancement Using Arithmetic/Logical Operations

Order-statistic filters

median filter: Replace the value of a pixel by the median of the gray levels in the neighborhood of that pixel

Noise-reduction

Page 20: Image Enhancement Using Arithmetic/Logical Operations
Page 21: Image Enhancement Using Arithmetic/Logical Operations

Sharpening Spatial Filters

Foundation

The first-order derivative

The second-order derivative

)()1( xfxfx

f

)(2)1()1(2

2

xfxfxfx

f

Page 22: Image Enhancement Using Arithmetic/Logical Operations
Page 23: Image Enhancement Using Arithmetic/Logical Operations

Use of second derivatives for enhancement-The Laplacian

Development of the method

),(2),1(),1(2

2

yxfyxfyxfx

f

2

2

2

22

y

f

x

ff

),(2)1,()1,(2

2

yxfyxfyxfy

f

Page 24: Image Enhancement Using Arithmetic/Logical Operations

),(4)]1,(

)1,(),1(),1([2

yxfyxf

yxfyxfyxff

positive is

mask Laplacian theof

tcoefficiencenter theif

),(),(

negative is

mask Laplacian theof

t coefficiencenter theif

),(),(

),(

2

2

yxfyxf

yxfyxf

yxg

Page 25: Image Enhancement Using Arithmetic/Logical Operations
Page 26: Image Enhancement Using Arithmetic/Logical Operations
Page 27: Image Enhancement Using Arithmetic/Logical Operations

Simplifications

)]1,(

)1,(),1(),1([),(5

),(4)]1,(

)1,(),1(),1([),(),(

yxf

yxfyxfyxfyxf

yxfyxf

yxfyxfyxfyxfyxg

Page 28: Image Enhancement Using Arithmetic/Logical Operations
Page 29: Image Enhancement Using Arithmetic/Logical Operations

Unsharp masking and high-boost filtering

Unsharp masking

Substract a blurred version of an image from the image itself

: The image, : The blurred image

),(),(),( yxfyxfyxfs

),( yxf ),( yxf

Page 30: Image Enhancement Using Arithmetic/Logical Operations

High-boost filtering

),(),(),( yxfyxAfyxfhb

),(),(),()1(),( yxfyxfyxfAyxfhb

),(),()1(),( yxfyxfAyxf shb

Page 31: Image Enhancement Using Arithmetic/Logical Operations

Use the Laplacian as the sharpening filtering

positive is

mask Laplacian theof

tcoefficiencenter theif

),(),(

negative is

mask Laplacian theof

t coefficiencenter theif

),(),(

2

2

yxfyxAf

yxfyxAf

fhb

Page 32: Image Enhancement Using Arithmetic/Logical Operations
Page 33: Image Enhancement Using Arithmetic/Logical Operations
Page 34: Image Enhancement Using Arithmetic/Logical Operations

Use of first derivatives for enhancement—The gradient

y

fx

f

G

G

y

xf

Page 35: Image Enhancement Using Arithmetic/Logical Operations

The magnitude is rotation invariant (isotropic)

2

122

21

22

)(mag

y

f

x

f

GGf yxf

yx GGf

Page 36: Image Enhancement Using Arithmetic/Logical Operations

Computing using cross differences, Roberts cross-gradient operators

)( 59 zzGx )( 68 zzGy and

21

2

68

2

59 )()( zzzzf

6859 zzzzf

Page 37: Image Enhancement Using Arithmetic/Logical Operations

Sobel operators

A weight value of 2 is to achieve some smoothing by giving more importance to the center point

)2()2(

)2()2(

741963

321987

zzzzzz

zzzzzzf

Page 38: Image Enhancement Using Arithmetic/Logical Operations
Page 39: Image Enhancement Using Arithmetic/Logical Operations
Page 40: Image Enhancement Using Arithmetic/Logical Operations

Combining Spatial Enhancement

Methods

An example

Laplacian to highlight fine detail

Gradient to enhance prominent edges

Smoothed version of the gradient image used to mask the Laplacian image

Increase the dynamic range of the gray levels by using a gray-level transformation

Page 41: Image Enhancement Using Arithmetic/Logical Operations
Page 42: Image Enhancement Using Arithmetic/Logical Operations
Page 43: Image Enhancement Using Arithmetic/Logical Operations

Example 2

Arithmetic Operations

Write a computer program capable of performing the four arithmetic operations between two images. This project is generic, in the sense that it will be used in other projects to follow. In addition to multiplying two images, your multiplication function must be able to handle multiplication of an image by a constant.