0 Up votes0 Down votes

0 views61 pageshfh

Nov 17, 2017

© © All Rights Reserved

PPT, PDF, TXT or read online from Scribd

hfh

© All Rights Reserved

0 views

hfh

© All Rights Reserved

- The Laws of Linear Combination
- Mathematical symbols list (+,-,x,º,=,(,),...)
- Lecture 2 Random Variables
- audio postproduction for digital video
- IEEE_2015-16_MATLAB
- VANET Comparison
- v5-1-4
- CompleteCollection_QSGuide
- Fast Filter Based Noise Removal in Digital Images
- segmentation
- RPA08oct
- corpurate finance
- An Efficient Noise Removing Technique Using Mdbut Filter in Images
- Statistics Assignment Sample Solutions
- Roussas g a Course in Mathematical Statistics
- Advanced Methods for FE-Reliability Analysis
- A Comparative Analysis of Fingerprint Enhancement Technique Through Absolute Mean Brightness Error and Entropy
- Futbol, El Juego Mas Dificl
- [IJCST-V2I5P28] Author: Nishan Singh, Dr. Vijay Laxmi
- Work Meaning Among Mid_level Professional Employees_a Study of the Importance of Work Centrality and Extrinsic Work Goals in Eigtj Countries_kuchinke_ardichvili_borchert_2011

You are on page 1of 61

com

Chapter 3

Image Enhancement

in the Spatial Domain

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Spatial Domain

The image plane

For a digital image is a Cartesian coordinate system of discrete rows

and columns. At the intersection of each row and column is a pixel.

Each pixel has a value, which we will call intensity.

The frequency domain :

A (2-dimensional) discrete Fourier transform of the spatial domain

We will discuss it in chapter 4.

Enhancement :

To improve the usefulness of an image by using some transformation

on the image.

Often the improvement is to help make the image better looking,

such as increasing the intensity or contrast.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Background

domain enhancement:

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

where f(x, y): the input image

g(x, y): the processed image

T: an operator on f, defined over some neighborhood of

(x, y)

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Gray-level Transformation

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image Negatives

s L 1 r

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Log Transformations

s c log( 1 r )

where c : constant

r 0

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Power-Law Transformation

s cr

where c, : positive constants

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Power-Law Transformation

Example 1: Gamma Correction

0.4

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Power-Law Transformation

Example 2: Gamma Correction

1 0.6

0.4 0.3

2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Power-Law Transformation

Example 3: Gamma Correction

1 3.0

4.0 5.0

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Case 1: Contrast Stretching

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Case 2:Gray-level Slicing

2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Case 3:Bit-plane Slicing

Bit-plane slicing:

It can highlight the contribution made to total image appearance by

specific bits.

Each pixel in an image represented by 8 bits.

Image is composed of eight 1-bit planes, ranging from bit-plane 0 for

the least significant bit to bit plane 7 for the most significant bit.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Bit-plane Slicing: A Fractal Image

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Bit-plane Slicing: A Fractal Image

7 6

5 4 3

2 1 0

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Processing

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Processing

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

Histogram equalization:

To improve the contrast of an image

To transform an image in such a way that the transformed image has a

nearly uniform distribution of pixel values

Transformation:

Assume r has been normalized to the interval [0,1], with r = 0

representing black and r = 1 representing white

s T (r ) 0 r 1

The transformation function satisfies the following conditions:

T(r) is single-valued and monotonically increasing in the interval 0 r 1

0 T (r ) 1 for 0 r 1

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

For example:

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

probability density function of a random variable.

Let pr(r) and ps(s) denote the probability density function of

random variable r and s, respectively.

If pr(r) and T(r) are known, then the probability density

function ps(s) of the transformed variable s can be obtained

dr

p s ( s ) pr ( r )

ds r

Define a transformation function s T (r ) 0 pr (w)dw

where w is a dummy variable of integration

and the right side of this equation is the cumulative distribution

function of random variable r.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

r

Given transformation function T(r), T (r ) 0 pr (w)dw

dr dT (r ) d r p (r )

dr 0

p ( w) dw

ds dr

r r

dr 1

ps ( s) pr (r ) pr (r ) 1 0 s 1

ds pr (r )

ps(s) now is a uniform probability density function.

T(r) depends on pr(r), but the resulting ps(s) always is uniform.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

In discrete version:

The probability of occurrence of gray level rk in an image is

nk

pr ( r ) k 0,1,2,..., L 1

n

n : the total number of pixels in the image

nk : the number of pixels that have gray level rk

L : the total number of possible gray levels in the image

The transformation function is

k k nj

sk T (rk ) pr (rj ) k 0,1,2,..., L 1

j 0 j 0 n

in the input image into a corresponding pixel with level sk.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Equalization

histograms of the images in Fig 3.17(1), using Eq. (3.3-8).

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Histogram Matching

except that instead of trying to make the output image have a

flat histogram, we would like it to have a histogram of a

specified shape, say pz(z).

We skip the details of implementation.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Local Enhancement

in the sense that pixels are modified by a transformation

function based on the gray-level content of an entire image.

However, there are cases in which it is necessary to enhance

details over small areas in an image.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

they can from the pixels directly.

Let r denote a discrete random variable representing discrete gray-levels in

the range [0,L-1], and p(ri) denote the normalized histogram component

corresponding to the ith value of r, then the nth moment of r about its mean

is defined as L 1

n (r ) (ri m) n p (ri )

i 0

where m is the mean value of r

L 1

m ri p (ri )

i 0

L 1

2 (r ) (ri m) 2 p (ri )

i 0

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

purposes:

The global mean and variance (global means for the entire

image) are useful for adjusting overall contrast and

intensity.

The mean and standard deviation for a local region are

useful for correcting for large-scale changes in intensity

and contrast. ( See equations 3.3-21 and 3.3-22.)

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Example: Enhancement based on local statistics

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Example: Enhancement based on local statistics

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Example: Enhancement based on local statistics

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

operations of addition, subtraction, multiplication, division,

logical AND, OR, XOR and NOT. Such operations are done

on pairs of their corresponding pixels.

Often only one of the images is a real picture while the other is

a machine generated mask. The mask often is a binary image

consisting only of pixel values 0 and 1.

Example: Figure 3.27

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

AND

OR

2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image Subtraction

Example 1

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image Subtraction

Example 2

So, if you want to display the result it may be necessary to

readjust the dynamic range by scaling.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image Averaging

illumination), image noise becomes apparent.

A noisy image g(x,y) can be defined by

g ( x , y ) f ( x, y ) ( x, y )

where f (x, y): an original image

( x, y ) : the addition of noise

One simple way to reduce this granular noise is to take

several identical pictures and average them, thus

smoothing out the randomness.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Example: Adding Gaussian Noise

of Galaxy Pair NGC3314.

Figure 3.30 (b): Image

corrupted by additive

Gaussian noise with zero

mean and a standard

deviation of 64 gray

levels.

Figure 3.30 (c)-(f):

Results of averaging

K=8,16,64, and 128 noisy

images.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Example: Adding Gaussian Noise

From top to bottom:

Difference images

between Fig. 3.30 (a)

and the four images in

Figs. 3.30 (c) through

(f), respectively.

Corresponding

histogram.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

computed directly by simple calculations on the pixels of the input image.

Spatial filtering can be either linear or non-linear.

For each output pixel, some neighborhood of input pixels is used in the

computation.

In general, linear filtering of an image f of size MXN with a filter mask of

size mxn is given by

a b

g ( x, y ) w(s, t ) f ( x s, y t )

s at b

This concept called convolution. Filter masks are sometimes called

convolution masks or convolution kernels.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

some other mathematical operations are use. These can

include conditional operations (if , then), statistical

(sorting pixel values in the neighborhood), etc.

Because the neighborhood includes pixels on all sides of the

center pixel, some special procedure must be used along the

top, bottom, left and right sides of the image so that the

processing does not try to use pixels that do not exist.

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Averaging filters (Lowpass filters in Chapter 4))

Box filter

Weighted average filter

2002 R. C. Gonzalez & R. E. Woods

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

a weighted averaging filter of size mxn is given by

a b

w(s, t ) f ( x s, y t )

g ( x, y ) s at b

a b

w(s, t )

s at b

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Image smoothing with masks of various sizes

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Another Example

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Order-Statistic Filters

Order-statistic filters

Median filter: to reduce impulse noise (salt-and-

pepper noise)

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

derivatives of an image.

The first-order derivative of a one-dimensional

function f(x) is f

f ( x 1) f ( x)

x

The second-order derivative of a one-dimensional

function f(x) is 2 f

f ( x 1) f ( x 1) 2 f ( x)

x 2

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

An Example

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Laplacian

The two dimensional Laplacian operator for continuous

functions: 2

f 2

f

2 f 2 2

x y

The Laplacian is a linear operator.

2 f

f ( x 1, y ) f ( x 1, y ) 2 f ( x, y)

x 2

2 f

f ( x, y 1) f ( x, y 1) 2 f ( x, y)

y 2

2 f [ f ( x 1, y) f ( x 1, y) f ( x, y 1) f ( x, y 1)] 4 f ( x)

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Laplacian

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Laplacian

from the original image.

f ( x, y) 2 f if the center coefficien t of the Laplacian mask is negative.

g ( x, y)

f ( x, y) f if the center coefficien t of the Laplacian mask is positive.

2

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Laplacian: Simplifications

Not only 2 f

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Gradient

The gradient of function f at coordinates (x,y) is defined as

the two-dimensional column vector:

f

Gx x

f f

G y

y

The magnitude of this vector is given by

1

f 2 f 2

1 2

f mag (f ) G G 2 2 2

x y

x y

f G x G y

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Gradient

Roberts cross-gradient

operators

Sobel

operators

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

The Gradient: Using Sobel Operators

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Combining Spatial

Enhancement Methods

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

Combining Spatial

Enhancement Methods

Digital Image Processing, 2nd ed. www.imageprocessingbook.com

- The Laws of Linear CombinationUploaded byDikshant Sharma
- Mathematical symbols list (+,-,x,º,=,(,),...)Uploaded bytgoip
- Lecture 2 Random VariablesUploaded byjstnyeh1
- audio postproduction for digital videoUploaded bysacerDOS
- IEEE_2015-16_MATLABUploaded byTriple N Infotech
- VANET ComparisonUploaded byAbdul Haque
- v5-1-4Uploaded bysathiiishkumar
- CompleteCollection_QSGuideUploaded byevafdezfraile
- Fast Filter Based Noise Removal in Digital ImagesUploaded byEditor IJRITCC
- segmentationUploaded bysanjaygaur123
- RPA08octUploaded bywwwwwwwqqq
- corpurate financeUploaded bysunnyricto
- An Efficient Noise Removing Technique Using Mdbut Filter in ImagesUploaded byIOSRjournal
- Statistics Assignment Sample SolutionsUploaded byHebrew Johnson
- Roussas g a Course in Mathematical StatisticsUploaded byKarlilla Cuéllar
- Advanced Methods for FE-Reliability AnalysisUploaded byLuis Horacio Martínez Martínez
- A Comparative Analysis of Fingerprint Enhancement Technique Through Absolute Mean Brightness Error and EntropyUploaded byEditor IJRITCC
- Futbol, El Juego Mas DificlUploaded byJulio Kaegi
- [IJCST-V2I5P28] Author: Nishan Singh, Dr. Vijay LaxmiUploaded byEighthSenseGroup
- Work Meaning Among Mid_level Professional Employees_a Study of the Importance of Work Centrality and Extrinsic Work Goals in Eigtj Countries_kuchinke_ardichvili_borchert_2011Uploaded byDenise Neiva
- Px c 3903515Uploaded byniranjan_mehar
- A Review Paper on Image Processing Based Algorithms for De-noising and Enhancement of Underwater ImagesUploaded byIJSTE
- A Modified Filter for Image Enhancement and RestorationUploaded byIJSTE
- DENOISE Projects Professional EnUploaded byZezinha89
- Mueller_and_Muller_Timing_Recovery.pdfUploaded byrcollins06181675
- Pearson 1932Uploaded byi771197
- 1985 Churchill, Ford, Hartley &Walker_The determinants of Salesperson Performance_A Meta_Analysis.pdfUploaded bykeku091
- Kuliah 8 Hidrologi_2017Uploaded byAgie Ramdiansyah
- 0419052078 Broken and Degraded Document Images BinarizationUploaded byTamanna Chakma
- Numerical Description of DataUploaded byNelson Tejara

- Verilog Switchlevel ProgrammingUploaded byramjidr
- ddtv unit 5 part 2.pptxUploaded byramjidr
- ddtv notesUploaded byramjidr
- ExaminationReforms.pdfUploaded byRamling Patrakar
- Journa Front Page SpringerUploaded byramjidr
- Presentation 1Uploaded byramjidr
- AWP Lecture Notes-finalUploaded bygopichand
- hu2012Uploaded byramjidr
- A SURVEY PAPER ON DATA HIDING TECHNIQUE BASED ON CODEWORD SUBSTITUTION- IJOER.pdfUploaded byramjidr
- A Survey on Adaptive Edge-Enhanced Color Interpolation Processor--jaya Praka v.m 254-258Uploaded byramjidr
- Lecture 5Uploaded byramjidr
- ME14 701 Mechatronics Teaching Scheme CreditsUploaded byramjidr
- mech 3Uploaded byramjidr
- mech2Uploaded byramjidr
- MechUploaded byramjidr
- Ficks lawUploaded byramjidr
- Unit 1 Vlsi s6 Ece NewUploaded byramjidr
- Important QuestionsUploaded byramjidr
- Lecture SYS 027 Synthesis SequentialUploaded byramjidr
- MICROPROCESSOR LABORATORY.pdfUploaded byramjidr
- EC207 Logic circuit desin.pdfUploaded byramjidr
- funding agencies.pdfUploaded byramjidr
- Ab QuestinUploaded byramjidr
- FrontEce LacUploaded byramjidr
- Ec 204 Analog Integrated CircuitsUploaded byramjidr
- Teachers Recruitment Board - 102738.pdf RAMJI.pdfUploaded byramjidr

- Electronic Kits, Circuits and ProjectsUploaded byAli Samari
- DELTRONIC Optical Comparator Dh216Uploaded bytigdran
- Animation.pptUploaded bySudhanwa Kulkarni
- Material ProductivityUploaded byNenad Mihajlov
- IAM_TestResults.docxUploaded bySudeep Vemulapati
- Ch-6 Expected Utility as a Basis for Decision-making The Evolution of Theories.pptxUploaded bysimmi33
- ACBA Brochure Text-8Uploaded byrazeeb
- Measuring InstrumentUploaded byChristopher Au
- Neural Networks DocumentationUploaded byEva
- Amplificador de Aislamiento Inductivo Burr-Brown ISO213 BurrUploaded byJoanzarzal
- Tanques PVSVUploaded bywfjerr
- Tutorial 1Uploaded byOlivier Sin Fai Lam
- Aie HeaterUploaded bySupriya Kadam
- Case Study - Sphinx.pdfUploaded byJohn Edward
- Design and Manufacturing SampleUploaded byHariharan Govindaraj
- Number SystemUploaded byhrishipisal
- dg_how_toUploaded byByju Mannil
- Gorman J. - the Transmission of Our Understanding of Historical TimeUploaded bymoyanodiaz
- Mean Well USER Technical ManualUploaded byRevathy
- Accpac - Guide - User Manual for OE54.pdfUploaded bycaplusinc
- Infosys Consulting in 2006Uploaded byparvathyjoy90
- Platon 3 Part SpecUploaded byQuevara Anton
- Moral Character and VirtuesUploaded byRaymer Oclarit
- Customer ReceiptUploaded bykamar
- Major Project File.docxUploaded byAdarsh Srivastava
- Barium HexaferiteUploaded byMuhammad Fajar
- Experimental Physics SuperpositionUploaded byGrace Cywrain
- PSPC ListingUploaded bykarthikmsec
- Thesis GuidelinesUploaded byZannyRyanQuiroz
- Modular ConstructionUploaded byJuan Collado

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.