image enhancement in the spatial...

30
Image Enhancement in the Spatial Domain Image Enhancement in the Spatial Domain

Upload: others

Post on 31-May-2020

9 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Image Enhancement in the Spatial DomainImage Enhancement in the Spatial Domain

Page 2: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Topics� Definitions and basics

� Some Basic Gray Level Transformations

� Histogram ProcessingHistogram Processing

� Enhancement Using Arithmetic/Logic Operations

Page 3: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Image Enhancement� The principal objective of enhancement is to process

an image so that the result is more suitable than the original image for a specific application

� Enhancement Categories:� Enhancement Categories:

� spatial domain enhancement: refers to the image plane itself, and approaches in this category are based on direct manipulation of pixels in an image

� Frequency domain enhancement: processing techniques are based on modifying the Fourier transform of an image.

Page 4: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Spatial Domain Processes� Spatial domain processes are denoted by

g(x,y) = T[ f(x,y) ]

� A neighborhood about a point (x, y) is a square or rectangular sub-image area centered at (x, y)

Page 5: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Basic Gray Level Transformations (1)

Page 6: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Basic Gray Level Transformations(2)

� Contrast enhancement

Page 7: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Contrast Enhancement

Page 8: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Image negation

Page 9: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Image negation� A mammography image

Page 10: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Basic Gray Level Transformations� Gamma correction: Power-law transformations

have the basic form s=crγ

Page 11: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Gamma Correction

Page 12: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Original Image

Gamma Correction with c=1, γ=0.6

Gamma Correction with c=1, γ=0.4

Gamma Correction with c=1, γ=0.3

Page 13: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Original Image

Gamma Correction c=1, γ=3

Gamma Correction c=1, γ=4

Gamma Correction c=1, γ=5

Page 14: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Piecewise Linear Contrast

Stretching

Page 15: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Gray Level Slicing

Page 16: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Gray Level Slicing Example

Page 17: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Bit-plane Slicing

Page 18: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Histogram Analysis� The histogram of a digital image with gray levels

in the range [0, L-1] is a discrete function h(rk)=nk, where rk is the kth gray level and nk is the number of pixels in the image having gray the number of pixels in the image having gray level rk.

Page 19: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Example

Page 20: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that
Page 21: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Histogram Equalization� Histogram equalization is mapping each pixel

with level rk in the input image into a corresponding pixel with level sk in the output imageimage

� After equalization the gray levels in the histogram are more uniformly distributed

Page 22: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Histogram equalization (cont.)� The probability of occurrence of gray level rk in

an image is approximated by pr(rK) = nk/n for k=0,..,L-1

� The converted gray level value is:

for k=0,.., L-1

∑ ∑= =

===k

j

k

j

jjrkk n

nrPrTS

0 0

)()(

Page 23: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that
Page 24: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that
Page 25: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Local Histogram Equalization

Page 26: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Logical Operations� Logical AND

Page 27: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Logical Operations� Logical OR

Page 28: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Arithmetic Operations� Image subtraction

Page 29: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Motion Detection by Image

Subtraction

Page 30: Image Enhancement in the Spatial Domainceng503.cankaya.edu.tr/uploads/files/file/lecture2(1).pdfImage Enhancement The principal objective of enhancement is to process an image so that

Questions?Questions?