EE4H, M.Sc 0407191 Computer Vision Dr. Mike Spann

Slides:



Advertisements
Similar presentations
3-D Computer Vision CSc83020 / Ioannis Stamos  Revisit filtering (Gaussian and Median)  Introduction to edge detection 3-D Computater Vision CSc
Advertisements

Image Processing Lecture 4
Image Pre-Processing Image pre-processing (předzpracování obrazu) –transformations of the input image leading to noise reduction, image improvement or.
Fourier Transform (Chapter 4)
Image processing (spatial &frequency domain) Image processing (spatial &frequency domain) College of Science Computer Science Department
Chap 4 Image Enhancement in the Frequency Domain.
Lecture 14 The frequency Domain (2) Dr. Masri Ayob.
E.G.M. PetrakisFiltering1 Linear Systems Many image processing (filtering) operations are modeled as a linear system Linear System δ(x,y) h(x,y)
Digital image processing Chapter 6. Image enhancement IMAGE ENHANCEMENT Introduction Image enhancement algorithms & techniques Point-wise operations Contrast.
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Image enhancement in the spatial domain. Human vision for dummies Anatomy and physiology Wavelength Wavelength sensitivity.
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Reminder Fourier Basis: t  [0,1] nZnZ Fourier Series: Fourier Coefficient:
Chapter 4 Image Enhancement in the Frequency Domain.
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F(  ) is the spectrum of the function.
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
Image Enhancement.
Chapter 4 Image Enhancement in the Frequency Domain.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters A filter is something that attenuates or enhances particular frequencies Easiest to visualize.
Introduction to Image Processing Grass Sky Tree ? ? Review.
Presentation Image Filters
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
University of Ioannina - Department of Computer Science Intensity Transformations (Point Processing) Christophoros Nikou Digital Image.
Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain Digital Image Processing Chapter # 4 Image Enhancement in Frequency Domain.
Image Processing © 2002 R. C. Gonzalez & R. E. Woods Lecture 4 Image Enhancement in the Frequency Domain Lecture 4 Image Enhancement.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
09/19/2002 (C) University of Wisconsin 2002, CS 559 Last Time Color Quantization Dithering.
Technion, CS department, SIPC Spring 2014 Tutorials 12,13 discrete signals and systems 1/39.
ENG4BF3 Medical Image Processing Image Enhancement in Frequency Domain.
Intensity Transformations (Histogram Processing)
Chapter 5: Neighborhood Processing
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain 22 June 2005 Digital Image Processing Chapter 4: Image Enhancement in the.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
8-1 Chapter 8: Image Restoration Image enhancement: Overlook degradation processes, deal with images intuitively Image restoration: Known degradation processes;
Ch5 Image Restoration CS446 Instructor: Nada ALZaben.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Course 2 Image Filtering. Image filtering is often required prior any other vision processes to remove image noise, overcome image corruption and change.
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
7- 1 Chapter 7: Fourier Analysis Fourier analysis = Series + Transform ◎ Fourier Series -- A periodic (T) function f(x) can be written as the sum of sines.
Frequency Domain Processing Lecture: 3. In image processing, linear systems are at the heart of many filtering operations, and they provide the basis.
University of Ioannina - Department of Computer Science Filtering in the Frequency Domain (Application) Digital Image Processing Christophoros Nikou
Practical Image Processing1 Chap7 Image Transformation  Image and Transformed image Spatial  Transformed domain Transformation.
Digital Image Processing EEE415 Lecture 3
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
2D Sampling Goal: Represent a 2D function by a finite set of points.
Fourier Transform.
November 5, 2013Computer Vision Lecture 15: Region Detection 1 Basic Steps for Filtering in the Frequency Domain.
Dr. Abdul Basit Siddiqui FUIEMS. QuizTime 30 min. How the coefficents of Laplacian Filter are generated. Show your complete work. Also discuss different.
Computer Graphics & Image Processing Chapter # 4 Image Enhancement in Frequency Domain 2/26/20161.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Digital Image Processing Image Enhancement in Spatial Domain
Image Enhancement in the Spatial Domain.
Digital Image Processing , 2008
Miguel Tavares Coimbra
- photometric aspects of image formation gray level images
DIGITAL SIGNAL PROCESSING ELECTRONICS
Image enhancement algorithms & techniques Point-wise operations
Image Deblurring and noise reduction in python
Digital 2D Image Basic Masaki Hayashi
General Functions A non-periodic function can be represented as a sum of sin’s and cos’s of (possibly) all frequencies: F() is the spectrum of the function.
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Digital Image Processing Week IV
Digital Image Procesing Unitary Transforms Discrete Fourier Trasform (DFT) in Image Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL.
Digital Image Procesing Unitary Transforms Discrete Fourier Trasform (DFT) in Image Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL.
Lecture 4 Image Enhancement in Frequency Domain
Presentation transcript:

EE4H, M.Sc Computer Vision Dr. Mike Spann

Introduction Images may suffer from the following degradations: Poor contrast due to poor illumination or finite sensitivity of the imaging device Electronic sensor noise or atmospheric disturbances leading to broad band noise Aliasing effects due to inadequate sampling Finite aperture effects or motion leading to spatial

Introduction We will consider simple algorithms for image enhancement based on lookup tables Contrast enhancement We will also consider simple linear filtering algorithms Noise removal

Histogram equalisation In an image of low contrast, the image has grey levels concentrated in a narrow band Define the grey level histogram of an image h(i) where : h(i)=number of pixels with grey level = i For a low contrast image, the histogram will be concentrated in a narrow band The full greylevel dynamic range is not used

Histogram equalisation

Can use a sigmoid lookup to map input to output grey levels A sigmoid function g(i) controls the mapping from input to output pixel Can easily be implemented in hardware for maximum efficiency

Histogram equalisation

θ controls the position of maximum slope λ controls the slope Problem - we need to determine the optimum sigmoid parameters and for each image A better method would be to determine the best mapping function from the image data

Histogram equalisation A general histogram stretching algorithm is defined in terms of a transormation g(i) We require a transformation g(i) such that from any histogram h(i) :

Histogram equalisation Constraints (N x N x 8 bit image) No ‘crossover’ in grey levels after transformation

Histogram equalisation An adaptive histogram equalisation algorithm can be defined in terms of the ‘cumulative histogram’ H(i) :

Histogram equalisation Since the required h(i) is flat, the required H(i) is a ramp: h(i)H(i)

Histogram equalisation Let the actual histogram and cumulative histogram be h(i) and H(i) Let the desired histogram and desired cumulative histogram be h’(i) and H’(i) Let the transformation be g(i)

Histogram equalisation Since g(i) is an ‘ordered’ transformation

Histogram equalisation Worked example, 32 x 32 bit image with grey levels quantised to 3 bits

Histogram equalisation         7 113

Histogram equalisation

ImageJ demonstration

Image Filtering Simple image operators can be classified as 'pointwise' or 'neighbourhood' (filtering) operators Histogram equalisation is a pointwise operation More general filtering operations use neighbourhoods of pixels

Image Filtering

The output g(x,y) can be a linear or non-linear function of the set of input pixel grey levels {f(x-M,y- M)…f(x+M,y+M}.

Image Filtering Examples of filters:

Linear filtering and convolution Example 3x3 arithmetic mean of an input image (ignoring floating point byte rounding)

Linear filtering and convolution Convolution involves ‘overlap – multiply – add’ with ‘convolution mask’

Linear filtering and convolution

We can define the convolution operator mathematically Defines a 2D convolution of an image f(x,y) with a filter h(x,y)

Linear filtering and convolution Example – convolution with a Gaussian filter kernel σ determines the width of the filter and hence the amount of smoothing

Linear filtering and convolution σ

Original Noisy Filtered σ=1.5 Filtered σ=3.0

Linear filtering and convolution ImageJ demonstration

Linear filtering and convolution We can also convolution to be a frequency domain operation Based on the discrete Fourier transform F(u,v) of the image f(x,y)

Linear filtering and convolution The inverse DFT is defined by

Linear filtering and convolution

F(u,v) is the frequency content of the image at spatial frequency position (u,v) Smooth regions of the image contribute low frequency components to F(u,v) Abrupt transitions in grey level (lines and edges) contribute high frequency components to F(u,v)

Linear filtering and convolution We can compute the DFT directly using the formula An N point DFT would require N 2 floating point multiplications per output point Since there are N 2 output points, the computational complexity of the DFT is N 4 N 4 =4x10 9 for N=256 Bad news! Many hours on a workstation

Linear filtering and convolution The FFT algorithm was developed in the 60’s for seismic exploration Reduced the DFT complexity to 2N 2 log 2 N 2N 2 log 2 N~10 6 for N=256 A few seconds on a workstation

Linear filtering and convolution The ‘filtering’ interpretation of convolution can be understood in terms of the convolution theorem The convolution of an image f(x,y) with a filter h(x,y) is defined as:

Linear filtering and convolution

Note that the filter mask is shifted and inverted prior to the ‘overlap multiply and add’ stage of the convolution Define the DFT’s of f(x,y),h(x,y), and g(x,y) as F(u,v),H(u,v) and G(u,v) The convolution theorem states simply that :

Linear filtering and convolution As an example, suppose h(x,y) corresponds to a linear filter with frequency response defined as follows: Removes low frequency components of the image

Linear filtering and convolution DFT IDFT

Linear filtering and convolution Frequency domain implementation of convolution Image f(x,y) N x N pixels Filter h(x,y) M x M filter mask points Usually M<<N In this case the filter mask is 'zero-padded' out to N x N The output image g(x,y) is of size N+M-1 x N+M-1 pixels. The filter mask ‘wraps around’ truncating g(x,y) to an N x N image

Linear filtering and convolution

We can evaluate the computational complexity of implementing convolution in the spatial and spatial frequency domains N x N image is to be convolved with an M x M filter Spatial domain convolution requires M 2 floating point multiplications per output point or N 2 M 2 in total Frequency domain implementation requires 3x(2N 2 log 2 N) + N 2 floating point multiplications ( 2 DFTs + 1 IDFT + N 2 multiplications of the DFTs)

Linear filtering and convolution Example 1, N=512, M=7 Spatial domain implementation requires 1.3 x 10 7 floating point multiplications Frequency domain implementation requires 1.4 x 10 7 floating point multiplications Example 2, N=512, M=32 Spatial domain implementation requires 2.7 x 10 8 floating point multiplications Frequency domain implementation requires 1.4 x 10 7 floating point multiplications

Linear filtering and convolution For smaller mask sizes, spatial and frequency domain implementations have about the same computational complexity However, we can speed up frequency domain interpretations by tessellating the image into sub- blocks and filtering these independently Not quite that simple – we need to overlap the filtered sub-blocks to remove blocking artefacts Overlap and add algorithm

Linear filtering and convolution We can look at some examples of linear filters commonly used in image processing and their frequency responses In particular we will look at a smoothing filter and a filter to perform edge detection

Linear filtering and convolution Smoothing (low pass) filter Simple arithmetic averaging Useful for smoothing images corrupted by additive broad band noise

Linear filtering and convolution Spatial domainSpatial frequency domain

Linear filtering and convolution Edge detection filter Simple differencing filter used for enhancing edged Has a bandpass frequency response

Linear filtering and convolution ImageJ demonstration

Linear filtering and convolution

We can evaluate the (1D) frequency response of the filter h(x)={1,0,-1 } from the DFT definition

Linear filtering and convolution The magnitude of the response is therefore: This has a bandpass characteristic

Linear filtering and convolution

Conclusion We have looked at basic (low level) image processing operations Enhancement Filtering These are usually important pre-processing steps carried out in computer vision systems (often in hardware)