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

Similar documents
Chapter 3: Intensity Transformations and Spatial Filtering

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

EELE 5310: Digital Image Processing. Lecture 2 Ch. 3. Eng. Ruba A. Salamah. iugaza.edu

EELE 5310: Digital Image Processing. Ch. 3. Eng. Ruba A. Salamah. iugaza.edu

Lecture 4 Image Enhancement in Spatial Domain

Lecture 4. Digital Image Enhancement. 1. Principle of image enhancement 2. Spatial domain transformation. Histogram processing

Intensity Transformations and Spatial Filtering

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Image Enhancement in Spatial Domain (Chapter 3)

Intensity Transformation and Spatial Filtering

Image Enhancement: To improve the quality of images

UNIT - 5 IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Digital Image Processing

EE795: Computer Vision and Intelligent Systems

Introduction to Digital Image Processing

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

Vivekananda. Collegee of Engineering & Technology. Question and Answers on 10CS762 /10IS762 UNIT- 5 : IMAGE ENHANCEMENT.

Sampling and Reconstruction

Digital Image Processing. Image Enhancement in the Spatial Domain (Chapter 4)

Introduction to Digital Image Processing

Outlines. Medical Image Processing Using Transforms. 4. Transform in image space

Chapter 3 Image Enhancement in the Spatial Domain

Lecture 4: Spatial Domain Transformations

Filtering and Enhancing Images

IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

ECG782: Multidimensional Digital Signal Processing

Digital Image Analysis and Processing

In this lecture. Background. Background. Background. PAM3012 Digital Image Processing for Radiographers

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

ECG782: Multidimensional Digital Signal Processing

Digital Image Processing. Image Enhancement - Filtering

Selected Topics in Computer. Image Enhancement Part I Intensity Transformation

Biomedical Image Analysis. Spatial Filtering

3.4& Fundamentals& mechanics of spatial filtering(page 166) Spatial filter(mask) Filter coefficients Filter response

Sharpening through spatial filtering

IMAGING. Images are stored by capturing the binary data using some electronic devices (SENSORS)

Classification of image operations. Image enhancement (GW-Ch. 3) Point operations. Neighbourhood operation

1.Some Basic Gray Level Transformations

Digital Image Processing

IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations

Digital Image Processing

INTENSITY TRANSFORMATION AND SPATIAL FILTERING

Image Processing. Traitement d images. Yuliya Tarabalka Tel.

Point operation Spatial operation Transform operation Pseudocoloring

Basic Algorithms for Digital Image Analysis: a course

C2: Medical Image Processing Linwei Wang

Point Operations. Prof. George Wolberg Dept. of Computer Science City College of New York

Point Operations and Spatial Filtering

What will we learn? Neighborhood processing. Convolution and correlation. Neighborhood processing. Chapter 10 Neighborhood Processing

Point and Spatial Processing

EECS 556 Image Processing W 09. Image enhancement. Smoothing and noise removal Sharpening filters

Basic relations between pixels (Chapter 2)

Chapter4 Image Enhancement

Chapter - 2 : IMAGE ENHANCEMENT

An introduction to image enhancement in the spatial domain.

Motivation. Intensity Levels

Digital Image Processing. Lecture # 3 Image Enhancement

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

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

Digital Image Processing

SYDE 575: Introduction to Image Processing

Digital Image Processing, 3rd ed. Gonzalez & Woods

Motivation. Gray Levels

Digital Image Processing. Image Enhancement (Point Processing)

Histograms. h(r k ) = n k. p(r k )= n k /NM. Histogram: number of times intensity level rk appears in the image

Islamic University of Gaza Faculty of Engineering Computer Engineering Department

Broad field that includes low-level operations as well as complex high-level algorithms

Digital Image Processing

Edge and local feature detection - 2. Importance of edge detection in computer vision

Lecture No Image Enhancement in SpaPal Domain (course: Computer Vision)

Review for Exam I, EE552 2/2009

CS334: Digital Imaging and Multimedia Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Unit - I Computer vision Fundamentals

JNTUWORLD. 4. Prove that the average value of laplacian of the equation 2 h = ((r2 σ 2 )/σ 4 ))exp( r 2 /2σ 2 ) is zero. [16]

Digital Image Processing. Lecture 6

Image Enhancement. Digital Image Processing, Pratt Chapter 10 (pages ) Part 1: pixel-based operations

Image Processing. BITS Pilani. Dr Jagadish Nayak. Dubai Campus

Digital Image Fundamentals

Digital Image Processing

CS4733 Class Notes, Computer Vision

Segmentation and Grouping

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations II

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

Lecture Image Enhancement and Spatial Filtering

Ulrik Söderström 16 Feb Image Processing. Segmentation

Other Linear Filters CS 211A

Image gradients and edges April 11 th, 2017

Lecture 6: Edge Detection

Image gradients and edges April 10 th, 2018

Image Restoration and Reconstruction

Intensity Transformations. Digital Image Processing. What Is Image Enhancement? Contents. Image Enhancement Examples. Intensity Transformations

Fundamentals of Digital Image Processing

Announcements. Edge Detection. An Isotropic Gaussian. Filters are templates. Assignment 2 on tracking due this Friday Midterm: Tuesday, May 3.

Anno accademico 2006/2007. Davide Migliore

2D Image Processing INFORMATIK. Kaiserlautern University. DFKI Deutsches Forschungszentrum für Künstliche Intelligenz

An Introduc+on to Mathema+cal Image Processing IAS, Park City Mathema2cs Ins2tute, Utah Undergraduate Summer School 2010

Chapter 10: Image Segmentation. Office room : 841

Transcription:

EEM 463 Introduction to Image Processing Week 3: Intensity Transformations Fall 2013 Instructor: Hatice Çınar Akakın, Ph.D. haticecinarakakin@anadolu.edu.tr Anadolu University

Enhancement Domains Spatial Domain: image plane itself, direct manipulation of pixels Transform domain: process on the transform domain coefficients Spatial domain process g( x, y) T[ f ( x, y)]) f ( x, y) :input image g( x, y) : output image T : an operator on f defined over a neighborhood of point ( xy, )

Enhanced Images For human vision Evaluation of image quality is a highly subjective process No standard for a for a good image definition For machine perception Evaluation of image quality is easier Best machine results represents the good image Trail and error is necessary to select an appropriate image enhancement approach. e.g. a method that is quite useful for enhancing X-Ray images may not be the best for satellite images taken in infrared band of EM specytrum.

Intensity Transformation T : intensity transformation function s = T( r ) Point processşng Higher contrast Two-level (binary) image

Tree basic gray-level transformation f ns. Linear function: Negative and intensity transformations Logarithmic function: Log snd inverse-log transformations Power-law function: n th power and n th root transformations

Image Negatives Image negatives s L 1 r Suitable for enhancing white or gray detail embedded in dark regions of an image, especially when black area is large. Same visual content

Log Transformations Log Transformations s clog(1 r) Log curve maps a narrow range of low graylevels in input image into a wider range of output levels. Expands range of dark image pixels while shrinking bright range. Inverse log expands range of bright image pixels while shrinking dark range.

Power-Law Transformation It is also called Gamma Correction s cr

Cathode ray tube (CRT) devices have an intensity-tovoltage response that is a power function, with exponents varying from approximately 1.8 to 2.5 s r 1/2.5 This darkens the picture. Gamma correction is done by preprocessing the image before inputting it to the monitor.

a) Dark MRI. Expand gray level range for contrast manipulation γ < 1 (b) γ = 0.6, c=1 (c) γ = 0.4 (best result) (d) γ = 0.3 (limit of acceptability) When γ is reduced too much, the İmage begins to reduce contrast to the point where it starts to have a washed-out look,especially in the background

Washed-out image. Shrink gray level range γ > 1

Piecewise-Linear Transformation Functions Pro: can be arbitrarily complex Con: specification requires considerably more user input

Contrast Stretching Expands the range of intensity levels in an image so that it spans the full intensity range of the recording medium or display device.

Intensity level slicing Highlights a specific range of intensities

Bit-plane slicing highlight the contribution made to total image appearance by specific bits

Original image

Histogram Processing Histogram h( r ) r k n k is the k th k n intensity value k is the number of pixels in the image with intensity r k nk Normalized histogram pr ( k ) MN n : the number of pixels in the image of k size M N with intensity r k Estimate of the probability of occurrence of intensity level

Components of histogram are concentrated on the low side of the gray scale. Components of histogram are concentrated on the high side of the gray scale. Basis for numerous spatial domain processing techniques Provides useful image statistics Useful for image enhancement, image compression and segmentation

Histogram Equalization Probability density function (pdf) is wanted to be uniformly ditributed. s T( r) 0 r L 1 a. T(r) is a strictly monotonically increasing function in the interval 0 r L-1; b. 0 T( r) L -1 for 0 r L -1.

Tr ( ) is continuous and differentiable. r s T( r) ( L 1) p 0 r ( w) dw ds dt () r d r ( L 1) p ( ) 0 r w dw dr dr dr ( L 1) p ( r) r p ( s) ds p ( r) dr s Cumulative distribution function (cdf) r p () s s pr () r dr p ( ) ( ) 1 r r pr r ds ds ( L 1) pr ( r) L 1 dr

Histogram Equalization Discrete values: k s T( r ) ( L 1) p ( r ) k k r j j 0 k n k j L 1 ( L 1) nj k=0,1,..., L-1 MN MN j 0 j 0

Example: 3-bit image (L=8), 64x64pixels 0 s0 T( r0) 7 pr( rj) 7 0.19 1.33 j 0 1 s1 T( r1) 7 pr( rj) 7 (0.19 0.25) 3.08 j 0

Tend to spread the histogram of the input image intensity levels of the equalized image span a wider range contrast enhancement

Histogram Matching (Specification) If uniform distribution is not a good approach Generate a processed image that has a specified histogram Let p ( r) and p ( z) denote the continous probability r z density functions of the variables r and z. p ( z) is the specified probability density function. Let s be the random variable with the probability s T( r) ( L 1) p ( w) dw 0 0 Define a random variable z with the probability G( z) ( L 1) p ( t) dt s z z r r z s T ( r) ( L 1) p ( w) dw G( z) ( L 1) p ( t) dt s z G s G T r z 0 1 ( ) 1 ( ) r 0 z r

Procedure Obtain p r (r) from the input image and then obtain the values of s r s ( L 1) pr ( w) dw 0 Use the specified PDF and obtain the transformation function G(z) z G( z) ( L 1) pz( t) dt s Mapping from s to z z G 1 () s 0 p z (z) is given! Obtain the output image by equalizing the input image. For each pixel with value s in the equalized image, perform the inverse mapping to obtain output pixels.

Discrete Formulation p z (z k ): specified pdf k k ( L 1) s T( r ) ( L 1) p ( r ) n k k r j j j 0 MN j 0 Tansformation function: q G( z ) ( L 1) p ( z ) s q z i k i 0 Mapping: z G 1 ( s ) q k

(1): G(z) (2): G -1 (z)

For the details of histogram processing, read Chapter 3.1-3.3

Fundamentals of Spatial Filtering Spatial filter: spatial masks, kernels, templates or windows Filtering creates a new pixel with coordinates equal to the center of the neighborhood, with value of the result of filtering operation a b g( x, y) w( s, t) f ( x s, y t) s a t b

Spatial Correlation and Convolution Correlation is a process of moving a filter mask over the image and computing the sum of products at each location Convolution has the same mechanics but with a filter rotated by 180.

Spatial Correlation and Convolution The convolution of a filter w( x, y) of size m n with an image f ( x, y), denoted as w( x, y) f ( x, y) a w( x, y) * f ( x, y) w( s, t) f ( x s, y t) b s a t b

Smoothing Spatial Filters Output is the average of pixels caontained in the neighborhood of the filter mask Averaging filters or lowpass filters Reduce sharp transitions in intensities Used for blurring and noise reduction Blurring removes small details and connects small gaps in lines or curves They can be linear or nonlinear filters

The general implementation for filtering an M N image with a weighted averaging filter of size m n is given g( x, y) a b s a t b w( s, t) f ( x s, y t) w( s, t) where m 2a 1, n 2b 1. a b s a t b Sum of the mask coefficients: constant computed only once

To generate a mxn linear filter, we need to specify mn mask coefficients, selected based on the purpose of the filter Example: Spatial filter mask based on a continuous function of two variables, e.g. Gaussian Function:

Note that: big mask is used to eliminate small objects from an image. the size of the mask establishes the relative size of the objects that will be blended with the background.

- Blur to get gross representation of objects. - Intensity of smaller objects blend with background. - Larger objects become blob-like and easy to detect Threshold value is chosen to be 25% of the highest intensity

Order-Statistic (Nonlinear) Filters It is based on ordering (ranking) the pixels contained in the filter mask Center pixel value is replaced with the value of ranking result Median filter Max filter Min filter

Sharpening Spatial Filters Objective is to highlight transitions in intensity Spatial differentiation enhances the edges and other discontinuities Foundation 1. The first-order derivative of a one-dimensional function f(x) is the difference f f ( x 1) f ( x) x 2. The second-order derivative of f(x) as the difference 2 f f ( x 1) f ( x 1) 2 f ( x) 2 x

The Laplacian Operator Isotropic filter: response independent of the direction of the discontinuities in the image (rotation invariant) Laplacian of a function f(x,y): Discrete form: f x f y 2 2 2 f 2 2 2 f f ( x 1, y) f ( x 1, y) 2 f ( x, y) 2 x 2 f f ( x, y 1) f ( x, y 1) 2 f ( x, y) 2 y 2 f f x y f x y f x y f x y ( 1, ) ( 1, ) (, 1) (, 1) - 4 f ( x, y)

Unsharp masking and Highboost Filtering Unsharp masking: Blur the original image f(x, y) f(x, y) Subtract the blurred image f(x, y) from the original image f(x, y) mask Add the mask to the original image: g mask = f x, y f(x, y) g x, y = f x, y + k g mask x, y k 0 k = 1 unsharp masking k > 1 highboost filtering

Image Sharpening based on First-Order Derivatives For function f ( x, y), the gradient of f at coordinates ( x, y) is defined as f gx x f grad( f) g y f y The magnitude of vector f, denoted as M ( x, y) Gradient Image M ( x, y) mag( f ) gx g y 2 2

M ( x, y) g g x y Robert s crossgradient operators Sobel operators

Sobel Operators M ( x, y) ( z 2 z z ) ( z 2 z z ) 7 8 9 1 2 3 ( z 2 z z ) ( z 2 z z ) 3 6 9 1 4 7

Combining Spatial Enhamement Methods

Calculating the histogram % % reading image from the file im = imread('c:\users\user\documents\documents\eem463\butterflyyorkshire_rose.jpg'); im1 = double(rgb2gray(im)); % size of the image [M N]= size(im1); for k = 0:255 p(k+1) = sum(sum(im1==k)); end bar(0:255,p);

Normalizing an image i1 = load('clown'); whos i1 i1 figure;image(x); colormap(map); mx = max(max(x)); mn = min(min(x)); imn = 255*(X-mn)/(mx-mn);