Lectures 6&7: Image Enhancement



Similar documents
Bildverarbeitung und Mustererkennung Image Processing and Pattern Recognition

Sharpening through spatial filtering

Linear Filtering Part II

Lecture 14. Point Spread Function (PSF)

Imageprocessing. Errors of measurements

Admin stuff. 4 Image Pyramids. Spatial Domain. Projects. Fourier domain 2/26/2008. Fourier as a change of basis

(Refer Slide Time: 06:10)

Digital Image Processing

Digital image processing

Intensity transformations

DIGITAL IMAGE PROCESSING AND ANALYSIS

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Digital Imaging and Multimedia. Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

MATLAB-based Applications for Image Processing and Image Quality Assessment Part I: Software Description

Basic Image Processing (using ImageJ)

Time series analysis Matlab tutorial. Joachim Gross

Digital Image Fundamentals. Selim Aksoy Department of Computer Engineering Bilkent University

An Experimental Study of the Performance of Histogram Equalization for Image Enhancement

Computer Vision. Image math. Copyright by NHL Hogeschool and Van de Loosdrecht Machine Vision BV All rights reserved

Convolution. 1D Formula: 2D Formula: Example on the web:

Resolution Enhancement of images with Interpolation and DWT-SWT Wavelet Domain Components

Enhancement of scanned documents in Besov spaces using wavelet domain representations

Computational Foundations of Cognitive Science

Basics of Image and data analysis in 3D

Edge detection. (Trucco, Chapt 4 AND Jain et al., Chapt 5) -Edges are significant local changes of intensity in an image.

Reading.. IMAGE COMPRESSION- I IMAGE COMPRESSION. Image compression. Data Redundancy. Lossy vs Lossless Compression. Chapter 8.

jorge s. marques image processing

Analog and Digital Filters Anthony Garvert November 13, 2015

Personal Identity Verification (PIV) IMAGE QUALITY SPECIFICATIONS FOR SINGLE FINGER CAPTURE DEVICES

Forensic Image Processing.

A System for Capturing High Resolution Images

Sachin Patel HOD I.T Department PCST, Indore, India. Parth Bhatt I.T Department, PCST, Indore, India. Ankit Shah CSE Department, KITE, Jaipur, India

Blind Deconvolution of Barcodes via Dictionary Analysis and Wiener Filter of Barcode Subsections

Aliasing, Image Sampling and Reconstruction

MODULATION TRANSFER FUNCTION MEASUREMENT METHOD AND RESULTS FOR THE ORBVIEW-3 HIGH RESOLUTION IMAGING SATELLITE

Noise Reduction in Video Images Using Coring on QMF Pyramids by. Arthur J. Kalb

T = 1 f. Phase. Measure of relative position in time within a single period of a signal For a periodic signal f(t), phase is fractional part t p

chapter Introduction to Digital Signal Processing and Digital Filtering 1.1 Introduction 1.2 Historical Perspective

Computational Optical Imaging - Optique Numerique. -- Deconvolution --

CHAPTER 6 Frequency Response, Bode Plots, and Resonance

Image-Based Transfer Function Design for Data Exploration in Volume Visualization

Lecture 12: Cameras and Geometry. CAP 5415 Fall 2010

LIST OF CONTENTS CHAPTER CONTENT PAGE DECLARATION DEDICATION ACKNOWLEDGEMENTS ABSTRACT ABSTRAK

Euler Vector: A Combinatorial Signature for Gray-Tone Images

Project 3: Image Enhancement - Spatial vs. Frequency Domain Filters. Steven Young: ECE 572

REAL TIME TRAFFIC LIGHT CONTROL USING IMAGE PROCESSING

Introduction to Digital Resolution

How To Filter Spam Image From A Picture By Color Or Color

STATS8: Introduction to Biostatistics. Data Exploration. Babak Shahbaba Department of Statistics, UCI

Image Normalization for Illumination Compensation in Facial Images

Correlation and Convolution Class Notes for CMSC 426, Fall 2005 David Jacobs

L9: Cepstral analysis

Lecture 9. Poles, Zeros & Filters (Lathi 4.10) Effects of Poles & Zeros on Frequency Response (1) Effects of Poles & Zeros on Frequency Response (3)

Laboratory #5: RF Filter Design

Introduction to Robotics Analysis, Systems, Applications

Analog Filters. A common instrumentation filter application is the attenuation of high frequencies to avoid frequency aliasing in the sampled data.

Low Contrast Image Enhancement Based On Undecimated Wavelet Transform with SSR

Determining optimal window size for texture feature extraction methods

Analog Signal Conditioning

Armstrong Atlantic State University Engineering Studies MATLAB Marina Image Processing Primer

High Quality Image Magnification using Cross-Scale Self-Similarity

MATLAB-based Applications for Image Processing and Image Quality Assessment Part II: Experimental Results

Signature Region of Interest using Auto cropping

GETTING STARTED WITH LABVIEW POINT-BY-POINT VIS

Some elements of photo. interpretation

Probability and Random Variables. Generation of random variables (r.v.)

Chapter 4 Image Enhancement in the Frequency Domain. Chapter 4 Image Enhancement in the Frequency Domain

Image Gradients. Given a discrete image Á Òµ, consider the smoothed continuous image ܵ defined by

Object Recognition and Template Matching

Defect detection of gold-plated surfaces on PCBs using Entropy measures

A BRIEF STUDY OF VARIOUS NOISE MODEL AND FILTERING TECHNIQUES

Optical Design for Automatic Identification

Comparative Analysis of various Illumination Normalization Techniques for Face Recognition

Linear and Non-linear Contrast Enhancement Image

Numerical Methods For Image Restoration

Em bedded DSP : I ntroduction to Digital Filters

Sampling Theorem Notes. Recall: That a time sampled signal is like taking a snap shot or picture of signal periodically.

Transformations and Expectations of random variables

Basics of Quantitative Image Analysis

A Digital Audio Watermark Embedding Algorithm

Introduction to Medical Image Compression Using Wavelet Transform

Jitter Measurements in Serial Data Signals

Tutorial. Filtering Images F I L T E R I N G. Filtering Images. with. TNTmips. page 1

Applications to Data Smoothing and Image Processing I

CHAPTER 3: DIGITAL IMAGING IN DIAGNOSTIC RADIOLOGY. 3.1 Basic Concepts of Digital Imaging

Region of Interest Access with Three-Dimensional SBHP Algorithm CIPR Technical Report TR

Simultaneous Gamma Correction and Registration in the Frequency Domain

Today. next two weeks

1) Write the following as an algebraic expression using x as the variable: Triple a number subtracted from the number

Chapter 2. Point transformation. Look up Table (LUT) Fundamentals of Image processing

Face detection is a process of localizing and extracting the face region from the

Image Authentication Scheme using Digital Signature and Digital Watermarking

Noise estimation in remote sensing imagery using data masking

Analog signals are those which are naturally occurring. Any analog signal can be converted to a digital signal.

CHAPTER 7 CONCLUSION AND FUTURE WORK

WE ARE in a time of explosive growth

Author: Dr. Society of Electrophysio. Reference: Electrodes. should include: electrode shape size use. direction.

Transition Bandwidth Analysis of Infinite Impulse Response Filters

Image Filtering & Edge Detection

Transcription:

Lectures 6&7: Image Enhancement Leena Ikonen Pattern Recognition (MVPR) Lappeenranta University of Technology (LUT) leena.ikonen@lut.fi http://www.it.lut.fi/ip/research/mvpr/ 1

Content Background Spatial domain methods Frequency domain methods Enhancement by point processing Spatial filtering Enhancement in the frequency domain 2

Background: Motivation For preprocessing to make the image look better, i.e., more suitable for further processing. Problems with contrast sharpness smoothness noise distortions etc 3

Background: Spatial domain methods Method: Slide the mask though the image and compute new pixel values Image processing function: g(x,y) = T[f(x,y)] f(x,y) the input image g(x,y) T the processed image an operator on f, defined over some neighborhood of (x,y) Gray-level transformation (mapping) function: s = T(r) r denotes f(x,y) and s denotes g(x,y) 4

Background: Frequency domain methods Method: Multiply the Fourier transforms of the image and the mask, and apply the inverse transform to the multiplication Convolution: g(x,y) = h(x,y)*f(x,y) h(x,y) Fourier transform: G(u,v) = H(u,v)F(u,v) a linear, postion invariant operator H(u,v) the transfer function of the process Inverse Fourier transform: g(x,y) = F -1 [H(u,v)F(u,v)] 5

Enhancement by point processing: Some simple intensity transformations Image negatives: s = ((L-1) r) where L = number of gray-levels Contrast stretching: Poor illumination, lack of dynamic range in the imaging sensor, wrong setting of a lens aperture during image acquisition To increase the dynamic range of the gray-levels Piecewise linear function Thresholding function => binary image (two values only) 6

Contrast stretching 7

Enhancement by point processing: Some simple intensity transformations (cont.) Compression of dynamic range: The dynamic range exceeds the capability of the display device. The need of brighter pixels s = c log(1 + abs(r)) where c is a scaling constant Gray-level slicing: Highlighting a specific range of gray-levels with removing or preserving other pixels 8

Gray-level slicing Original image (top) Thresholded (left) Gray-level slicing (right) 9

Enhancement by point processing: Some simple intensity transformations (cont.) Bit-plane slicing: Select the specific bit planes For example: the image of eight 1-bit planes Plane 7 contains all the high-order bits: Higher planes contain visually significant data. Note: digital watermarking! To select the plane 7 only corresponds to the image thresholded at gray-level 128 10

Enhancement by point processing: Histogram processing Histogram of the image: p(r k ) = n k /n where r k is the kth gray-level n k is the number of pixels with that gray-level n is the total number of pixels in the image k = 0, 1, 2,, L-1 L is the number of gray-levels 11

Histogram of an image 12

Histogram equalization 13

Enhancement by point processing: Histogram processing (cont.) Histogram equalization (or histogram linearization) to obtain the uniform histogram Gray-level transformation function and its inverse function r represents gray-level values normalized to interval [0,1] (r=0=black, r=1=white) s = T(r) is the new equalized gray-value for gray-value r where 0<=T(r)<=1 and T(r) is single-valued and monotonically increasing in 0<=r<=1 r = T -1 (s) where 0<=s<=1 14

Enhancement by point processing: Histogram processing (cont.) 15

Enhancement by point processing: Histogram processing (cont.) 16

Enhancement by point processing: Histogram processing (cont.) Example: p r (r) = -2r + 2 when 0<=r<=1 0 elsewhere What transformation function creates uniform density? r s T ( r) ( 2w 2) dw r 2 2r 0 r T 1( s) 1 1 s,0 r 1 r 1 1 s 17

Enhancement by point processing: Histogram processing (cont.) In discrete form, probabilities: p r (r k ) = n k /n where 0 r k 1, k = 0, 1,, L-1 n is the total number of pixels in the image n k is the number of pixels with gray-value r k L is the total number of possible gray-levels in the image Transformation function: s k = T(r k ) = p r (r j ) = n j /n for j=0,...,k where 0 r k 1 and k=0,1,,l-1 Note that probability p r (r j ) is simply the fraction of pixels with grayvalue r j out of the total number of pixels The new gray-value is the gray-level closest to the sum of probabilities up to the original value k: round((l-1) s k ) 18

Enhancement by point processing: Histogram processing (cont.) Histogram specification: To apply another transformation function than an approximation to a uniform histogram Local enhancement: Local processing instead of the whole image For example, histogram equalization of a 7x7 neighborhood around each pixel 19

Enhancement by point processing: Image subtraction The difference between two images f(x,y) and h(x,y): g(x,y) = f(x,y) h(x,y) The use of a mask image (pixelwise subtraction) Applications in medical image processing: The mask is a normal image which is subtracted from a sample image to point out regions of interest, e.g. object that has moved between frames/images (see next slide) Remember also the regular image subtracted from the original to detect irregularities (e.g. missing dots) 20

Image subtraction 21

Enhancement by point processing: Image averaging Consider a noisy image g(x,y) formed by the addition of noise η(x,y) to an original image image f(x,y): g(x,y) = f(x,y) + η(x,y) By averaging noisy images, noise is reduced Noise must be uncorrelated and must have zero average value! Do NOT use averaging for salt and pepper noise! Example: noisy microscope images 22

Spatial filtering: Background Spatial filtering: the use of spatial filters Spatial filters: Lowpass filters Highpass filters Bandpass filters The mask: w1 w2 w3 w4 w5 w6 w7 w8 w9 Smoothing filters, sharpening filters 23

Spatial filtering: Smoothing filters For blurring and noise reduction Lowpass spatial filtering: 1 1 1 1/9 x 1 1 1 1 1 1 Neighborhood averaging Median filtering: replace the gray-level of each pixel by the median of the gray-levels in a neighborhood of that pixel Removes noise, but preserves details such as edges Filter size? Weighted median filtering? 24

Spatial filtering: Averaging vs. median Original image (upper left) Original + noise (upper right) Smoothed image (lower right) Median smoothing (lower left) 25

Spatial filtering: Sharpening filters For highlighting fine detail in an image or enhance detail that has been blurred Filters: Basic highpass spatial filter High-boost filtering Derivative filters 26

Spatial filtering: Basic highpass spatial filtering Positive coefficients near the center of a filter, negative coefficients in the outer periphery 3 x 3 sharpening filter: -1-1 -1 1/9 x -1 8-1 -1-1 -1 The sum of the coefficients is zero The filter eliminates the zero frequency term => reduced global contrast of the image Scaling and/or clipping for negative values to map the range [0, L-1] 27

Spatial filtering: High-boost filtering Highpass = Original Lowpass Low frequencies are lost High-boost or high-frequency-emphasis filter: High boost = (A)(Original) Lowpass = (A-1)(Original) + Original Lowpass = (A-1)(Original) + Highpass. Looks like original image, with edge enhancement by A fourier.eng.hmc.edu/e161/lectures/gradient/node2.htm l 28

Spatial filtering: High-boost filtering (cont.) Unsharp masking: to subtract a blurred image from an original image In the printing and publishing industry The mask with w = 9A -1 (with A 1): -1-1 -1 1/9 x -1 w -1-1 -1-1 29

Spatial filtering: Derivative filters For sharpening an image (averaging vs. differentiation) The gradient of f(x,y): df = f/ x f/ y The magnitude is the basis for image differentiation methods: mag(df)= (( f/ x) 2 + ( f/ y) 2 ) (-1/2) 30

Spatial filtering: Derivate filters (cont.) Roberts: 1 0 0 1 0-1 1 0 Prewitt: -1-1 -1-1 0 1 0 0 0-1 0 1 1 1 1-1 0 1 Sobel: -1-2 -1-1 0 1 0 0 0-2 0 2 1 2 1-1 0 1 31

Enhancement in the frequency domain The use of image frequencies for enhancement Convolution: f(x)*g(x) F(u) G(u) The filtered image g(x,y) using the Discrete Fourier transforms of an original image f(x,y) and a mask h(x,y): g(x,y) = F -1 [H(u,v)F(u,v)] Lowpass filtering Highpass filtering 32

Fourier transform: Image power Radius (pixels) % Image power 8 95 16 97 32 98 64 99.4 128 99.8 Distance from point (u,v) to the origin: D(u,v) = (u 2 + v 2 ) (-1/2) 33

Enhancement in the Frequency Domain: Lowpass filter G(u,v) = H(u,v) F(u,v) Ideal lowpass filter: H(u,v) = 1 if D(u,v) D 0, or 0 if D(u,v) > D 0 Original (left) and filtered image (right) 34

Enhancement in the Frequency Domain: Butterworth lowpass filter The transfer function: H(u,v) = 1/(1 + (D(u,v)/D 0 ) 2n ) where n is the order of the filter D 0 is the cutoff frequency locus (select!) H(u,v) from 1 to 0. When D(u,v) = D 0, H(u,v) = 0.5. H(u,v) = 1/ 2 commonly used. 35

Enhancement in the Frequency Domain: Highpass filter Ideal high pass filter: H(u,v) = 0 if D(u,v) D 0, or 1 if D(u,v) > D 0 Original (left) and filtered image (right). 36

Enhancement in the Frequency Domain: Butterworth highpass filter The transfer function: H(u,v) = 1/(1 + (D 0 /D(u,v)) 2n ) where n is the order of the filter D 0 is the cutoff frequency locus H(u,v) from 0 to 1. When D(u,v) = D 0, H(u,v) = 0.5. H(u,v) = 1/ 2 commonly used. 37

Summary For preprocessing to make the image look better, i.e., more suitable for further processing Approaches: Spatial domain methods Frequency domain methods Enhancement by point processing Spatial filtering Enhancement in the frequency domain 38