ENEE631 Digital Image Processing (Spring'04) Point Operations Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park   www.ajconline.umd.edu.

Slides:



Advertisements
Similar presentations
Digital Image Processing Lecture 3: Image Display & Enhancement
Advertisements

Digital Image Processing
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Image Processing Lecture 4
Chapter 3 Image Enhancement in the Spatial Domain.
Chapter - 2 IMAGE ENHANCEMENT
Intensity Transformations (Chapter 3)
HISTOGRAM TRANSFORMATION IN IMAGE PROCESSING AND ITS APPLICATIONS Attila Kuba University of Szeged.
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
Image (and Video) Coding and Processing Lecture 5: Point Operations Wade Trappe.
Intensity Transformations
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
Digital Image Processing
Chapter 4: Image Enhancement
Image Enhancement by Modifying Gray Scale of Individual Pixels
Digital Image Processing & Pattern Analysis (CSCE 563) Intensity Transformations Prof. Amr Goneid Department of Computer Science & Engineering The American.
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
ELE 488 Fall 2006 Image Processing and Transmission Generate and Display of Gray Scale images in Matlab 2.Histogram of Gray Scale Image 3.Point.
Digital Image Processing
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
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.
EEE 498/591- Real-Time DSP1 What is image processing? x(t 1,t 2 ) : ANALOG SIGNAL x : real value (t 1,t 2 ) : pair of real continuous space (time) variables.
CS443: Digital Imaging and Multimedia Point Operations on Digital Images Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring.
Digital Image Processing
1 Comp300a: Introduction to Computer Vision L. QUAN.
Image Enhancement.
Digital Image Processing
Spectral contrast enhancement
Lecture 4 Digital Image Enhancement
IDL GUI for Digital Halftoning Final Project for SIMG-726 Computing For Imaging Science Changmeng Liu
IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
M. Wu: ENEE631 Digital Image Processing (Spring'09) Point Operations Spring ’09 Instructor: Min Wu Electrical and Computer Engineering Department, University.
CS654: Digital Image Analysis Lecture 17: Image Enhancement.
ELE 488 Fall 2006 Image Processing and Transmission Syllabus 1. Human Visual System 2. Image Representations (gray level, color) 3. Simple Processing:
Digital Image Processing Contrast Enhancement: Part I
CS6825: Point Processing Contents – not complete What is point processing? What is point processing? Altering/TRANSFORMING the image at a pixel only.
DIGITAL IMAGE PROCESSING
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
1 Chapter 2: Color Basics. 2 What is light?  EM wave, radiation  Visible light has a spectrum wavelength from 400 – 780 nm.  Light can be composed.
Intensity Transformations or Translation in Spatial Domain.
CS654: Digital Image Analysis Lecture 18: Image Enhancement in Spatial Domain (Histogram)
Digital image processing Chapter 3. Image sampling and quantization IMAGE SAMPLING AND IMAGE QUANTIZATION 1. Introduction 2. Sampling in the two-dimensional.
Digital Image Processing Lecture 3: Image Display & Enhancement March 2, 2005 Prof. Charlene Tsai.
ENEE631 Digital Image Processing (Spring'04) Image Restoration Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park  
Intensity Transformations (Histogram Processing)
ENEE631 Digital Image Processing (Spring'04) Signal Processing: From 1-D to 2-D (m-D) Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland,
02/05/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Mach Banding –Humans exaggerate sharp boundaries, but not fuzzy ones.
ENEE631 Digital Image Processing (Spring'04) Basics on 2-D Random Signal Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park.
Advanced Computer Graphics CSE 190 [Winter 2016], Lecture 2 Ravi Ramamoorthi
3-1 Chapter 3: Image Display The goodness of display of an image depends on (a) Image quality: i) Spatial resolution, ii) Quantization (b) Display device:
Digital Image Processing CSC331 Image Enhancement 1.
CH2. Point Processes Arithmetic Operation Histogram Equalization
Lecture Reading  3.1 Background  3.2 Some Basic Gray Level Transformations Some Basic Gray Level Transformations  Image Negatives  Log.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
Digital Image Processing, 2nd ed. © 2002 R. C. Gonzalez & R. E. Woods Chapter 3 Image Enhancement in the Spatial Domain Chapter.
ENEE631 Digital Image Processing (Spring'04) Fourier Transform and Spatial Filtering Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College.
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Digital Image Processing
Image Enhancement.
Digital Image Processing
Signal Processing: From 1-D to 2-D (m-D)
Image Processing – Contrast Enhancement
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Digital Image Processing Lecture 3: Image Display & Enhancement
Presentation transcript:

ENEE631 Digital Image Processing (Spring'04) Point Operations Spring ’04 Instructor: Min Wu ECE Department, Univ. of Maryland, College Park   (select ENEE631 S’04)   Based on ENEE631 Spring’04 Section 3

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [2] Overview Last Time –Human visual properties for monochrome vision –Color vision Today –Point processing (zero-memory operations) UMCP ENEE631 Slides (created by M.Wu © 2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [3] Image Enhancement via Point Operations UMCP ENEE631 Slides (created by M.Wu © 2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [4] Point Operations / Intensity Transform Basic idea –“Zero memory” operation u each output only depend on the input intensity at the point –Map a given gray or color level u to a new level v, i.e. v = f ( u ) –Doesn’t bring in new info. –But can improve visual appearance or make features easier to detect Example-1: Color coordinate transformations – RGB of each pixel  luminance + chrominance components  etc. Example-2: Scalar quantization – quantize pixel luminance/color with fewer bits input gray level u output gray level v UMCP ENEE631 Slides (created by M.Wu © 2001/2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [5] UMCP ENEE631 Slides (created by M.Wu © 2004) Typical Types of Gray-level Transformation Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [6] Example: Negative Transformation UMCP ENEE631 Slides (created by M.Wu © 2004) Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [7] Example: Log Transformation UMCP ENEE631 Slides (created by M.Wu © 2004) Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [8] Example: Effects of Different Gammas ( “vectors” sample image from Matlab ) L L 0 1/2.2 L0L0 UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [9] Gamma Characteristics & Gamma Correction Non-linearity in CRT display –Voltage U vs. Displayed luminance L’ u L’ ~ U  where  = 2.0 ~ 2.5 Use preprocessing to compensate  -distortion –U ~ L 1/  –log(L) gives similar compensation curve to  - correction u good for many practical applications –Camera may have L 1/  c capturing distortion with  c = Power-law transformations are also useful for general purpose contrast manipulation U L’ L’ = a U  L U ~ logL ~ L 1/  UMCP ENEE631 Slides (created by M.Wu © 2001/2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [10] UMCP ENEE631 Slides (created by M.Wu © 2004) Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [11] Luminance Histogram Represents the relative frequency of occurrence of the various gray levels in the image –For each gray level, count the # of pixels having that level –Can group nearby levels to form a big bin & count #pixels in it ( From Matlab Image Toolbox Guide Fig.10-4 ) UMCP ENEE631 Slides (created by M.Wu © 2001/2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [12] Luminance Histogram (cont’d) Interpretation –Treat pixel values as i.i.d random variables –Histogram is an estimate of the probability distribution of the r.v. “Unbalanced” histogram doesn’t fully utilize the dynamic range –Low contrast image ~ histogram concentrating in a narrow luminance range –Under-exposed image ~ histogram concentrating on the dark side –Over-exposed image ~ histogram concentrating on the bright side Balanced histogram gives more pleasant look and reveals rich content UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [13] UMCP ENEE631 Slides (created by M.Wu © 2004) Example: Balanced and Unbalanced Histograms Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [14] Image with Unbalanced Histogram ( From Matlab Image Toolbox Guide Fig & ) UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [15] Contrast Stretching for Low-Contrast Images Stretch the over-concentrated graylevels in histogram via a nonlinear mapping –Piece-wise linear stretching function –Assign slopes of the stretching region to be greater than 1 input gray level u output gray level v a b o    UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [16] Contrast Stretching: Example original stretched UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [17] Clipping & Thresholding Clipping –Special case of contrast stretching with  =  = 0 –Useful for noise reduction when interested signal mostly lie in range [a,b] Thresholding –Special case of clipping with a = b = T –Useful for binarization of scanned binary images u documents, signatures, fingerprints input gray level u output gray level v a b o  input gray level u output gray level v T o UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [18] Examples of Histogram Equalization ( From Matlab Image Toolbox Guide Fig & ) UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [19] Equalization Example (cont’d) original equalized UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [20] Histogram Equalization Goal: Map the luminance of each pixel to a new value such that the output image has approximately uniform distribution of gray levels To find what mapping to use: first model pixels as i.i.d. r.v. –How to generate r.v. with desired distribution?  Match c.d.f Want to transform one r.v. with certain p.d.f. to a new r.v. with uniform p.d.f. –For r.v. U with continuous p.d.f. over [0,1], construct a new r.v. V by a monotonically increasing mapping v(u) such that –Can show V is uniformly distributed over [0,1]  F V (v) = v u F V (v) = P(V  v) = P( F U (u)  v) = P( U  F -1 U (v) ) = F U ( F -1 U (v) ) = v –For u in discrete prob. distribution, the output v will be approximately uniform UMCP ENEE631 Slides (created by M.Wu © 2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [21] Histogram Equalization Goal: Map the luminance of each pixel to a new value such that the output image has approximately uniform distribution of gray levels To find what mapping to use: first model pixels as i.i.d. r.v. –How to generate r.v. with desired distribution?  Match c.d.f Want to transform one r.v. with certain p.d.f. to a new r.v. with uniform p.d.f. –For r.v. U with continuous p.d.f. over [0,1], construct a new r.v. V by a monotonically increasing mapping v(u) such that –Can show V is uniformly distributed over [0,1]  F V (v) = v u F V (v) = P(V  v) = P( F U (u)  v) = P( U  F -1 U (v) ) = F U ( F -1 U (v) ) = v –For u in discrete prob. distribution, the output v will be approximately uniform UMCP ENEE631 Slides (created by M.Wu © 2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [22] How to Do Histogram Equalization? Approach: map input luminance u to the corresponding v –v will be approximately uniform for u with discrete prob. distribution u b/c all pixels in one bin are mapped to a new bin (no splitting) gray level u c.d.f P(U<=u) u0 o F u0   gray level v c.d.f P(V<=v) v0 o F u0   UMCP ENEE408G Slides (created by M.Wu © 2002)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [23] Histogram Equalization Algorithm v  [0,1] Map discrete v  [0,1] to v’  {0,…,L-1} v min is the smallest positive value of v v min  0 1  L-1 Uniform quantization uvv’ p U (x i ) UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [24] Histogram Equalization: A Mini-Example –xi (L=8) –p(xi) –v –v’ 0 [1.5] [4.7] [5.8] [6.6] (L-1)/(1-v min ) = UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [25] Summary: Contrast Stretching vs. Histogram Eq. What are in common? What are different? input gray level u output gray level v a b o    gray level u c.d.f P(U<=u) u0 o F u0   gray level v c.d.f P(V<=v) v0 o F u0  

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [26] Generalization of Histogram Equalization Histogram specification –Want output v with specified p.d.f. p V (v) –Use uniformly distributed r.v. W as an intermediate step u W = F U (u) = F V (v)  V = F -1 V (F U (u) ) –Approximation in the intermediate step needed for discrete r.v. u W1 = F U (u), W2 = F V (v)  take v s.t. its w2 is equal to or just above w1 UMCP ENEE631 Slides (created by M.Wu © 2001/2004) Figure is from slides at Gonzalez/ Woods DIP book website (Chapter 3)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [27] Generalization of Histogram Equalization Histogram modification –u  v = f(u)  v’ = unif.-quantized v –f(u) = u 1/2 or f(u) = u 1/3 –f(u) = log(1+|u|) ~ range compression (good for spectrum visualization) Histogram specification –Want output v with specified p.d.f. p V (v) –Use uniformly distributed r.v. W as an intermediate step u W = F U (u) = F V (v)  V = F -1 V (F U (u) ) –Approximation in the intermediate step needed for discrete r.v. u W1 = F U (u), W2 = F V (v)  take v s.t. its w2 is equal to or just above w1 Uniform quant. uv v’ f(u) UMCP ENEE631 Slides (created by M.Wu © 2001)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [28] Visual Quantization Contouring effect –Visible contours on smoothly changing regions for uniform quantized luminance values with less than 5-6 bits/pixel u human eyes are sensitive to contours How to reduce contour effect at lower bits/pixel? –Use “dithering” to break contours by adding noise before quantization 8 bits / pixel 4 bits / pixel 2 bits / pixel UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [29] Use Dithering to Remove Contour Artifacts original quantized (step=16) noise pattern original + noise quantized version of (original + noise) artificial contour UMCP ENEE408G Slides (created by M.Wu © 2003)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [30] Dithering for Halftone Images Halftone images –Extreme case of low bits/pixel: use two colors (b/w) to represent gray shades Extend the idea of pseudorandom noise quantizer –Upsample each pixel to form a resolution cell of many dots –Form dither signal by tiling halftone screen to be same size as the image –Apply quantizer on the sum of dither signal and image signal Perceived gray level –Equal to the percentage of black dots perceived in one resolution cell r(m,n)  [0,A] Pseudorandom halftone screen Luminance u(m,n)  [0,A] Bi-level display v(m,n)v’(m,n) Threshold A 0 1 UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [31] Examples of Halftone Images Trade spatial resolution with pixel depth –Let eyes serve as a low-pass-filter –The average intensity of a cell matches the intensity of original pixel (or neighborhood) –May also apply error diffusion Applications –Photo printing in newspaper and books –Image display in the old black/white monitor –Often use a periodic “dither screen” as noise pattern UMCP ENEE408G Slides (created by M.Wu & R.Liu © 2002)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [32] Summary of Today’s Lecture Point operations (mostly with zero-memory) –Gamma correction –Contrast stretching –Histogram equalization –Dithering / Halftoning Next time –2-D Systems and Transforms UMCP ENEE631 Slides (created by M.Wu © 2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [33] Readings and Assignment Readings –Jain’s book 7.1—7.3, 4.12 (or) Gonzalez’s book 3.1—3.3 Computer Assignment –On color and pixel based operations –Also “play” with image editor software (Paintshop Pro) –Will be posted on course webpage and announced by Question for Today: –Finish the proof in histogram equalization UMCP ENEE631 Slides (created by M.Wu © 2001,2004)

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [34]

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [35] 4 bits / pixel Example 3 bits / pixel

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [36] Tool-1: Contrast Quantization Visual sensitivity – non-uniform for luminance – almost uniform to just noticeable difference in contrast u  L / L ~ 0.02 – need 50 levels of contrast u ~ 6 bits with uniform quantizer u ~ 4-5 bits with MMSE quantizer Quantize contrast instead of luminance f(.) lum.-to- contrast g(.) contrast- to lum. Quantizer u c c’u’

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [37] Tool-2: Pseudorandom Noise Quantization Break contours (boundaries of const. gray area) –Add uniform zero-mean pseudo random noise before quantization u keep average values unchanged –Can achieve reasonable quality with 3-bit quantizer random noise U[-A, A] Quantizer u(m,n) u’(m,n) (display) v(m,n) v’(m,n) _ r(m,n) “dither”

ENEE631 Digital Image Processing (Spring'04) Lec3 – Point Operations [38] More on Pseudorandom Noise Quantization How about 1-bit quantizer? –Can we obtain a grayscale look with only black and white? Change density of black dots – – spatial averaging function in human eyes gives a feel of grayscale by paying more attention on the average # of black dots per unit area