Image processing Honza Černocký, ÚPGM. 1D signal 2.

Slides:



Advertisements
Similar presentations
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 4 – Digital Image Representation Klara Nahrstedt Spring 2009.
Advertisements

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Fourier Transform (Chapter 4)
Fourier Transform – Chapter 13. Image space Cameras (regardless of wave lengths) create images in the spatial domain Pixels represent features (intensity,
Chapter Four Image Enhancement in the Frequency Domain.
Computer Vision Lecture 16: Texture
Digital Image Processing
Templates, Image Pyramids, and Filter Banks Slides largely from Derek Hoeim, Univ. of Illinois.
School of Computing Science Simon Fraser University
Digital Image Processing
Computer Graphics Recitation 6. 2 Motivation – Image compression What linear combination of 8x8 basis signals produces an 8x8 block in the image?
Digital Image Processing Chapter 4: Image Enhancement in the Frequency Domain.
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
Introduction to Computer Vision CS / ECE 181B  Handout #4 : Available this afternoon  Midterm: May 6, 2004  HW #2 due tomorrow  Ack: Prof. Matthew.
SWE 423: Multimedia Systems Chapter 7: Data Compression (3)
Image Enhancement.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
SWE 423: Multimedia Systems Chapter 7: Data Compression (5)
Systems: Definition Filter
Linear Algebra and Image Processing
Tal Mor  Create an automatic system that given an image of a room and a color, will color the room walls  Maintaining the original texture.
EE513 Audio Signals and Systems Digital Signal Processing (Systems) Kevin D. Donohue Electrical and Computer Engineering University of Kentucky.
Transition Converter " Supply signals from new antennas to old correlator. " Will be discarded or abandoned in place when old correlator is turned off.
Discrete-Time and System (A Review)
Chapter 2. Image Analysis. Image Analysis Domains Frequency Domain Spatial Domain.
IIS for Image Processing Michael J. Watts
Motivation Music as a combination of sounds at different frequencies
Image Processing Fourier Transform 1D Efficient Data Representation Discrete Fourier Transform - 1D Continuous Fourier Transform - 1D Examples.
AM modulation essentially consists of the TD multiplication of the modulating signal by a cosine carrier. In the FD, AM modulation effected a frequency.
CSC589 Introduction to Computer Vision Lecture 8
Transforms. 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
1 Chapter 5 Image Transforms. 2 Image Processing for Pattern Recognition Feature Extraction Acquisition Preprocessing Classification Post Processing Scaling.
1 Lecture III Shobhit Niranjan Gaurav Gupta. 2 Convolution Definition: For discrete functions: Properties Commutativity Associativity Distributivity.
Templates, Image Pyramids, and Filter Banks
1 Lecture 1 1 Image Processing Eng. Ahmed H. Abo absa
Digital Image Processing Chapter 4 Image Enhancement in the Frequency Domain Part I.
1 Lecture 1: February 20, 2007 Topic: 1. Discrete-Time Signals and Systems.
Digital Image Processing (Digitaalinen kuvankäsittely) Exercise 2
COMP322/S2000/L171 Robot Vision System Major Phases in Robot Vision Systems: A. Data (image) acquisition –Illumination, i.e. lighting consideration –Lenses,
CSC508 Convolution Operators. CSC508 Convolution Arguably the most fundamental operation of computer vision It’s a neighborhood operator –Similar to the.
Digital filters Honza Černocký, ÚPGM. Aliases Numerical filters Discrete systems Discrete-time systems etc. 2.
Dr. Scott Umbaugh, SIUE Discrete Transforms.
Autonomous Robots Vision © Manfred Huber 2014.
Fourier Transform.
Introduction to JPEG m Akram Ben Ahmed
G52IIP, School of Computer Science, University of Nottingham 1 Image Transforms Basic idea Input Image, I(x,y) (spatial domain) Mathematical Transformation.
Spectral analysis and discrete Fourier transform Honza Černocký, ÚPGM.
Fourier transform.
Masaki Hayashi 2015, Autumn Visualization with 3D CG Digital 2D Image Basic.
Fourier Transform (Chapter 4) CS474/674 – Prof. Bebis.
Digital Image Processing Lecture 8: Fourier Transform Prof. Charlene Tsai.
CE Digital Signal Processing Fall Discrete-time Fourier Transform
A Simple Image Compression : JPEG
Last update on June 15, 2010 Doug Young Suh
Digital 2D Image Basic Masaki Hayashi
IIS for Image Processing
Image Pyramids and Applications
CSI-447: Multimedia Systems
Fourier Transform.
Image filtering Images by Pawan Sinha.
Chapter 8 The Discrete Fourier Transform
Magnetic Resonance Imaging
Digital Image Procesing Unitary Transforms Discrete Fourier Trasform (DFT) in Image Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL.
Intensity Transformation
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Lecture 4 Image Enhancement in Frequency Domain
Review and Importance CS 111.
Templates and Image Pyramids
Presentation transcript:

Image processing Honza Černocký, ÚPGM

1D signal 2

Images 2D – grayscale photo Multiple 2D – color photo 3D – medical imaging, vector graphics, point-clouds (depth information, Kinect) Video – time is another dimension 3

Image 4 K L

Mathematically 5

Representation of pixels For storage – quantization 8 (normal) / 16 (HDR) bits 0…255 etc For computing [0…1] floats 6

Operations on pixels – more brightness 7

Operations on pixels – less brightness 8

More contrast 9

Less contrast 10

What about bad values ? x[k,l] 1 Let them be … Clip them: 11

Use statistics of values Histogram 12

Histogram equalization 13

Thresholding 14

Filtering 15 signal filter signal Task ? Obtain a new signal with desired properties.

Filtering – reminder of 1D 16

Filtering – reminder of 1D 17

2D filter 18 I J

Filtering … Edge ? Insert zeros for example … 19

Coefficients h[k,l] Terminology Coefficients Mask Convolution kernel … We want them to have some sense … not to change the dynamics of the signal 20

Wire 21

Smoothing 22

Vertical edge detector 23

What to do with negative samples? Let them as they are for further computation… Or convert to [0…1] for visualization – for example take absolute value 24

Horizontal edge detector 25

Both together … 26

Denoising… Mask 9x9, values 1/81 … zoom noise_low_pass.png 27

Denoising II – median filter zoom noise_median.png 28

Spectral analysis Task: Determine, what is in the signal on different frequencies Why ? –Visualization, –Feature extraction (think of Facebook) –Filtering (conversion to spectral domain and multiplication therein can be more efficient) –Coding (think of JPEG) 29

Reminder – 1D What is in ? 30

Reminder – 1D cosine bases 31 Problem with the phase – the signal “wave” begins not necessarily at zero …

OK … 32

Also OK … 33

Bad bad bad  34 How come zero when ?

Complex exponentials 35

36

37

1D ultimate result - DFT 38

Now finally 2D Correlation = determination of similarity = projection to bases We have seen this, it’s boring, it’s all the time the same … YES IT IS ! 39

Analyzing signal = d.c. c=4.8287e+03 c=6.8287e+03 c=8.8287e+03 40

Analyzzing signal – horizontal cosine 41 Changes only in one direction We’ll need to visualize negative values too.

Geeks: how to do this in Matlab ?? 42

Analysis for 43 c=4.5475e-13 c=2500 c=3.4106e-13

2 x faster horizontal cos 44 c=2.9843e-13 c=1.5064e-12 c=2.5000e+03

Vertical cos 45 c= e-14 c=2.5000e+03 c=6.9944e-13

2 x faster vertical cos 46 c= e-13 c=2.5000e+03 c=

Mix of both directions … 47

Generalization m/K – horizontal frequency n/L – vertical frequency 48

Reasonable ranges of frequencies ? m/K and n/L 0 … ½ => OK > ½ => hm… 49 K L x[k,l] X[k,l] K/2 L/2 0 0

More on frequencies … 1D 2D 50

Phase – problem again  51 c=2.5000e+03 c=9.9476e-13 c= e-14

Solution – complex exponentials (again) Reminder what is what : k,l indices of pixels (input) m,n indices of frequencies (result) m/K normalized vertical frequency n/L normalized horizontal frequency 52

Imagining it I. 53

Imagining it II. 54

Correlation with x[n] 55 Re(c) = 2500 Im(c) = 0 |c| = 2500

Correlation with x[n] 56 Re(c) = 1250 Im(c) = |c| = 2500

Correlation with x[n] 57 Re(c) = -772 Im(c) = 2378 |c| = 2500

Change in both directions…X[7,3] 58 Re(c) = 0 Im(c) = 0 |c| = 0 … not similar

Change in both directions…X[7,3] 59 Re(c) = 2165 Im(c) = 1250 |c| = 2500 … similar

2D DFT using 2 x 1D DFT so that 60

2D DFT for a real signal 61

62

Something with higher frequencies 63

64

DFT produces K x L points ! 65 K L x[k,l] K L X[k,l]

The whole result for k=0…K-1, l=0…L-1 66

Symmetry ? Source: 67 K/2 0 K-1 0 L/2 L-1

Re-shuffling… Low frequencies to the center 68

Inverse 2D DFT 69

Playing with frequencies 70

71

DCT Why ? People don’t like complex exponentials People don’t like symmetries and “useless” values … For image K x L, we want K x L real values. 72

1D DCT 73 + normalization of coefficients…

2D DCT bases Source: screte_cosine_transform#Mult idimensional_DCTs screte_cosine_transform#Mult idimensional_DCTs 74

Filtering in DCT 75

76

JPEG Source: More in computer graphics courses and lab exercise. 77

SUMMARY Image is a 2D signal Filtering –Convolution, analogy with 1D FIR filters –No feedback (IIR) in images Sweeping mask over the image, multiplying everything that is underneath with its coefficients, adding. 78

SUMMARY II. Frequency analysis 2D –Similar to 1D – projection to bases –Image frequencies also have some sense. –Cos bases are a good exercise, but not enough. 2D DFT –Projection/similarity/correlation with complex exponentials –Coefficients are complex – magnitude and angle. –Lots of symmetries in the resulting DFT matrix –Can use spectrum for filtering 79

SUMMARY III. DCT –2x „slower“ bases than DFT –Slightly More complicated definition –Produces real coefficients, low frequencies (only!) at the beginning. –Use in JPEG 80

TO BE DONE Determining frequency response of a 2D filter How is it exactly with the symmetries of 2D DFT ? Why are 1D and 2D DCT exactly defined and why this half-sample shift ? Colors (color models, etc). How does the face matching on Facebook work? –Hint: /yann-lecun/ /yann-lecun/ 81

The END 82