Basic Algorithms for Digital Image Analysis: a course

Similar documents
Gray-level histogram. Intensity (grey-level) transformation, or mapping. Use of intensity transformations:

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

Basic Algorithms for Digital Image Analysis: a course

Lecture 4 Image Enhancement in Spatial Domain

IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations

Digital Image Processing. Lecture # 3 Image Enhancement

Intensity Transformation and Spatial Filtering

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

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

UNIT - 5 IMAGE ENHANCEMENT IN SPATIAL DOMAIN

EE663 Image Processing Histogram Equalization I

Basic Algorithms for Digital Image Analysis: a course

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

Intensity Transformations and Spatial Filtering

IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

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

Chapter 3: Intensity Transformations and Spatial Filtering

Digital Image Processing

Basic Algorithms for Digital Image Analysis: a course

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

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

Digital Image Processing. Image Enhancement (Point Processing)

Basic relations between pixels (Chapter 2)

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

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

Original grey level r Fig.1

Digital Image Analysis and Processing

Sampling and Reconstruction

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

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

Point operation Spatial operation Transform operation Pseudocoloring

Introduction to Digital Image Processing

Image Enhancement in Spatial Domain (Chapter 3)

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

Digital Image Processing

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

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

EE795: Computer Vision and Intelligent Systems

Lecture 4: Spatial Domain Transformations

Digital Image Processing

1.Some Basic Gray Level Transformations

Image Restoration and Reconstruction

Introduction to Digital Image Processing

Comparative Study of Linear and Non-linear Contrast Enhancement Techniques

INTENSITY TRANSFORMATION AND SPATIAL FILTERING

Digital Image Processing

Digital Image Fundamentals

Computer Vision & Digital Image Processing. Image segmentation: thresholding

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 I

Image Restoration and Reconstruction

Digital Image Processing

Motivation. Intensity Levels

Image Enhancement: To improve the quality of images

Chapter - 2 : IMAGE ENHANCEMENT

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

Image Processing Lecture 10

Lecture #5. Point transformations (cont.) Histogram transformations. Intro to neighborhoods and spatial filtering

Digital Image Processing, 3rd ed. Gonzalez & Woods

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

ELEN E4830 Digital Image Processing. Homework 3 Solution

Computer Vision I - Basics of Image Processing Part 1

Selected Topics in Computer. Image Enhancement Part I Intensity Transformation

An Intuitive Explanation of Fourier Theory

Lecture 3 - Intensity transformation

Part 3: Image Processing

Motivation. Gray Levels

Computer Vision I - Filtering and Feature detection

Image Enhancement 3-1

5. Feature Extraction from Images

(0, 1, 1) (0, 1, 1) (0, 1, 0) What is light? What is color? Terminology

Digital Image Processing. Lecture # 15 Image Segmentation & Texture

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

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

An introduction to image enhancement in the spatial domain.

Computer Vision 2. SS 18 Dr. Benjamin Guthier Professur für Bildverarbeitung. Computer Vision 2 Dr. Benjamin Guthier

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

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

ECG782: Multidimensional Digital Signal Processing

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

Digital Image Processing

Filtering and Enhancing Images

Image Contrast Enhancement in Wavelet Domain

Digital Image Processing COSC 6380/4393

CoE4TN4 Image Processing. Chapter 5 Image Restoration and Reconstruction

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

Digital image processing

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

Texture. Texture is a description of the spatial arrangement of color or intensities in an image or a selected region of an image.

TEXTURE. Plan for today. Segmentation problems. What is segmentation? INF 4300 Digital Image Analysis. Why texture, and what is it?

CS 490: Computer Vision Image Segmentation: Thresholding. Fall 2015 Dr. Michael J. Reale

Ulrik Söderström 17 Jan Image Processing. Introduction

Unit - I Computer vision Fundamentals

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

ECG782: Multidimensional Digital Signal Processing

Point and Spatial Processing

Texture. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors. Frequency Descriptors

Segmentation and Grouping

Progress Report (July05-Dec05)

Transcription:

Institute of Informatics Eötvös Loránd University Budapest, Hungary Basic Algorithms for Digital Image Analysis: a course Dmitrij Csetverikov with help of Attila Lerch, Judit Verestóy, Zoltán Megyesi, Zsolt Jankó http://visual.ipan.sztaki.hu

Lecture 2: Image Enhancement Part 1: Point processing Spatial domain and frequency domain methods Neighborhood operations and intensity transformations Gray-level histogram Some useful intensity transformations: Contrast stretching and intensity normalisation Image negation Nonlinear compression of dynamic range Intensity slicing Histogram equalisation 2

Spatial domain and frequency domain methods Goal of image enhancement: Image is composed of informative pattern modified by non-informative variations. Enhance informative pattern based on image data. Examples: noise filtering, geometric correction. Two types of image enhancement methods Spatial domain methods: Procedures that operate directly on image pixels. Frequency domain methods : Procedures that operate in a transformed domain. Examples: power spectrum (Fourier), wavelets, Gabor transformation This course mainly deals with spatial domain methods. 3

Neighborhood operations Output value in image point (x, y) is determined by pixels belonging to a neighborhood of (x, y): g(x, y) = T [f(x, y)] f(x, y): input image; g(x, y): processed (output) image; T : operator on f, defined over some neighborhood of (x, y). x (x,y) Image y A 3 3 neighbourhood (window) about a point (x, y) in an image. 4

Intensity (grey-level) transformation, or mapping Neighborhood is of 1 1 size: reduces to point (x, y) itself (point processing). Output value depends only on intensity in (x, y). For simplicity of notation: r. = f(x, y), s. = g(x, y). Intensity transformation T maps r onto s: s = T (r) Basic properties of intensity transformations: Same intensities transform in the same way: position independent. Even local context neglected: no structure taken into account. Can only reduce noise when noise intensity is distinct; otherwise, can even amplify noise. 5

Use of intensity transformations: Contrast stretching: Increase contrast. Intensity range normalisation: Make intensities fall into specified range (usually, [0, 255]). Background removal: Remove irrelevant intensities. Pattern enhancement: Enhance relevant intensities. Normalise images to compare images to compare image descriptions 6

Gray-level histogram Gray-level histogram p(k) is occurrence probability (frequency) of grey level k in an image: where p(k) = n k n k = 0, 1,..., L 1: grey level (L is number of grey levels); n k : number of pixels with grey level k; n: total number of pixels. 7

Intensity histogram is computed in one scan of image f(x, y) Allocate array p(k), set all p(k) = 0. Scan pixels (x, y). When f(x, y) = k, increment p new (k) = p old (k) + 1. Histogram provides global description of appearance: No structural information Take structured image (shape or periodic pattern). Re-arrange pixels in random way. Obtain random image with same histogram. 8

Basic types of grey-level histograms: Too dark: grey levels concentrate at the dark end. Too light: grey levels concentrate at the light end. Low contrast (narrow dynamic range): grey levels concentrate in the middle. Good contrast: significant spread of histogram. 9

too dark too light low contrast good contrast Images and their histograms. 10

Some useful intensity transformations Contrast stretching Intensity normalisation Image negation Nonlinear compression of dynamic range Intensity slicing Histogram equalisation 11

Contrast stretching Purpose: Increase dynamic range of intensities in low-contrast images. Why low contrast? poor illumination low dynamics of sensor wrong setting of lens aperture Basic properties of contrast stretching: Contrast stretching transformation function must be single-valued and monotonically increasing Preserve order of grey levels: no artefacts The greater the slope the higher the contrast (spread) at that range. 12

s = T(r) s = T(r) Dark Light Dark m T(r) Light r Dark Light Dark m T(r) Light r CONTRAST STRETCHING BINARISATION Gray-level transformation functions for contrast stretching and binarisation. Binarisation (thresholding) is a special case of contrast stretching. Effect: Obtain binary image by setting to zero all intensities below a threshold and to maximum value all other intensities. Meaning: Separate object from background assuming 2 distinct intensity classes. 13

Piecewise-linear contrast stretching Points (r 1, s 1 ) and (r 2, s 2 ) control shape of transformation function. Binarisation is special case of piecewise-linear contrast stretching: r 1 = r 2, s 1 = 0, s 2 = L 1. L-1 (r,s ) 2 2 s T(r) (r,s ) 1 1 0 r L-1 Piecewise-linear approximation of contrast stretching. 14

low contrast stretched Example of contrast enhancement. cell image binarised cell Example of binarisation (thresholding). 15

Intensity normalisation (rescaling) Purpose: Normalise range of intensities to make their values fall into a standard range. Reason: Image processing operations may produce values that are beyond the initial range of intensities. It may be desirable to preserve the range and storage type (e.g., byte/pixel). Solution: Let r [r 1, r 2 ] be the original intensity and s = T (r) a transformation that modifies the range [r 1, r 2 ] to [s 1, s 2 ], where s 1 = min r [r1,r 2 ]T (r) s 2 = max r [r1,r 2 ]T (r) 16

The output intensity s should be normalised so as to fall in the original range: s = T (s) [r 1, r 2 ] This is achieved by the following linear transformation: T (s) = r 2 r 1 s 2 s 1 [T (s) s 1 ] + r 1 Before applying the transformation, check that s 2 s 1. Prove that T (s) [r 1, r 2 ]! 17

Image negation Action: Reverse the order of intensities. Application: Negate image of positive film and use the resulting negative as normal slide. L-1 s T(r) 0 L-1 transformation image negative Obtaining the negative of an image. 18

Compression of dynamic range Action: Compress dynamic range of image. Application: Dynamics of processed image may exceed the capabilities of display or film. Only brightest parts visible, dark parts suppressed. Typical for some medical imagery (e.g., x-ray) and Fourier spectra. Solution: s = c log (1 + r ) where c is a scaling constant. 19

L-1 s T(r) 0 r R grey-level transformation function image transformation Compressing the dynamic range: Stretching the dark intensities of an image with dark intensities suppressed. 20

Gray-level slicing Action: Highlight a specific range of intensities and/or suppress other intensities. Application: Background removal and segmentation. Example: Highlight edge pixels when their intensities fall into a narrow range. Two basic versions of slicing: Highlight a range, diminish other levels. Thresholding is a particular case of this. Highlight a range, preserve other levels. 21

L-1 L-1 s T(r) s T(r) 0 A r B L-1 0 A r B L-1 Transformation functions for intensity slicing. Left: Highlight range [A, B] while suppressing other levels. Right: Same, but preserving other levels. image suppress others preserve others Examples of intensity slicing. 22

Histogram specification and equalisation Histogram specification: Transform intensities so as to obtain a specified shape of histogram of output image. Example: Humans perceive best the images that have hyperbolic histogram. The most important case of histogram specification: Histogram equalisation, or histogram flattening. Action: The output image histogram becomes as uniform as possible. Purposes: Increase dynamic range of image. Normalise image histograms prior to comparison of images image descriptions 23

Histogram equalisation: continuous case Gray-levels r are normalised continuous quantities: r [0, 1]. Consider the transformation function s = T (r) = r 0 p r (w) dw 0 r 1 p r (w): probability density function (PDF, distribution) of original intensity r. 0 T (r) 1: cumulative distribution function (CDF) of r. T (r): single-valued and monotonically increasing. For this transformation function, the output intensity s has uniform distribution. (Prove!) 24

2 1 p (r) r 1.0 0.8 0.6 0.4 0.2 s=t(r) 1.0 0.5 p (s) s r 0 1 2 0 0.2 0.4 0.6 0.8 1.0 r 0 0.5 1.0 s Illustration of histogram equalisation (flattening). Left: Original probability density function. Center: Transformation function. Right: Resulting uniform density. 25

Histogram equalisation: discrete case The transformation is obtained by summing up the bins of the grey-level histogram: p r (r k ) = n k n 0 r k 1 and k = 0, 1,..., L 1 s k = T (r k ) = k j=0 n j n = k p r (r j ) j=0 r k = T 1 (s k ) 0 s k 1 26

image equlisation stretching dark adaptive equalis. Dynamic range increased, details better visible. Visual graininess and patchiness increased because of too few grey levels. Noise amplified. Adaptive version is better. 27