Image Enhancement in the Spatial Domain. Spatial Domain

Similar documents
Lecture # 04. Image Enhancement in Spatial Domain

Topic -3 Image Enhancement

Statistics of Images. Ioannis Rekleitis

where f(x, y): input image, g(x, y): processed image, and T: operator Or: s = T(r), where r: input pixel, and s: output pixel

Survey of Various Image Enhancement Techniques in Spatial Domain Using MATLAB

Optical Flow for Large Motion Using Gradient Technique

Journal of World s Electrical Engineering and Technology J. World. Elect. Eng. Tech. 1(1): 12-16, 2012

SURVEY OF VARIOUS IMAGE ENHANCEMENT TECHNIQUES IN SPATIAL DOMAIN USING MATLAB

A Memory Efficient Array Architecture for Real-Time Motion Estimation

Illumination methods for optical wear detection

A Novel Automatic White Balance Method For Digital Still Cameras

Topological Characteristic of Wireless Network

Gravitational Shift for Beginners

MapReduce Optimizations and Algorithms 2015 Professor Sasu Tarkoma

A Two-stage and Parameter-free Binarization Method for Degraded Document Images

Chapter 3: Intensity Transformations and Spatial Filtering

Extract Object Boundaries in Noisy Images using Level Set. Final Report

Tissue Classification Based on 3D Local Intensity Structures for Volume Rendering

AUTOMATED LOCATION OF ICE REGIONS IN RADARSAT SAR IMAGERY

Color Correction Using 3D Multiview Geometry

IP Network Design by Modified Branch Exchange Method

A modal estimation based multitype sensor placement method

An Unsupervised Segmentation Framework For Texture Image Queries

Topic 7 Random Variables and Distribution Functions

Segmentation of Casting Defects in X-Ray Images Based on Fractal Dimension

Detection and Recognition of Alert Traffic Signs

4.2. Co-terminal and Related Angles. Investigate

A New Finite Word-length Optimization Method Design for LDPC Decoder

Any modern computer system will incorporate (at least) two levels of storage:

Controlled Information Maximization for SOM Knowledge Induced Learning

Concomitants of Upper Record Statistics for Bivariate Pseudo Weibull Distribution

COLOR EDGE DETECTION IN RGB USING JOINTLY EUCLIDEAN DISTANCE AND VECTOR ANGLE

Detection and tracking of ships using a stereo vision system

Slotted Random Access Protocol with Dynamic Transmission Probability Control in CDMA System

Prof. Feng Liu. Fall /17/2016

Fifth Wheel Modelling and Testing

Image Enhancement in Spatial Domain (Chapter 3)

(a, b) x y r. For this problem, is a point in the - coordinate plane and is a positive number.

Satellite Image Analysis

10/29/2010. Rendering techniques. Global Illumination. Local Illumination methods. Today : Global Illumination Modules and Methods

Title. Author(s)NOMURA, K.; MOROOKA, S. Issue Date Doc URL. Type. Note. File Information

Introduction to Medical Imaging. Cone-Beam CT. Introduction. Available cone-beam reconstruction methods: Our discussion:

Module 6 STILL IMAGE COMPRESSION STANDARDS

ANALYTIC PERFORMANCE MODELS FOR SINGLE CLASS AND MULTIPLE CLASS MULTITHREADED SOFTWARE SERVERS

A Minutiae-based Fingerprint Matching Algorithm Using Phase Correlation

Improvement of First-order Takagi-Sugeno Models Using Local Uniform B-splines 1

dc - Linux Command Dc may be invoked with the following command-line options: -V --version Print out the version of dc

Monte Carlo Techniques for Rendering

Shape Matching / Object Recognition

MULTI-TEMPORAL AND MULTI-SENSOR IMAGE MATCHING BASED ON LOCAL FREQUENCY INFORMATION

WIRELESS sensor networks (WSNs), which are capable

HISTOGRAMS are an important statistic reflecting the

Query Language #1/3: Relational Algebra Pure, Procedural, and Set-oriented

Positioning of a robot based on binocular vision for hand / foot fusion Long Han

EEM 463 Introduction to Image Processing. Week 3: Intensity Transformations

A Shape-preserving Affine Takagi-Sugeno Model Based on a Piecewise Constant Nonuniform Fuzzification Transform

Color Interpolation for Single CCD Color Camera

= dv 3V (r + a 1) 3 r 3 f(r) = 1. = ( (r + r 2

ME 210 Applied Mathematics for Mechanical Engineers

CS 450: COMPUTER GRAPHICS RASTERIZING CONICS SPRING 2016 DR. MICHAEL J. REALE

DISTRIBUTION MIXTURES

Obstacle Avoidance of Autonomous Mobile Robot using Stereo Vision Sensor

Keith Dalbey, PhD. Sandia National Labs, Dept 1441 Optimization & Uncertainty Quantification

Massachusetts Institute of Technology Department of Mechanical Engineering

Monte Carlo Simulation for the ECAT HRRT using GATE

Modelling, simulation, and performance analysis of a CAN FD system with SAE benchmark based message set

Improved Fourier-transform profilometry

Separability and Topology Control of Quasi Unit Disk Graphs

Adaptation of TDMA Parameters Based on Network Conditions

Performance Optimization in Structured Wireless Sensor Networks

INFORMATION DISSEMINATION DELAY IN VEHICLE-TO-VEHICLE COMMUNICATION NETWORKS IN A TRAFFIC STREAM

UCLA Papers. Title. Permalink. Authors. Publication Date. Localized Edge Detection in Sensor Fields.

Cardiac C-Arm CT. SNR Enhancement by Combining Multiple Retrospectively Motion Corrected FDK-Like Reconstructions

Digital Image Processing

ADDING REALISM TO SOURCE CHARACTERIZATION USING A GENETIC ALGORITHM

Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. The principal objective of enhancement

Image Enhancement: To improve the quality of images

Transmission Lines Modeling Based on Vector Fitting Algorithm and RLC Active/Passive Filter Design

A Neural Network Model for Storing and Retrieving 2D Images of Rotated 3D Object Using Principal Components

RANDOM IRREGULAR BLOCK-HIERARCHICAL NETWORKS: ALGORITHMS FOR COMPUTATION OF MAIN PROPERTIES

DEVELOPMENT OF A PROCEDURE FOR VERTICAL STRUCTURE ANALYSIS AND 3D-SINGLE TREE EXTRACTION WITHIN FORESTS BASED ON LIDAR POINT CLOUD

17/5/2009. Introduction

POMDP: Introduction to Partially Observable Markov Decision Processes Hossein Kamalzadeh, Michael Hahsler

EQUATIONS can at times be tedious to understand

Complete Solution to Potential and E-Field of a sphere of radius R and a charge density ρ[r] = CC r 2 and r n

On Error Estimation in Runge-Kutta Methods

Conservation Law of Centrifugal Force and Mechanism of Energy Transfer Caused in Turbomachinery

Investigation of turbulence measurements with a continuous wave, conically scanning LiDAR. Risø-R-Report

CSE 165: 3D User Interaction

Lifetime and Energy Hole Evolution Analysis in Data-Gathering Wireless Sensor Networks

EE 168 Handout #32 Introduction to Digital Image Processing March 7, 2012 HOMEWORK 7 SOLUTIONS

5 4 THE BERNOULLI EQUATION

Drag Optimization on Rear Box of a Simplified Car Model by Robust Parameter Design

Conversion Functions for Symmetric Key Ciphers

AN ANALYSIS OF COORDINATED AND NON-COORDINATED MEDIUM ACCESS CONTROL PROTOCOLS UNDER CHANNEL NOISE

All lengths in meters. E = = 7800 kg/m 3

Tufts University Math 13 Department of Mathematics November 14, :00 noon to 1:20 pm

Lecture 8 Introduction to Pipelines Adapated from slides by David Patterson

And Ph.D. Candidate of Computer Science, University of Putra Malaysia 2 Faculty of Computer Science and Information Technology,

On using circuit-switched networks for file transfers

Transcription:

8-- Spatial Domain Image Enhancement in the Spatial Domain What is spatial domain The space whee all pixels fom an image In spatial domain we can epesent an image by f( whee x and y ae coodinates along x and y axis with espect to an oigin Thee is duality between Spatial and Fequency Domains Images in the spatial domain ae pictues in the xy plane whee the wod distance is meaningful. Using the Fouie tansfom, the wod distance is lost but the wod fequency becomes alive. Image Enhancement Image Enhancement means impovement of images to be suitable fo specific applications. Example: Image Enhancement Example Note: each image enhancement technique that is suitable fo one application may not be suitable fo othe applications. Oiginal image Enhanced image using Gamma coection Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Image Enhancement in the Spatial Domain = Image enhancement using pocesses pefomed in the Spatial domain esulting in images in the Spatial domain. We can witten as g( T f ( whee f( is an oiginal image, g( is an output and T[ ] is a function defined in the aea aound ( Note: T[ ] may have one input as a pixel value at ( only o multiple inputs as pixels in neighbos of ( depending in each function. Ex. Contast enhancement uses a pixel value at ( only fo an input while smoothing filte use seveal pixels aound ( as inputs. Types of Image Enhancement in the Spatial Domain - Single pixel methods - Gay level tansfomations Example - Histogam equalization - Contast stetching - Aithmetic/logic opeations Examples - Image subtaction - Image aveaging - Multiple pixel methods Examples Spatial filteing - Smoothing filtes - Shapening filtes

Output intensity 8-- Gay Level Tansfomation Tansfoms intensity of an oiginal image into intensity of an output image using a function: s T() whee = input intensity and s = output intensity Image Negative L- White s L Oiginal digital mammogam Example: Contast enhancement Black L- Black Input intensity White Negative digital mammogam Wood, Digital Image Pocessing, nd Edition. L = the numbe of gay levels Wood, Digital Image Pocessing, nd Edition. Log Tansfomations s clog( ) Fouie spectum Application Powe-Law Tansfomations s c Log T. of Fouie spectum Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Powe-Law Tansfomations : Gamma Coection Application Powe-Law Tansfomations : Gamma Coection Application Desied image Image displayed at Monito MRI Image afte Gamma Coection Afte Gamma coection Image displayed at Monito Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition.

Bit Bit 8-- Powe-Law Tansfomations : Gamma Coection Application Aiel images afte Gamma Coection Contast Stetching Contast means the diffeence between the bightest and dakest intensities Befoe contast enhancement Afte Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. How to know whee the contast is enhanced? Notice the slope of T() - if Slope > Contast inceases - if Slope < Contast decease - if Slope = no change Gay Level Slicing Ds D Smalle D yields wide Ds = inceasing Contast Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Bit-plane Slicing Bit Bit Histogam Histogam = Gaph of population fequencies 8 No. of Students A B+ B C+ C D+ D F Bit Bit Wood, Digital Image Pocessing, nd Edition. Gades of the couse 8 xxx

จำนวน pixel จำนวน pixel 8-- Histogam of an Image = gaph of no. of pixels vs intensities Histogam of an Image (cont.) h( ) n k Dak image has histogam on the left k low contast image has naow histogam Bight image has histogam on the ight high contast image has wide histogam Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Histogam Pocessing = intensity tansfomation based on histogam infomation to yield desied histogam - Histogam equalization To make histogam distibuted unifomly Monotonically Inceasing Function = Function that is only inceasing o constant s T() Popeties of Histogam pocessing function. Monotonically inceasing function. T( ) fo - Histogam matching To make histogam as the desie Pobability Density Function Histogam is analogous to Pobability Density Function (PDF) which epesent density of population Let s and be Random vaiables with PDF p s (s) and p ( ) espectively and elation between s and is Histogam Equalization Let s T ( ) p( w) dw We get We get s T() d ps ( s) p( ) ds d ps( s) p( ) p( ) ds ds d p ( ) p ( ) p( ) d ( ) p w dw d!

8-- Histogam Equalization Histogam Equalization Example Fomula in the pevious slide is fo a continuous PDF Fo Histogam of Digital Image, we use s T ( ) k k j k n j N k j p ( ) n j = the numbe of pixels with intensity = j N = the numbe of total pixels j Intensity # pixels Total Accumulative Sum of P / =. (+)/ =. (++)/ =. (+++)/ =. (++++)/ =. (+++++)/ =.8 (++++++)/ =. (+++++++)/ =.. Histogam Equalization Example (cont.) Histogam Equalization Intensity () No. of Pixels (n j ) Acc Sum Output value Quantized of P Output (s)..x =...* =...* =...* =...* =..8.8* =...* =...x = Total Wood, Digital Image Pocessing, nd Edition. Histogam Equalization (cont.) Histogam Equalization (cont.) Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition.

8-- Histogam Equalization (cont.) Histogam Equalization (cont.) Oiginal image Afte histogam equalization, the image become a low contast image Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Histogam Matching : Algoithm To tansfom image histogam to be a desied histogam Concept : fom Histogam equalization, we have s T ( ) p( w) dw We want an output image to have PDF p z (z) Apply histogam equalization to p z (z), we get z We get p s (s) = v G( z) pz( u) du We get p v (v) = Since p s (s) = p v (v) = theefoe s and v ae equivalent Theefoe, we can tansfom to z by T( ) s G - ( ) z Histogam Matching : Algoithm (cont.) s = T() v = G(z) z = G - (v) Wood, Digital Image Pocessing, nd Edition. Histogam Matching Example Example Oiginal data Input image histogam Intensity ( s ) Total # pixels Desied Histogam Intensity ( z ) Total # pixels Use define Histogam Matching Example (cont.). Apply Histogam Equalization to both tables (n j ) SP s z (n j ) SP z v...........8.8.... s k = T( k ) v k = G(z k )

8-- Histogam Matching Example (cont.). Get a map s v z We get s s v v z z Actual Output Histogam z # Pixels Histogam Matching Example (cont.) Desied histogam Tansfe function Actual histogam s k = T( k ) z k = G - (v k ) Wood, Digital Image Pocessing, nd Edition. Histogam Matching Example (cont.) Local Enhancement : Local Histogam Equalization Concept: Pefom histogam equalization in a small neighbohood Oignal image Afte Hist Eq. Afte Local Hist Eq. In x neighbohood Oiginal image Afte histogam equalization Afte histogam matching Wood, Digital Image Pocessing, nd Edition. Local Enhancement : Histogam Statistic fo Image Enhancement We can use statistic paametes such as Mean, Vaiance of Local aea fo image enhancement Image of tungsten filament taken using An electon micoscope Local Enhancement Example: Local enhancement fo this task E f ( when ms km xy g( f ( othewise G and k D G sxy k M G In the lowe ight cone, thee is a filament in the backgound which is vey dak and we want this to be bighte. Oiginal image Local Vaiance image Multiplication facto We cannot incease the bightness of the whole image since the white filament will be too bight. Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition.

8-- Local Enhancement Logic Opeations AND Application: Cop aeas of inteest Output image OR Wood, Digital Image Pocessing, nd Edition. Oiginal image Image mask Result Region of Inteest Wood, Digital Image Pocessing, nd Edition. Aithmetic Opeation: Subtaction Application: Eo measuement Aithmetic Opeation: Subtaction (cont.) Application: Mask mode adiogaphy in angiogaphy wok Eo image Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Aithmetic Opeation: Image Aveaging Application : Noise eduction Aithmetic Opeation: Image Aveaging (cont.) Degaded image g( f ( ( Image aveaging g( K Aveaging esults in eduction of Noise vaiance g ( K i i K (noise) g ( ( Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. 8

8-- Basics of Spatial Filteing Basics of Spatial Filteing (cont.) Sometime we need to manipulate values obtained fom neighboing pixels Step. Selected only needed pixels Example: How can we compute an aveage value of pixels in a x egion cente at a pixel z? 8 Image Pixel z 8 Pixel z Basics of Spatial Filteing (cont.) Basics of Spatial Filteing (cont.) Step. Multiply evey pixel by / and then sum up the values Question: How to compute the x aveage values at evey pixels? X Mask o Window o Template y Solution: Imagine that we have a x window that can be placed eveywhee on the image Masking Window Basics of Spatial Filteing (cont.) Basics of Spatial Filteing (cont.) Step : Move the window to the fist location whee we want to compute the aveage value and then select only pixels inside the window. Oiginal image Step : Move the window to the next location and go to Step Sub image p. Step : Compute the aveage value y p( i, j) i j Step : Place the esult at the pixel in the output image Output image The x aveaging method is one example of the mask opeation o Spatial filteing. The mask opeation has the coesponding mask (sometimes called window o template). The mask contains coefficients to be multiplied with pixel values. Example : moving aveaging w(,) w(,) w(,) w(,) w(,) w(,) w(,) w(,) w(,) Mask coefficients The mask of the x moving aveage filte has all coefficients = /

8-- Basics of Spatial Filteing (cont.) Basics of Spatial Filteing (cont.) The mask opeation at each point is pefomed by:. Move the efeence point (cente) of mask to the location to be computed. Compute sum of poducts between mask coefficients and pixels in subimage unde the mask. The efeence point of the mask p(,) p(,) p(,) p(,) p(,) p(,) p(,) p(,) p(,) Subimage y Mask fame N M i j w( i, j) p( i, j) w(,) w(,) w(,) w(,) w(,) w(,) w(,) w(,) w(,) Mask coefficients The spatial filteing on the whole image is given by:. Move the mask ove the image at each location.. Compute sum of poducts between the mask coefficeints and pixels inside subimage unde the mask.. Stoe the esults at the coesponding pixels of the output image.. Move the mask to the next location and go to step until all pixel locations have been used. Examples of Spatial Filteing Masks Examples of the masks - - Sobel opeatos - P to compute x - - - P to compute y x shapening filte - - - - - 8 - - - x moving aveage filte Pupose: Blu o noise eduction Lowpass/Smoothing spatial filteing Sum of the mask coefficients is Visual effect: educed noise but blued edge as well Smoothing linea filtes Aveaging filte Weighted aveage (e.g., Gaussian) Smoothing nonlinea filtes Ode statistics filtes (e.g., median filte) Spatial filtes Pupose Highlight fine detail o enhance detail blued Highpass/Shapening spatial filte Sum of the mask coefficients is Visual effect: enhanced edges on a dak backgound High-boost filteing and unshap masking Deivative filtes st nd 8 Smoothing filtes Smoothing: Image Aveaging Pupose: Blu o noise eduction Smoothing linea filteing (lowpass spatial filte) Neighbohood (weighted) aveaging Can use diffeent size of masks Sum of the mask coefficients is Dawback: Ode-statistic nonlinea filtes / x / Response is detemined by odeing the pixels contained in the image aea coveed by the mask Median filteing The gay level of each pixel is eplaced by the median of its neighbo. Good at denoising (salt-and-peppe noise/impulse noise) Max filte Min filte -- smoothing opeato Low-pass filte, leads to softened edges

8-- Smoothing Linea Filte : Moving Aveage Application : noise eduction and image smoothing Smoothing Linea Filte (cont.) Disadvantage: lose shap details Wood, Digital Image Pocessing, nd Edition. Wood, Digital Image Pocessing, nd Edition. Ode-Statistic Filtes Oiginal image Moving window subimage Statistic paametes Mean, Median, Mode, Min, Ma Etc. Ode-Statistic Filtes- Eg: Median Filte Median filte eplaces the pixel at the cente of the filte with the median value of the pixels falling beneath the mask. Median filte does not blu the image but it ounds the cones. Conside x oiginal image Median filteing using the full neighbohood: We sot the oiginal image values on the full window:, 8,,,,,,, median value =. We eplace the cente pixel(i.e 8) by. Othe pixels ae unchanged Output image Ode-Statistic Filtes: Median Filte Shapening filtes - - - / x - 8 - - - - Pupose Highlight fine detail o enhance detail that has been blued Basic highpass spatial filte Sum of the mask coefficients is Visual effect: enhanced edges on a dak backgound Unshap masking and High-boost filteing Deivatives st deivative nd deivative Wood, Digital Image Pocessing, nd Edition.

8-- image deivative and shapening Shapening Spatial Filtes Thee ae intensity discontinuities nea object edges in an image Wood, Digital Image Pocessing, nd Edition. Laplacian Shapening : How it woks Laplacian Shapening : How it woks (cont.). Intensity pofile p(x) st deivative dp dx nd deivative d p dx... 8 8. Edge -. p(x) d p p( x) dx. -... -. Laplacian shapening esults in lage intensity discontinuity nea the edge. Laplacian Shapening : How it woks (cont.) Laplacian Masks Used fo estimating image Laplacian P P P x y Befoe shapening p(x) Afte shapening d p p( x) dx - - - - - 8 - - - - - - - o -8 - Application: Enhance edge, line, point Disadvantage: Enhance noise The cente of the mask is positive The cente of the mask is negative

8-- Laplacian Shapening Example Laplacian Shapening (cont.) Mask fo P P p P Mask fo P - - - - o - - - - - - - - P P P Wood, Digital Image Pocessing, nd Edition. -8 o - Wood, Digital Image Pocessing, nd Edition. Unshap masking and high-boost filtes Unshap Masking and High-Boost Filteing - - - - Unshap masking To geneate the mask: Subtact a blued vesion of the image fom itself Add the mask to the oiginal - - k+8 - - - - k+ - - g mask ( = f( - f( g( = f( + k*g mask ( Highboost: k> Application: input image is vey dak Equation: kp( P( kp( P( P hb ( The cente of the mask is negative The cente of the mask is positive Unshap Masking and High-Boost Filteing (cont.) Fist Ode Deivative Intensity pofile p(x). Edges st deivative dp dx nd deivative dp dx. 8 8 -... Wood, Digital Image Pocessing, nd Edition.

8-- Fist Ode Patial Deivative: Sobel opeatos - - - P to compute x - - - P to compute y Fist Ode Patial Deivative: Image Gadient Gadient magnitude P P P x y P P x P y A gadient image emphasizes edges Wood, Digital Image Pocessing, nd Edition. Fist Ode Patial Deivative: Image Gadient Image Enhancement in the Spatial Domain : Mix things up! P P P y P A B D smooth P x P + - Shapening C Wood, Digital Image Pocessing, nd Edition. E Image Enhancement in the Spatial Domain : Mix things up! C E G Powe Law T. S F Multiplication A H Wood, Digital Image Pocessing, nd Edition.