Digital Image Processing

Similar documents
Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

Digital Image Processing

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

Practical Image and Video Processing Using MATLAB

Image Filtering. Median Filtering

EE482: Digital Signal Processing Applications

Digital Image Processing

CSE 564: Scientific Visualization

Filtering in the spatial domain (Spatial Filtering)

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Image Enhancement in spatial domain. Digital Image Processing GW Chapter 3 from Section (pag 110) Part 2: Filtering in spatial domain

TDI2131 Digital Image Processing

Image Enhancement in the Spatial Domain

Filip Malmberg 1TD396 fall 2018 Today s lecture

Last Lecture. Lecture 2, Point Processing GW , & , Ida-Maria Which image is wich channel?

Midterm Review. Image Processing CSE 166 Lecture 10

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

Image acquisition. Midterm Review. Digitization, line of image. Digitization, whole image. Geometric transformations. Interpolation 10/26/2016

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Non Linear Image Enhancement

Digital Image Processing. Lecture # 3 Image Enhancement

Image Enhancement in the Spatial Domain (Part 1)

Image Enhancement using Histogram Equalization and Spatial Filtering

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

Chapter 3 Image Enhancement in the Spatial Domain. Chapter 3 Image Enhancement in the Spatial Domain

Computer Vision. Intensity transformations

Images and Filters. EE/CSE 576 Linda Shapiro

Preparing Remote Sensing Data for Natural Resources Mapping (image enhancement, rectifications )

Part I Feature Extraction (1) Image Enhancement. CSc I6716 Spring Local, meaningful, detectable parts of the image.

Spatial Domain Processing and Image Enhancement

CS/ECE 545 (Digital Image Processing) Midterm Review

1.Discuss the frequency domain techniques of image enhancement in detail.

Image analysis. CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

To process an image so that the result is more suitable than the original image for a specific application.

Image Processing for feature extraction

Introduction. Computer Vision. CSc I6716 Fall Part I. Image Enhancement. Zhigang Zhu, City College of New York

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

DIGITAL IMAGE DE-NOISING FILTERS A COMPREHENSIVE STUDY

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

Vision Review: Image Processing. Course web page:

Reading Instructions Chapters for this lecture. Computer Assisted Image Analysis Lecture 2 Point Processing. Image Processing

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Image Processing. 2. Point Processes. Computer Engineering, Sejong University Dongil Han. Spatial domain processing

TIRF, geometric operators

Image Filtering Josef Pelikán & Alexander Wilkie CGG MFF UK Praha

A.V.C. COLLEGE OF ENGINEERING DEPARTEMENT OF CSE CP7004- IMAGE PROCESSING AND ANALYSIS UNIT 1- QUESTION BANK

Digital Image Fundamentals and Image Enhancement in the Spatial Domain

Computer Graphics Fundamentals

Chapter 2 Image Enhancement in the Spatial Domain

CSE 564: Visualization. Image Operations. Motivation. Provide the user (scientist, t doctor, ) with some means to: Global operations:

Enhancement Techniques for True Color Images in Spatial Domain

Image Enhancement. Image Enhancement

Computing for Engineers in Python

Digital Image Processing. Lecture # 4 Image Enhancement (Histogram)

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

June 30 th, 2008 Lesson notes taken from professor Hongmei Zhu class.

Analysis of infrared images in integrated-circuit techniques by mathematical filtering

VU Signal and Image Processing. Image Enhancement. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

Filtering Images in the Spatial Domain Chapter 3b G&W. Ross Whitaker (modified by Guido Gerig) School of Computing University of Utah

Image filtering, image operations. Jana Kosecka

ECC419 IMAGE PROCESSING

Anna University, Chennai B.E./B.TECH DEGREE EXAMINATION, MAY/JUNE 2013 Seventh Semester

Image Processing COS 426

1. (a) Explain the process of Image acquisition. (b) Discuss different elements used in digital image processing system. [8+8]

IMAGE ENHANCEMENT - POINT PROCESSING

A Study On Preprocessing A Mammogram Image Using Adaptive Median Filter

Frequency Domain Enhancement

CS 4501: Introduction to Computer Vision. Filtering and Edge Detection

Digital Image Processing Chapter 3: Image Enhancement in the Spatial Domain

Image Enhancement in Spatial Domain

Filtering. Image Enhancement Spatial and Frequency Based

>>> from numpy import random as r >>> I = r.rand(256,256);

Chapter 3. Study and Analysis of Different Noise Reduction Filters

Lecture 4: Spatial Domain Processing and Image Enhancement

Image restoration and color image processing

Sharpening Spatial Filters ( high pass)

Lecture No Image Filtering (course: Computer Vision)

Image Enhancement contd. An example of low pass filters is:

Digital Image Processing. Lecture 5 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Gonzales & Woods, Emmanuel Agu Suleyman Tosun

Prof. Feng Liu. Winter /10/2019

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Digital Image Processing

Midterm Examination CS 534: Computational Photography

Computer Vision, Lecture 3

Image preprocessing in spatial domain

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

NON UNIFORM BACKGROUND REMOVAL FOR PARTICLE ANALYSIS BASED ON MORPHOLOGICAL STRUCTURING ELEMENT:

Performance Evaluation of Edge Detection Techniques for Square Pixel and Hexagon Pixel images

Chapter 6. [6]Preprocessing

More image filtering , , Computational Photography Fall 2017, Lecture 4

Last Lecture. photomatix.com

Digital Image Processing

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Transcription:

Digital Image Processing Part 2: Image Enhancement Digital Image Processing Course Introduction in the Spatial Domain Lecture AASS Learning Systems Lab, Teknik Room T26 achim.lilienthal@tech.oru.se Course Book Chapter 3

Contents. Image Enhancement in the Spatial Domain 2. Grey Level Transformations 3. Histogram Processing 4. Operations Involving Multiple Images 5. Spatial Filtering

Contents Image Enhancement in the Spatial Domain

Image Enhancement in the Spatial Domain Image Enhancement image processing the result is supposed to be "more suitable" "more suitable" according to a certain application more suitable for visual interpretation

Image Enhancement in the Spatial Domain We want to create an image which is "better" in some sense. helps visual interpretation (brightening, sharpening ) subjective pre-processing for a subsequent image analysis algorithm performance metric (performance of a task) make the image more "specific" application dependent T f(x,y) g(x,y) original image (or set of images) new image

Image Enhancement in the Spatial Domain Spatial Domain versus Frequency Domain spatial domain direct manipulation of the pixels discussed in this lecture three types of transformations in the spatial domain: pixel brightness transformations, point processing (depend only on the pixel value itself) spatial filters, local transformations or local processing (depend on a small neighbourhood around the pixel) geometric transformations frequency domain: modifications of the Fourier transform discussed in the next lectures

Image Enhancement in the Spatial Domain Transformations in the Spatial Domain g ( x, y) = T[ f ( x, y)] standard approach: T is applied to a sub-image centred at (x,y) sub-image is called mask (kernel, filter, template, window) mask processing or filtering

Contents Gray Level Transformations

2 Grey Level Transformations Grey Level Transformations simplest case: each pixel in the output image depends only on the corresponding pixel in the input image x neighbourhood (point processing) examples (contrast stretching) s = T (r) s = T (r)

2 Grey Level Transformations Grey Level Transformations contrast stretching thresholding

2 Grey Level Transformations Common Grey Level Transformations (Single Image) linear identity inverse power law n. power n. root logarithmic... with more than one input image sum, mean statistical operations (variance, t-test )

2 Grey Level Transformations Common Grey Level Transformations (Single Image) linear identity inverse (negative) power law n. power n. root logarithmic

2 Grey Level Transformations Common Grey Level Transformations (Single Image) inverse transform

Contents Histogram Processing

3 Histogram Processing Grey Scale Histogram shows the number of pixels per grey level

3 Histogram Processing Grey Scale Histogram neutral transform

3 Histogram Processing Grey Scale Histogram neutral transform inverse transform

3 Histogram Processing Grey Scale Histogram neutral transform inverse transform logarithmic transform

3 Histogram Processing Grey Scale Histogram brightness (addition / subtraction)

3 Histogram Processing Grey Scale Histogram brightness (addition / subtraction) contrast (histogram stretching)

3 Histogram Processing Grey Scale Histogram brightness (addition / subtraction) contrast (histogram stretching)

2 Grey Level Transformations Contrast Stretching piecewise linear function

2 Grey Level Transformations Contrast Stretching piecewise linear function power law transformation (gamma transformation) γ s = cr

3 Histogram Processing Histogram Equalization contrast / brightness adjustments sometimes need to be automatised "optimal" contrast for an image? flat histogram histogram normalization to get a given shape for the histogram (see GW 3.3.2)

3 Histogram Processing Histogram Equalization consider the continuous case: probability density functions (PDFs) of s and r are related by transformation function = cumulative density function (CDF) ds dr p s ( s) = p r ( r) dr ds r T ( r) = p r ( ω) dω = s, r [,] p r ( r) T ( s) r d = T ( r) = pr ( ω) dω = pr ( r) p s ( s) = dr

Histogram Processing 3 Histogram Equalization discrete case does not generally produce a uniform PDF tends to spread the histogram enables automatic contrast stretching = = = = = k j j k j j r k k n n r p r T s ) ( ) ( n n r p k k r = ) (

3 Histogram Processing Histogram Equalization CDF

3 Histogram Processing Histogram Equalization

3 Histogram Processing Adaptive / Localized Histogram Equalization transform a single pixel by histogram equalization calculated over a square or rectangular neighbourhood original image global histogram equalization

3 Histogram Processing Adaptive / Localized Histogram Equalization transform a single pixel by histogram equalization calculated over a square or rectangular neighbourhood original image local histogram equalization (radius = )

3 Histogram Processing Adaptive / Localized Histogram Equalization transform a single pixel by histogram equalization calculated over a square or rectangular neighbourhood original image local histogram equalization (radius = 5)

3 Histogram Processing Adaptive / Localized Histogram Equalization transform a single pixel by histogram equalization calculated over a square or rectangular neighbourhood original image local histogram equalization (radius = 25)

3 Histogram Processing Adaptive / Localized Histogram Equalization transform a single pixel by histogram equalization calculated over a square or rectangular neighbourhood original image local histogram equalization (radius = 2)

3 Histogram Processing Use of Histogram Statistics for Image Enhancement idea: instead of using the image histogram directly, we can instead use statistical parameters derived from it mean: measure of average grey level in the image / neighbourhood variance: measure of average contrast in the image / neighbourhood example in GW (see chapter 3.3.4) compare local with global mean and variance and decide whether the pixel is processed or not g( x, y) = E f f ( x, y) ( x, y) if m k m AND k σ otherwise σ S x, y G G S x, y 2 G k σ

Contents Operations Involving Multiple Images

4 Operations Involving Multiple Images Operations Between Two or More Images image subtraction Angiography tracking

4 Operations Involving Multiple Images Image Subtraction DSA (Digital Subtraction Angiography) mask image live image DSA image

4 Operations Involving Multiple Images Image Subtraction tracking with a stationary camera background image live image difference image

4 Operations Involving Multiple Images Operations Between Two or More Images image subtraction Angiography tracking image averaging (GW 3.4.2) noise reduction background modeling

Contents Spatial Filtering

5 Spatial Filtering Neighbourhood Relations Between Pixels a pixel has 4 or 8 neighbours in 2D depending on the neighbour definition: 4-neighborhood each neighbor must share an edge with the pixel 8- neighborhood each neighbor must share an edge or a corner with the pixel

5 Spatial Filtering Basics of Spatial Filtering the pixel value in the output image is calculated from a local neighbourhood in the input image the local neighbourhood is described by a mask with a typical size of 3x3, 5x5, 7x7, pixels filtering is performed by moving the mask over the image the centre pixel in the output image is given a value that depends on the input image and the weights of the mask

5 Spatial Filtering Basics of Spatial Filtering filter subimage defines coefficients w(s,t) used to update pixel at (x,y)

5 Spatial Filtering Linear Spatial Filtering filter subimage defines coefficients w(s,t) response of the filter at point (x,y) is given by a sum of products a g ( x, y) = w( s, t) f ( x + s, y + t) s= at= b also called convolution (convolution mask) b (-,-) (-,) (-,) (,-) (,) (,) (,-) (,) (,)

5 Spatial Filtering Linear Spatial Filtering Implementation generic code: How to Deal With the Border? for P(x,y) in image for F(u,v) in filter Q(x,y) += F(u,v) P(x-u,y-v) end end limit excursion of the centre of the mask smaller image set outside pixel value zero border effects mirroring border pixel values border effects modify filter size along the border slower

5 Spatial Filtering Smoothing Spatial Filters (Averaging Filters) for blurring removal of small (irrelevant) details, bridging smallgaps for noise reduction Smoothing Spatial Filters Mean Filter need for normalization to conserve the total energy of the image (sum of all greylevels) quick results in severe edge blurring x /9

5 Spatial Filtering Smoothing Spatial Filters Mean Filter original Mean 5x5 Mean x

5 Spatial Filtering Smoothing Spatial Filters Gaussian Filter weighted average 2D Gaussian kernel higher weight in the centre to decrease blurring Why a Gaussian? simple model of blurring in optical systems smooth x /6 2 2 4 2 2

5 Spatial Filtering Smoothing Spatial Filters Median Filter take the values of the input image corresponding to the desired sub-window (3x3, 5x5, ) sort them take the middle value (example: 3x3 the 5th largest) forces pixels with distinct grey levels to be more like their neighbours very good at reduce salt-and-pepper noise less blurring than linear filters of the same size

5 Spatial Filtering Smoothing Spatial Filters Median Filter take the median value over the sub-window X ray image of a circuit board Average 3x3 Median 3x3

5 Spatial Filtering Smoothing Spatial Filters Median Filter take the median value over the sub-window original image mean 3x3 mean 5x5 mean x

5 Spatial Filtering Order Statistics Filters (Fractile Filters) median min, max useful in mathematical morphology percentile generalization of median, min, max 3 7 25% percentile 2 4 5 2 2 3 4 5 7 8 8 2 min (%) median (5%) max (%)

5 Spatial Filtering Order Statistics Filters (Fractile Filters) median min, max useful in mathematical morphology percentile generalization of median, min, max order statistics filters are nonlinear filters order statistics do not have an equivalent in the frequency domain

5 Spatial Filtering Sharpening Spatial Filters highlight fine detail (also noise) enhance edges uses image differentiation Sharpening Spatial Filters D approximation to st Order Derivation equivalent to the D convolution mask f x f ( x + ) f ( x) -

Spatial Filtering 5 Gradient and Magnitude of the Gradient Sharpening Spatial Filters Based on the Gradient Roberts Sobel Prewitt y f x f y f x f f + + = 2 2 = y f x f f,

5 Spatial Filtering Sharpening Spatial Filters Roberts (cross gradient operators) f f f + = G x + G x y 2 masks approximate G x and G y in y - -

5 Spatial Filtering Sharpening Spatial Filters Sobel Operators 2 masks approximate G x and G y in detects horizontal and vertical edges f f f + = G x + G y x y - 2-2 2 - - -2 rotations give the other 6 convolution masks, including diagonal edges

5 Spatial Filtering Sharpening Spatial Filters Sobel Operators weight 2 is supposed to smooth by emphasizing the centre - -2-2 - 2-2

5 Spatial Filtering Sharpening Spatial Filters Sobel Operators detection of vertical dark-light edges - -2 2 -

5 Spatial Filtering Sharpening Spatial Filters Sobel Operators combination of all the directional responses

5 Spatial Filtering Sharpening Spatial Filters Prewitt gradient edge detector f f f + = G x + G x y 2 masks approximate G x and G y in y - - - - -

5 Spatial Filtering Sharpening Spatial Filters comparison between Sobel and Prewitt operator Sobel (~ G x + G y ) Prewitt (~ G x + G y )

5 Spatial Filtering Sharpening Spatial Filters highlight fine detail (also noise) enhance edges uses image differentiation Sharpening Spatial Filters D approximation to st order derivation approximation to 2 nd order derivation 2 f = f ( x + ) + f ( x ) 2 f ( x) 2 x equivalent to the D convolution mask -2

5 Spatial Filtering Sharpening Spatial Filters Laplace Filter Laplacian (second order derivative) 2 2 2 f f = + 2 2 x y thinner edges not so strong response to a step better response to fine details double response to edges rotation independent one mask for all edges

5 Spatial Filtering Sharpening Spatial Filters Laplace Filter Laplacian (second order derivative) 2 = 2 f 2 x + 2 f 2 y 2 f 2 x = f ( x + ) + f ( x ) 2 f ( x) filter masks to implement the Laplacian add the "digital implementation" of the two terms in the Laplacian (9 rotation symmetry) add also diagonal terms (45 rotation symmetry) -4 negative values re-scale -8

5 Spatial Filtering Sharpening Spatial Filters Laplace Filter detection of edges independent of direction isotropic with respect to 9 rotations - - 4 - -

5 Spatial Filtering ] Sharpening Spatial Filters Laplace Filter \ Laplace filter + original image sharpening - - 5 - -

5 Spatial Filtering Sharpening Spatial Filters Laplace filter + original image sharpening

5 Spatial Filtering ] Sharpening Spatial Filters Unsharp Masking \ analog equivalent used in publishing industry \ basic idea: subtract blurred version of an image from original image to generate the edges