IMAGE ENHANCEMENT IN SPATIAL DOMAIN

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

Digital Image Processing

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

Digital Image Processing

Filtering in the spatial domain (Spatial Filtering)

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

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

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

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

Image Enhancement in the Spatial Domain (Part 1)

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

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

Non Linear Image Enhancement

Image Enhancement in the Spatial Domain

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

TDI2131 Digital Image Processing

Midterm Review. Image Processing CSE 166 Lecture 10

Digital Image Processing. Image Enhancement: Filtering in the Frequency Domain

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

What is image enhancement? Point operation

Image Processing Lecture 4

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

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

Practical Image and Video Processing Using MATLAB

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

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

Computer Vision. Intensity transformations

Image Processing for feature extraction

ECC419 IMAGE PROCESSING

Digital Image Processing

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

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

Transforms and Frequency Filtering

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

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Filip Malmberg 1TD396 fall 2018 Today s lecture

Frequency Domain Enhancement

DIGITAL IMAGE DE-NOISING FILTERS A COMPREHENSIVE STUDY

EE482: Digital Signal Processing Applications

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

Lecture 4: Spatial Domain Processing and Image Enhancement

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

Vision Review: Image Processing. Course web page:

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

Color Transformations

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

Digital Image Processing

CoE4TN4 Image Processing. Chapter 4 Filtering in the Frequency Domain

Image filtering, image operations. Jana Kosecka

Lecture No Image Filtering (course: Computer Vision)

Digital Image Processing Chapter 6: Color Image Processing ( )

Digital Image Fundamentals and Image Enhancement in the Spatial Domain

PRACTICAL IMAGE AND VIDEO PROCESSING USING MATLAB

CSE 564: Scientific Visualization

Filtering. Image Enhancement Spatial and Frequency Based

Prof. Feng Liu. Winter /10/2019

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

Digital Image Processing. Lecture # 3 Image Enhancement

Computing for Engineers in Python

Midterm Examination CS 534: Computational Photography

COMPREHENSIVE EXAMINATION WEIGHTAGE 40%, MAX MARKS 40, TIME 3 HOURS, DATE Note : Answer all the questions

ELEC Dr Reji Mathew Electrical Engineering UNSW

Digital Image Processing COSC 6380/4393

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

Design of Various Image Enhancement Techniques - A Critical Review

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

Fourier Transform. Any signal can be expressed as a linear combination of a bunch of sine gratings of different frequency Amplitude Phase

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

Digital Image Processing

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

Image Smoothening and Sharpening using Frequency Domain Filtering Technique

IMAGE ENHANCEMENT - POINT PROCESSING

Images and Filters. EE/CSE 576 Linda Shapiro

Enhancement Techniques for True Color Images in Spatial Domain

SYLLABUS CHAPTER - 2 : INTENSITY TRANSFORMATIONS. Some Basic Intensity Transformation Functions, Histogram Processing.

Lecture 3 Complex Exponential Signals

Spatial Domain Processing and Image Enhancement

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

Chapter 17. Shape-Based Operations

Sharpening Spatial Filters ( high pass)

Announcements. Image Processing. What s an image? Images as functions. Image processing. What s a digital image?

Image Filtering. Median Filtering

Background. Computer Vision & Digital Image Processing. Improved Bartlane transmitted image. Example Bartlane transmitted image

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

Midterm is on Thursday!

Image preprocessing in spatial domain

Chapter 6. [6]Preprocessing

Computer Vision, Lecture 3

Keywords-Image Enhancement, Image Negation, Histogram Equalization, DWT, BPHE.

Noise and Restoration of Images

Chapter 2 Image Enhancement in the Spatial Domain

CAP 5415 Computer Vision. Marshall Tappen Fall Lecture 1

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

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

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

Image restoration and color image processing

Digital Image Processing 3/e

Solution for Image & Video Processing

Fig Color spectrum seen by passing white light through a prism.

Transcription:

A First Course in Machine Vision IMAGE ENHANCEMENT IN SPATIAL DOMAIN By: Ehsan Khoramshahi

Definitions The principal objective of enhancement is to process an image so that the result is more suitable for a special process Image Enhancement Fall into two categories: Enhancement in spatial domain and Frequency domain The term spatial domain refers to the Image Plane itself which is DIRECT manipulation of pixels. Frequency domain processing techniques are based on modifying the Fourier transform of an image.

The term SPATIAL Domain Spatial Domain=Aggregate of pixels composing an image. Spatial Domain Methods=Procedures that operate directly on these pixels. Denoted by: g(x,y)=t[f(x,y)] F(x,y) : Input Image, T: Operator on Image g(x,y): Processed Image. T also can operate on a set of Images.

Definition of Neighborhood: Input for Process: A neighborhood about a point (x,y) The simplest form of input is a one pixel neighborhood. s=t(r) T:Transformation Function s,r : gray level of f(x,y) and g(x,y) respectively. The most basic approach is rectangular sub image area centered at (x,y) Is it the only solution???

Linear Transformation Linear Transformations: S=a*r+b

Linear Transformation s 1.2 * r s 0.5 * r

Negative s 255 r

Other forms

Non-linear Transformation s 255 * sin( r * / 255)

Creating a Transformation In Matlab/Octave Step1: Defining the Mapping Table Step2: Use the Mapping table to transfer pixel values Step3: Visualization

Piece-wise linear transformation functions The form of them could be arbitrarily complex A practical implementation of some important transformations can be formulated only as piece-wise functions.

Contrast Stretching Is one of the simplest form of piece-wise linear function. Low contrast can result from: Poor Illumination Lack of dynamic range in the imaging sensor Wrong setting of lens aperture.

Contrast Stretching example

Contrast Stretching example

Linear Transformation cont. Gray Level Slicing Highlighting a specific range of gray levels in an image. Enhancing features like masses of water in satellite imageries. One Approach: show high values for pixel of interest. Second Approach: Brighten the color of interest

Slicing Example

Histogram Processing Histogram is a un normalized PDF for gray values. It means that it contains the number of pixels for each gray value. So it means there are 3 Histogram for a color Image, because we have 3 Different Class of 0-255 colors. h(rk ) nk

Histogram

Histogram

Histogram Equalization Histograms could be considered as Probability Density Functions. So cumulative density functions could be defined as well.

Again the case of low contrast image

Hist. Equalization Result

Histograms after Hist. equalization

CDF s after Hist. Equalization

Histogram Matching The same concept Except we use the CDF of one image as a non-linear Transform for another image. The resulting Image will have more or less the same Contrast as the reference.

Enhancement Using Arithmetic/Logic Operations Performed on a Pixel-by-Pixel basis Between two or MORE images. Example: subtraction of two images. Logic operations=logic and/or nor xor xnor Logic operations operate on a pixel-by-pixel basis. We only concern about 1- and 2- or 3- not because they are functionally complete The other operations could be expresses as a function of them.

Image Subtraction Math formulation: Source Image Background Estimation Foreground

Image Averaging Notation Application: Noise Reduction Astronomy Surveillance Background estimation

Example: background estimation by Image Averaging

Spatial Filtering Input: Neighborhood + Sub-Image Output: A single value regarding to each pixel Definition: A neighborhood operation works with the values of the image pixels in the neighborhood and values of a sub-image that has the same dimension. Sub-Image is called: Mask, Kernel, Template or Window

Spatial Filters P1 P2 P3. P11 P12 P13 P14..... P10 M1 M2 M3 M4 M5 M6 M7 M8 M9 Mask(w) Original Image(f) Response to Mask

Smoothing Filters N-by-N filters used for noise reduction Blur an image and remove the high frequency part of signal Usually Gaussian Noise could efficiently remove by them. Equivalent to High-pass filters in Frequency domain. Most-basic type is Mask=ones(3)

Smoothing Filter Example

Order-Statistics Filters Median Principal function: to force points with distinct gray values to be more like their neighbors. Very suitable for eliminate salt and pepper noise Max Min Mode They all find an ordering-related elements in a defined neighborhood and replace it with the original pixel.

Order-statistics Filters Example Grab a 3x3 Neighborhood {10,20,20,20,15,20,20,25,100} Sort them {10,15,20,20,20,20,25,100} Calculate order-statistics Filter, example: Median:20

Order-Statistics Median Example.

Sharpening Objective: to highlight detail in an image or enhance detail that has been blurred, either in error or as a natural effect of a particular method of image acquisition. Applications are vary and important from electronic printing and medical imaging to industrial inspection and autonomous guidance in military systems.

Sharpening cont. Image blurring can accomplished in the spatial domain by pixel averaging in a neighborhood. Averaging is analogous to integration So it is logical to conclude that sharpening could be accomplished by spatial differentiation

What will be revealed from image sharpening Strength of the response of a derivative operator is proportional to the degree of discontinuity of the image at that point So image differentiation will enhances Edges Other discontinuities (like Noise) Deemphasizes Areas with slowly varying gray-level-values

Fundamental Properties of sharpening filters To simplify we will focus on one dimensional derivative We are interested on behavior in Flat segments At the onset and end of discontinuities(step,ramp) Along gray level ramps

First order derivative properties Any definition for fist order should satisfy: Must be zero in flat segments Must be non-zero at the onset of a gray-level step or ramp Must be non-zero along ramps

Second derivative properties Any definition should satisfy: Must be zero in flat areas Must be non-zero at the onset and end of a gray- level step or ramp Must be zero along ramps of constant slpe

Basic Definitions A basic definition of the first order derivative of a one-dimensional function f(x): Second order derivative

1st and 2nd order Derivatives

Derivatives Summary 1st order derivative: Produces thicker edges in an image Stronger response to gray level step 2nd order derivative Stronger response fine details, such as thin lines and isolated points Produce double response to step change in gray level Their responses is greater to a point rather than a line, to a line rather than a step. Which one we should choose? In most applications, the 2nd derivative is better suited than the 1st for image enhancement

Isotropic filters Their response is independent of the discontinuities in the image to which the filter applied. So Isotropic filters are rotation invariant, so rotating and image and then applying the filter is same as applying the filter then rotating the result. It can be shown(rosenfeld and Kak [1982]) that the simplest isotropic derivative operation is Laplacian.

Laplacian Formula Derivative of any order is linear so Laplacian is a linear operation Discrete form of equation

Laplacian Mask

Laplacian Mask Demo

Sharpening by Using Laplacian Adding the original Image the absolute value of Laplacian operator

Simplification over the last sharpening process

Unsharp Masking A process used for many years in publishing industries for image sharpening Consist of subtracting a blurred version of image from the image itself. This process called unsharp Masking

High-Boost Filter A slight further generalization of unsharp-masking is called high- boost filtering Rewrite high-boost equation: If A=1 then high-boost is a regular Laplacian.

Effect of High-Boost on a Dark Image

A First Course in Machine Vision IMAGE ENHANCEMENT IN FREQUENCY DOMAIN

Background Discovered by Jean Baptiste Joseph Fourier. Published as a Theory in the book: Analytic Theory of Heat [1822]. 55 years later translated in English by Freeman[1878]. Fourier express that: any function that periodically repeats itself can be expressed as a sum of sines/or cosines of different frequencies, each multiplied by a different coefficient(we call this sum Fourier series).

Expressing a complicated periodic function by sines

One dimensional Fourier Transform Direct Inverse Components of Fourier Transform are complex numbers (Real and Imaginary Part) So we have two Images: Magnitude or Spectrum of Transform Phase Angle or Phase spectrum of Transform

Fourier Cont. Fourier Magnitude Phase Angle

Application of DFT Filtering: Low-pass and High-pass Convolution in Spatial Domain is a simple multiplication in Frequency Domain So Mask filters are easier in Frequency under the condition that we have specialized hardware which can run DFT very fast.