Histogram Specification

Slides:



Advertisements
Similar presentations
CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Advertisements

Chapter 3 Image Enhancement in the Spatial Domain.
A Simple Random Variable, A Fair D6 and the Inheritance of Probabilities through Random Variables.
Image Histograms Cumulative histogram
Topic 4 - Image Mapping - I DIGITAL IMAGING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Intensity Transformations (Chapter 3)
EE663 Image Processing Histogram Equalization Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing
Histogram Processing The histogram of a digital image with gray levels from 0 to L-1 is a discrete function h(rk)=nk, where: rk is the kth gray level nk.
ECE 472/572 - Digital Image Processing
Image Enhancement in the Spatial Domain II Jen-Chang Liu, 2006.
Image Enhancement in the Spatial Domain
1 Chapter 4: Point Processing 4.1 Introduction Any image-processing operation transforms the gray values of the pixels. Image-processing operations may.
Intensity Transformations
Digital Image Processing & Pattern Analysis (CSCE 563) Intensity Transformations Prof. Amr Goneid Department of Computer Science & Engineering The American.
Lecture 4 Digital Image Enhancement
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
Basis beeldverwerking (8D040) dr. Andrea Fuster Prof.dr. Bart ter Haar Romeny Prof.dr.ir. Marcel Breeuwer dr. Anna Vilanova Histogram equalization.
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
Digital Image Processing
Samples vs. Distributions Distributions: Discrete Random Variable Distributions: Continuous Random Variable Another Situation: Sample of Data.
Lecture 2. Intensity Transformation and Spatial Filtering
511 Friday March 30, 2001 Math/Stat 511 R. Sharpley Lecture #27: a. Verification of the derivation of the gamma random variable b.Begin the standard normal.
Input image Output image Transform equation All pixels Transform equation.
Lecture II-2: Probability Review
4-1 Continuous Random Variables 4-2 Probability Distributions and Probability Density Functions Figure 4-1 Density function of a loading on a long,
Lecture 4 Digital Image Enhancement
 Image Enhancement in Spatial Domain.  Spatial domain process on images can be described as g(x, y) = T[f(x, y)] ◦ where f(x,y) is the input image,
Supplementary Text 2. If the relationship between two random variables X and Y is approximately illustrated in the following figure, then how can we discretize.
Topics Covered Discrete probability distributions –The Uniform Distribution –The Binomial Distribution –The Poisson Distribution Each is appropriately.
MS 305 Recitation 11 Output Analysis I
PROBABILITY AND STATISTICS FOR ENGINEERING Hossein Sameti Department of Computer Engineering Sharif University of Technology Two Functions of Two Random.
QBM117 Business Statistics Probability and Probability Distributions Continuous Probability Distributions 1.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
Copyright © 2010 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin Chapter 5 Discrete Random Variables.
Copyright © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 6 Some Continuous Probability Distributions.
Simulation is the process of studying the behavior of a real system by using a model that replicates the behavior of the system under different scenarios.
CS654: Digital Image Analysis Lecture 18: Image Enhancement in Spatial Domain (Histogram)
4-1 Continuous Random Variables 4-2 Probability Distributions and Probability Density Functions Figure 4-1 Density function of a loading on a long,
Intensity Transformations (Histogram Processing)
Random Variables Presentation 6.. Random Variables A random variable assigns a number (or symbol) to each outcome of a random circumstance. A random variable.
CSSE463: Image Recognition Day 5 Lab 2 due Wednesday, 1:30. Lab 2 due Wednesday, 1:30. Tip: by Tues 1:30  + 1 late day to use on: Tip: by Tues 1:30 
Chapter 3 DeGroot & Schervish. Functions of a Random Variable the distribution of some function of X suppose X is the rate at which customers are served.
Copyright © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 3 Random Variables and Probability Distributions.
Topic 5: Continuous Random Variables and Probability Distributions CEE 11 Spring 2002 Dr. Amelia Regan These notes draw liberally from the class text,
1 7.5 CONTINUOUS RANDOM VARIABLES Continuous data occur when the variable of interest can take on anyone of an infinite number of values over some interval.
1 7.3 RANDOM VARIABLES When the variables in question are quantitative, they are known as random variables. A random variable, X, is a quantitative variable.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
EE 7730 Image Enhancement. Bahadir K. Gunturk2 Image Enhancement The objective of image enhancement is to process an image so that the result is more.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
Copyright © 2010 Pearson Addison-Wesley. All rights reserved. Chapter 3 Random Variables and Probability Distributions.
Unit 4 Review. Starter Write the characteristics of the binomial setting. What is the difference between the binomial setting and the geometric setting?
Prof. Amr Goneid, AUC1 Analysis & Design of Algorithms (CSCE 321) Prof. Amr Goneid Department of Computer Science, AUC Part 3. Time Complexity Calculations.
Lesson Applications of the Normal Distribution.
Confidence Intervals. Point Estimate u A specific numerical value estimate of a parameter. u The best point estimate for the population mean is the sample.
Copyright © Cengage Learning. All rights reserved. 8 PROBABILITY DISTRIBUTIONS AND STATISTICS.
4-1 Continuous Random Variables 4-2 Probability Distributions and Probability Density Functions Figure 4-1 Density function of a loading on a long,
Digital Image Processing
Digital Image Processing
Digital Image Processing
Chapter 6 Some Continuous Probability Distributions.
Chapter 3 Image Enhancement in the Spatial Domain
Histogram Equalization
Digital Image Procesing Introduction to Image Enhancement Histogram Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL PROCESSING IMPERIAL.
Cumulative Distribution Function
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
RANDOM VARIABLES Random variable:
Further Topics on Random Variables: Derived Distributions
Further Topics on Random Variables: Derived Distributions
Presentation transcript:

Histogram Specification desired -1 G G equalize equalize

Histogram Specification (cont.) Equalize the levels of the original image. Specify the desired density function (histogram) and obtain the transformation function G(z). Apply the inverse transformation function z = G (s) to the levels obtained in first step. -1

Histogram Specification (cont.) -from text- Saw what we want the histogram to look like and come up with a transform function that will give it to us. Continuous random variables r & z. Pr(r) and Pz(z) denote their probability density functions. (Continuous equivalent of a histogram). Pr(r) input image Pz(z) desired output image (processed) This is what we'd like the processed image to have.

Histogram Specification (cont.) -from text- Continuous version of histogram equalization. Cumulative Distribution Function

Histogram Specification (cont.) -from text- Continuous version of histogram equalization. Cumulative distribution function.

Histogram Specification (cont.) -from text- If you have Pr(r) estimated from input image, you can obtain T(r) from Transformation G(z) can be obtained by using since you specified Pz(z)!

Histogram Specification (cont.) -from text- -1 Assume G exists and that is satisfys: Single-Valued, monotonically increasing 0 <= G (z) <= 1 for 0 <= z <= 1 -1

Histogram Specification (cont.) -from text- You can obtain an image with the specified probability density function from an input function using the following: obtain T(r) using equilization obtain G(z) by equalizing specified histogram obtain G (z) obtain the output image by applying G to all pixels in input image. -1 -1

Histogram Specification (cont.) -from text- So far so good (continuously speaking) In practice it is difficult to obtain analytical expressions for T(r) and G With discrete values it becomes possible to make a close approximation to the histogram. -1

discrete Formulas L is the number of discrete gray levels n = total # pixels n = # of pixels with gray level j j

Implementation Each set of gray levels is a 1D array All mappings from r to s and s to z are simple table lookups Each element (e.g. s ) contains 2 important pieces of information: subscript k denotes the location of the element in the array s denotes the value at that location We need to only look at integer values k

Refer to Figure 3.19 GW (a) a hypothetical transform function given an image that was equalized. (b) Equalize specified histogram. G is just running the transform backwards. But wait a minute! Where did we get the z's??? We have to use an iterative scheme. -1

Iterative Scheme Obtain histogram of the given image. Equalize the image to precompute a mapped level s for each r . T Obtain G from the specified histogram by equalization. Precompute z for each s using iterative scheme (3.3-17) Map r -> s and back to z . Moon example 3.4, page 100, 101, 102 GW k k k k k k k

desired 0.3 0.3 0.2 0.2 0.1 0.1 1 2 3 4 5 6 7 1 2 3 4 5 6 7 0 – 0.19 1 – 0.25 2 – 0.21 3 – 0.16 4 – 0.08 5 – 0.06 6 – 0.03 7 – 0.02 0 – 0.0 1 – 0.0 2 – 0.0 3 – 0.15 4 – 0.20 5 – 0.30 6 – 0.20 7 – 0.15 1.0 1.0 0.8 0.8 0.6 0.6 0.4 0.4 0.2 0.2 0.0 0.0 1 2 3 4 5 6 7 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.2 0.2 0.1 0.1 r s 1 1 2 3 4 5 6 7 7 1.0 1 1 2 3 4 5 6 7 7 1.0 6 0.8 5 0.6 4 3 0.4 2 0.2 1 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 1 2 1 1 2 3 4 5 6 7 1 3 7 1.0 6 0.8 5 0.6 4 3 0.4 2 0.2 1 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 3 2 5 7 1.0 6 0.8 5 0.6 4 3 0.4 2 0.2 1 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 3 2 5 7 1.0 6 3 6 0.8 5 0.6 4 3 0.4 2 0.2 1 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 3 2 5 7 1.0 6 3 6 0.8 5 0.6 4 4 6 3 0.4 2 0.2 1 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 3 2 5 7 1.0 6 3 6 0.8 5 0.6 4 4 6 3 0.4 5 7 2 0.2 1 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 3 2 5 7 1.0 6 3 6 0.8 5 0.6 4 4 6 3 0.4 5 7 2 0.2 1 6 7 0.0 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 1 3 2 3 4 5 6 7 2 5 7 1.0 6 3 6 0.8 5 0.6 4 4 6 3 0.4 5 7 2 0.2 1 6 7 0.0 7 7 1 2 3 4 5 6 7

equalized histogram 0.3 0.3 0.3 0.2 0.2 0.2 0.1 0.1 0.1 r s 1 1 3 2 5 1 1 2 3 4 5 6 7 1 1 2 3 4 5 6 7 3 1 = 0.19 3 = 0.25 5 = 0.21 6 = .16+.08=.24 7 = .06+.03+.02 = 0.11 2 5 7 1.0 6 3 6 0.8 5 0.6 4 4 6 3 0.4 5 7 2 0.2 1 6 7 0.0 7 7 1 2 3 4 5 6 7

desired equalized histogram 0.3 0.3 0.2 0.2 0.1 0.1 r s 1 1 2 3 4 5 6 7 1 2 3 4 5 6 7 2 7 1.0 3 1 6 0.8 5 4 2 0.6 4 5 4 3 0.4 2 0.2 6 6 1 0.0 7 7 1 2 3 4 5 6 7

equalized orig resultant histogram 1 3 0.3 1 3 4 0.3 2 5 5 0.2 0.2 3 6 6 0.1 0.1 4 6 6 5 7 7 1 4 6 7 6 7 7 2 3 5 1 2 3 4 5 6 7 7 7 7 7 1.0 0.3 6 0.8 5 0.2 0.6 4 3 0.4 0.1 2 0.2 1 0.0 desired 1 2 3 4 5 6 7 1 2 3 4 5 6 7