Transcript Chapter3

Lecture 3 Image enhancement

Dr. Mohsen NASRI

College of Computer and Information Sciences, Majmaah University, Al Majmaah

[email protected]

Introduction

 Image enhancement widely used computer graphics.  It is the sub areas of image processing  The principal objectives of image enhancement is to process an image so that the result is more suitable than the original image for a specific application Original image Enhanced image

?

2

Methods for image enhancement  Image enhancement techniques can be divided into two broad categories: Spatial domain methods Frequency domain methods Techniques are based on direct manipulation of pixels in an image Techniques are based on modifying the Fourier transform of the image.

3

Spatial Domain Methods • As indicated previously, the term

spatial domain

refers to the aggregate of pixels composing an image. Spatial domain methods are procedures that operate directly on these pixels. Spatial domain processes will be denoted by the expression: g(x,y) =

T

[f(x,y)] Where; f(x,y) in the input image, g(x,y) is the processed image and

T

is as operator on f, defined over some neighborhood of (x,y) • In addition,

T

can operate on a set of input images .

Direct Image manipulation 4

Spatial Domain Methods cont… T transforms the given image f(x,y) into another image g(x,y) T f(x,y) g(x,y) • • • The operator T can be defined over The set of pixels (x,y) of the image The set of ‘neighborhoods’ N(x,y) of each pixel A set of images f1,f2,f3,… 5

Spatial Domain Methods cont …

Operation on the set of image-pixels

6 8 2 0 12 200 20 10 (Operator: Div. by 2) 3 6 4 1 0 100 10 5 6

Spatial Domain Methods cont…

Operation on the set of ‘neighborhoods’ N(x,y) of each pixel

6 8 2 0 12 200 20 10 6 8 12 200 (Operator: sum) 226 7

Spatial Domain Methods cont…

Operation on a set of images f1,f2, …

6 8 2 0 12 200 20 10 (Operator: sum) 11 13 3 0 14 220 23 14 5 2 5 1 20 3 0 4 8

Spatial Domain Methods cont …

Operation on a set of images using logic operations Logic operations

AND OR NOT The operators AND,OR,NOT are functionally complete: Any logic operator can be implemented using only these 3 operators 9

Spatial Domain Methods cont …

Operation on a set of images using logic operations

10

Spatial Domain Methods cont …

Operation on a set of images using logic operations

1 7 2 3 3 Image 1 AND Image 2 9 6 4 (Operator: AND) 1 2 0 2 1 2 1 0 1 1 1 1 2 2 2 2

AND

:

A

B

 {

p p

image

1

and p

image

2 } 11

Spatial Domain Methods cont … Image 1 AND Image 2:Used for Bitplane Slicing and Masking 12

Spatial Domain Methods cont … Arithmetic Operations on a set of images Image 1 OR Image 2 1 7 2 3 3 6 9 4 (Operator: +) 2 9 3 5 4 8 10 6 1 2 1 2 1 2 1 2

OR

:

A

B

 {

p p

image

1

or p

image

2 } 13

Histogram equalization 14

Histogram equalization cont … 15

Histogram equalization cont…

Solution

16

Histogram equalization cont …

Solution cont...

17

Histogram equalization cont …

Solution cont...

18

Image Example before after 19

Histogram Comparison 3000 2500 2000 1500 1000 500 0 0 50 100 150 before equalization 200 3000 2500 2000 1500 1000 500 0 0 50 100 150 200 250 after equalization 300 20

Frequency Domain Methods We compute the Fourier transform of an image to be enhanced, multiply the result by a filter (rather than convolve in the spatial domain), and take the inverse transform to produce the enhanced image  Frequency domain techniques   Unsharp masking Homomorphic filtering* 21

FrequencyDomain Methods

Unsharp Masking

f

(

i

,

j

) 

x

(

i

,

j

)  

g

(

i

,

j

),   0

g(i, j)

is a high-pass filtered version of

x(i, j)

• Example (Laplacian operator)

g

(

i

,

x

(

i

,

j j

)   1 )

x

 (

i

,

j

)

x

(

i

, 

j

1 [

x

( 4  1 )]

x

 1 ,

j

) 

x

(

x

 1 ,

j

)  22

FrequencyDomain Methods Basic idea:

Homomorphic filtering

f

(

x

,

y

) 

i

(

x

,

y

)

r

(

x

,

y

) Illumination (low freq.) reflectance (high freq.) ln

f

(

x

,

y

)  ln

i

(

x

,

y

)  ln

r

(

x

,

y

) freq. domain enhancement 23

Image Example before after 24

Thank You Have a Nice Day