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

Similar documents
Digital Image Processing

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

Circular averaging filter (pillbox) Approximates the two-dimensional Laplacian operator. Laplacian of Gaussian filter

Digital Image Processing

Sharpening Spatial Filters ( high pass)

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

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

Practical Image and Video Processing Using MATLAB

Lecture 3: Linear Filters

Image restoration and color image processing

TDI2131 Digital Image Processing (Week 4) Tutorial 3

Robert Collins CSE486, Penn State. Lecture 3: Linear Operators

Image Enhancement in the Spatial Domain

Motivation: Image denoising. How can we reduce noise in a photograph?

Vision Review: Image Processing. Course web page:

Image Processing for feature extraction

Image Filtering. Median Filtering

Motivation: Image denoising. How can we reduce noise in a photograph?

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

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

Lec 05 - Linear Filtering & Edge Detection

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

Motion illusion, rotating snakes

Midterm is on Thursday!

Image Enhancement in the Spatial Domain Low and High Pass Filtering

Image filtering, image operations. Jana Kosecka

Spatial Domain Processing and Image Enhancement

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

Digital Image Processing

TDI2131 Digital Image Processing

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

EE482: Digital Signal Processing Applications

What is image enhancement? Point operation

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

CS/ECE 545 (Digital Image Processing) Midterm Review

Image Enhancement II: Neighborhood Operations

Computer Graphics Fundamentals

Filip Malmberg 1TD396 fall 2018 Today s lecture

Images and Filters. EE/CSE 576 Linda Shapiro

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

CEE598 - Visual Sensing for Civil Infrastructure Eng. & Mgmt.

Numerical Derivatives See also T&V, Appendix A.2 Gradient = vector of partial derivatives of image I(x,y) = [di(x,y)/dx, di(x,y)/dy]

Midterm Review. Image Processing CSE 166 Lecture 10

Fourier Transforms and the Frequency Domain

Image Enhancement in the Spatial Domain (Part 1)

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Computer Vision for HCI. Noise Removal. Noise in Images

Filtering. Image Enhancement Spatial and Frequency Based

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

Digital Image Processing

2D Discrete Fourier Transform

Image Processing Lecture 4

Digital Image Processing. Lecture # 3 Image Enhancement

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

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

Image Processing. Chapter(3) Part 2:Intensity Transformation and spatial filters. Prepared by: Hanan Hardan. Hanan Hardan 1

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

Prof. Feng Liu. Winter /10/2019

02/02/10. Image Filtering. Computer Vision CS 543 / ECE 549 University of Illinois. Derek Hoiem

Digital Image Processing

CSE 564: Scientific Visualization

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

Image Filtering in Spatial domain. Computer Vision Jia-Bin Huang, Virginia Tech

Installation. Binary images. EE 454 Image Processing Project. In this section you will learn

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

Chapter 6. [6]Preprocessing

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

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

TIRF, geometric operators

BCC Displacement Map Filter

Study And Analysis Of Enhancement And Edge Detection Method For Human Bone Fracture X-Ray Image

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

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

Lecture 4: Spatial Domain Processing and Image Enhancement

Enhancement Techniques for True Color Images in Spatial Domain

DIGITAL IMAGE PROCESSING ASSIGNMENT

Chapter 2 Image Enhancement in the Spatial Domain

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

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

Digital Image Processing 3/e

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

IMAGE PROCESSING PROJECT REPORT NUCLEUS CLASIFICATION

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

Lecture Topic: Image, Imaging, Image Capturing

Chapter 3. Study and Analysis of Different Noise Reduction Filters

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

CS 445 HW#2 Solutions

Filtering in the spatial domain (Spatial Filtering)

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

Non Linear Image Enhancement

MATLAB 6.5 Image Processing Toolbox Tutorial

CSC 320 H1S CSC320 Exam Study Guide (Last updated: April 2, 2015) Winter 2015

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

Fourier analysis of images

IMAGE ENHANCEMENT - POINT PROCESSING

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

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

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

Digital Image Processing

Transcription:

It makes all the difference whether one sees darkness through the light or brightness through the shadows. - David Lindsay 3.1 Background 76 3.2 Some Basic Gray Level Transformations 78 3.3 Histogram Processing 88 3.4 Enhancement Using Arithmetic/Logic Operations 108 3.5 Basics of Spatial Filtering 116 3.6 Smoothing Spatial Filters 119 3.7 Sharpening Spatial Filters 125 3.8 Combining Spatial Enhancement Methods 137 1

g(x,y) = T [f (x, y) ] 3.2 Some Basic Gray Level Transformations 78 3.2.1 Image Negatives 78 3.2.2 Log Transformations 79 3.2.3 Power-Law Transformations 80 3.2.4 Piecewise-Linear Transformation Functions 85 2

Some Basic Gray Level Transformations Contrast enhancement Basic Gray Level Transformations: Summary 3

Image Negatives Log Transformations 4

Power-Law Transformations Gamma Correction? 5

Power-Law Transformations To MRI of a fractured human spine Power-Law Transformations To Aerial Image 6

Piecewise-Linear Transformation Functions for contrast stretching Piecewise-Linear Transformation Functions for gray-level slicing 7

3.3 Histogram Processing 88 3.3.1 Histogram Equalization 91 3.3.2 Histogram Matching (Specification) 94 3.3.3 Local Enhancement 103 3.3.4 Use of Histogram Statistics for Image Enhancement 103 The image shows the spatial distribution of gray values. The image histogram discards the spatial information and shows the relative frequency of occurrence of the gray values. Image Gray Value Rel. Freq. Count 0 3 3 2 5 5 0 2.05 1 1 0 3 4 5 1 2.05 2 4.11 2 2 2 4 4 4 3 6.17 4 7.20 3 3 4 4 5 5 5 8.22 6 6.17 3 4 5 5 6 6 7 1.03 7 6 6 6 6 5 How it works Sum= 36 1.00 8

Histogram Processing Histogram Equalization Transformation both single valued and monotonic 9

Histogram Equalization Histogram Equalization 10

G=8 MxN=2400 N p =300 How It Works j CH(j) = Σ H(i) i=0 j H(j) CH(j) i 0 100 100 0 1 800 900 2 2 700 1600 4 3 500 2100 6 4 100 2200 6 5 100 2300 7 6 100 2400 7 7 0 2400 7 800 800 600 600 400 200 ideal 400 200 0 0 1 2 3 4 5 6 8 0 0 1 2 3 4 5 6 8 Improvement 1: Histogram Matching 11

Histogram Equalization Histogram Matching (Specification) 12

Improvement 2: Global vs. Local Enhancement 3.4 Enhancement Using Arithmetic/Logic Operations 108 3.4.1 Image Subtraction 110 3.4.2 Image Averaging 112 13

Image AND/OR operators Image Subtraction in medical application 14

Image Averaging 15

3.5 Basics of Spatial Filtering 116 3.6 Smoothing Spatial Filters 119 3.6.1 Smoothing Linear Filters 119 3.6.2 Order-Statistics Filters 123 3.7 Sharpening Spatial Filters 125 16

Smoothing Spatial Filters - Smoothing Linear Filters 17

Order-Statistics Filters Median filter 18

3.7 Sharpening Spatial Filters 125 3.7.1 Foundation 125 3.7.2 Use of Second Derivatives The Laplacian 128 3.7.3 Use of First Derivatives The Gradient 134 19

Use of Second Derivatives for Enhancement The Laplacian 20

Use of Second Derivatives for Enhancement Unsharp masking and high- boost filtering 21

Use of First Derivatives for Enhancement The Gradient 22

Sobel gradient MATLAB/Image Processing Toolbox LINEAR SPATIAL FILTERING >> f=imread(fig3.15(a).jpg ); %load in checkerboard figure % g=imfilter(f,w,filtering_mode, boundary_options,size_options) % f is the input image % w is the filter mask % Filtering mode: % corr filtering is done using correlation % conv filtering is done using convolution -- flips mask 180 degrees % Boundary options % P without quotes (default) - pad image with zeros % replicate - extend image by replicating border pixels % symmetric - extend image by mirroring it across its border % circular - extend image byrepeating it (one period of a periodic function) % Size options % full - output is the same size as the padded image % same - output is the same size as the input >> w=ones(9); % create a 9x9 filter (not normalized) >> gd=imfilter(f,w); % filter using default values >> imshow( gd, [ ]) % [ ] causes MATLAB to display using low and high % gray levels of input image. %Good for low dynamic range >> gr=imfilter(f,w, replicate ); % pad using replication >> figure, imshow(gr, [ ]) % >> gs=imfilter(f,w, symmetric ); % pad using symmetry >> figure, imshow(gs, [ ]) % show this figure in a new window SEE GWE, Section 3.4.1Linear Spatial Filtering 23

MATLAB/Image Processing Toolbox LINEAR SPATIAL FILTERING >> f=imread(fig3.15(a).jpg ); %load in checkerboard figure >> w=ones(9); % create a 9x9 filter (not normalized) % f is of type double in [0,1] by default >> f8=im2uint8(f); % converts image to uint8, i.e., integers in range [0,255] >> g8r=imfilter(f8,w, replicate ); % pad using replication % imfilter creates an output of same data class as input, i.e., uint(8) >> imshow( g8r, [ ]) % clipping caused data loss since filter was not % normalized SEE GWE, Section 3.4.1Linear Spatial Filtering MATLAB/Image Processing Toolbox MATLAB s built-in filters >> f=imread( fig3.15(a).jpg ); %load in checkerboard figure >> w=fspecial( type, parameters); % create filter mask % filter types: % average, default is 3x3 % gaussian, default is 3x3 and sigma=0.5 % laplacian, default alpha=0.5 % prewitt, vertical gradient, default is 3x3. Get horizontal by wh=w % sobel, vertical gradient, default is 3x3 % unsharp, default is 3x3 with alpha=0.2 SEE GWE, Section 3.5 Image processing Toolbox Standard Spatial Filters 24

25

MATLAB/Image Processing Toolbox PRODUCING FIGURE 3.40 >> f=imread( Fig_Moon.jpg ); %load in lunar north pole image >> w4=fspecial( laplacian,0) % creates 3x3 laplacian, alpha=0 [0:1] >> w8=[1 1 1;1-8 1;1 1 1] % create a Laplacian that fspecial can t >>f=im2double(f); % output same as input unit8 so % negative values are truncated. % Convert to double to keep negative values. >> g4=f-imfilter(f,w4, replicate ); % filter using default values >> g8=f-imfilter(f,w8, replicate ); % filter using default values >> imshow(f) % display original image >> imshow(g4) % display g4 processed image >> imshow(g8) % display g8 processed image SEE GWE, Section 3.5.1Linear Spatial Filters 26