CS654: Digital Image Analysis

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

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Spatial Filtering (Chapter 3)
Motion illusion, rotating snakes. Slide credit Fei Fei Li.
CS 4487/9587 Algorithms for Image Analysis
Computer Vision Lecture 16: Texture
Computational Photography CSE 590 Tamara Berg Filtering & Pyramids.
Chapter 8 Content-Based Image Retrieval. Query By Keyword: Some textual attributes (keywords) should be maintained for each image. The image can be indexed.
E.G.M. PetrakisFiltering1 Linear Systems Many image processing (filtering) operations are modeled as a linear system Linear System δ(x,y) h(x,y)
Prof. Ramin Zabih (CS) Prof. Ashish Raj (Radiology) CS5540: Computational Techniques for Analyzing Clinical Data.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Lecture 4 Linear Filters and Convolution
BMME 560 & BME 590I Medical Imaging: X-ray, CT, and Nuclear Methods Introductory Topics Part 1.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
Computer Vision - A Modern Approach Set: Linear Filters Slides by D.A. Forsyth Differentiation and convolution Recall Now this is linear and shift invariant,
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
Computer Vision - A Modern Approach
Computer Vision Introduction to Image formats, reading and writing images, and image environments Image filtering.
CS 376b Introduction to Computer Vision 02 / 27 / 2008 Instructor: Michael Eckmann.
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.
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
Introduction to Computer Vision CS / ECE 181B Thursday, April 22, 2004  Edge detection (HO #5)  HW#3 due, next week  No office hours today.
Lecture 2: Image filtering
September 25, 2014Computer Vision Lecture 6: Spatial Filtering 1 Computing Object Orientation We compute the orientation of an object as the orientation.
Linear Filtering About modifying pixels based on neighborhood. Local methods simplest. Linear means linear combination of neighbors. Linear methods simplest.
Transforms: Basis to Basis Normal Basis Hadamard Basis Basis functions Method to find coefficients (“Transform”) Inverse Transform.
Most slides from Steve Seitz
Linear Algebra and Image Processing
ENG4BF3 Medical Image Processing
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Kavita Bala Hybrid Images, Oliva et al.,
Filtering Course web page: vision.cis.udel.edu/cv March 5, 2003  Lecture 9.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
CS654: Digital Image Analysis Lecture 15: Image Transforms with Real Basis Functions.
Transforms. 5*sin (2  4t) Amplitude = 5 Frequency = 4 Hz seconds A sine wave.
Linear Filtering – Part I Selim Aksoy Department of Computer Engineering Bilkent University
Digital Image Processing CCS331 Relationships of Pixel 1.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
Image Filtering Computer Vision CS 543 / ECE 549 University of Illinois Derek Hoiem 02/02/10.
Chapter 5: Neighborhood Processing
Lecture 5 Mask/Filter Transformation 1.The concept of mask/filters 2.Mathematical model of filtering Correlation, convolution 3.Smoother filters 4.Filter.
CS654: Digital Image Analysis Lecture 36: Feature Extraction and Analysis.
CS654: Digital Image Analysis
CS654: Digital Image Analysis
CS 691B Computational Photography
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
CS654: Digital Image Analysis Lecture 11: Image Transforms.
CSE 185 Introduction to Computer Vision Image Filtering: Spatial Domain.
Grauman Today: Image Filters Smooth/Sharpen Images... Find edges... Find waldo…
Chapter 13 Discrete Image Transforms
Spatial Filtering (Chapter 3) CS474/674 - Prof. Bebis.
Miguel Tavares Coimbra
Basic Principles Photogrammetry V: Image Convolution & Moving Window:
Linear Filters and Edges Chapters 7 and 8
Filtering – Part I Gokberk Cinbis Department of Computer Engineering
Image gradients and edges
Outline Announcement Local operations (continued) Linear filters
Computer Vision Lecture 16: Texture II
Digital Image Processing
Motion illusion, rotating snakes
Basic Image Processing
Digital Image Processing Week IV
Magnetic Resonance Imaging
Department of Computer Engineering
Lecture 2: Image filtering
Intensity Transformation
Signals and Systems Lecture 18: FIR Filters.
All about convolution.
Presentation transcript:

CS654: Digital Image Analysis Lecture 16: Convolution and Correlation

Recap of Lecture 15 Image Transforms Hadamard Transform Haar Transform KL Transform (1-D)

Outline of Lecture 16 Mask processing Correlation Convolution

Interpolation using mask 7 3 5 7 3 5 7 3 5 Input image Scaled image Zero padded image ¼ ½ 1 Interpolation mask

Mask processing 7 3 5 3.5 7 3.5 1.5 3.75 6 3 3 4 5 2.5 1.5 2 2.5 1.25 ¼ ½ 1

Introduction Basic operations to extract information from images The simplest as well as most effective operations Can be analysed and understood very well Easy to implement and can be computed very efficiently

Key Features Two key features: shift-invariant, and linear. Linear, Shift-Invariant System (LSI) Linear system Shift Invariant System 𝑓 1 𝑔 1 𝑓 2 𝑔 2 𝑓(𝑥,𝑦) 𝑔(𝑥,𝑦) 𝑓(𝑥−𝑎, 𝑦−𝑏) 𝑔(𝑥−𝑎, 𝛼𝑓 1 +𝛽 𝑓 2 𝛼𝑔 1 +𝛽 𝑔 2 Real systems cannot be strictly linear Only holds for limited displacements

Advantage of understanding LSI systems Understanding the properties of image-forming systems System shortcomings can often be discussed Transform the ideal image into the one actually observed Linear: replace every pixel with a linear combination of its neighbours Shift-invariance: same operation at every point in the image. Linear-spatial filtering

Correlation The relationship of pixels with respect to its neighborhood 1 2 3 4 5 6 7 8 9 5 4 2 3 7 6 𝐰(−𝟏) 𝐰(𝟎) 𝐰(𝟏) 𝑓 4 = 𝑓 3 +𝑓 4 +f(5) 3 𝑓 4 = 𝑓 3 3 + 𝑓 4 3 + 𝑓 5 3 = 1 3 𝑓(3)+ 1 3 𝑓(4)+ 1 3 𝑓(5) 𝑓′(𝑘)=𝑤(𝑘−1)𝑓(𝑘−1)+𝑤(𝑘)𝑓(𝑘)+𝑤(𝑘+1)𝑓(𝑘+1) 𝑓′(𝑘)= 𝑖=𝑘−1 𝑘+1 𝑤 𝑖 𝑓(𝑖) 𝐹∘𝐼 𝑥 = 𝒊=−𝒌 𝒌 𝒘 𝒊 𝒇(𝒙+𝒊)

Taking care of the boundaries 1 2 3 4 5 6 7 8 9 5 𝟏𝟏 𝟑 3 4 𝟏𝟒 𝟑 𝟏𝟕 𝟑 6 5 4 2 3 7 6 𝟏 𝟑 1 2 3 4 5 6 7 8 9 Case 1: 5 4 2 3 7 6 Zero-padding Case 2: 5 4 2 3 7 6 Replication Case 3: 6 5 4 2 3 7 Circular

Constructing a filter 𝐺 𝑥 = 1 𝜎√2𝜋 𝑒 − 𝑥−𝜇 2 2 𝜎 2 𝝁 Consider the 1-D Gaussian function 𝐺 𝑥 = 1 𝜎√2𝜋 𝑒 − 𝑥−𝜇 2 2 𝜎 2 𝝁 𝐺 𝑥 = 1 𝜎√2𝜋 𝑒 − 𝑥 2 2 𝜎 2 𝝈 1 2 𝜎=1,𝐺(𝑥) 0.053 0.242 0.399 𝐺 𝑥 _𝑁 𝑁 𝐺(𝑥) = 0.053 0.244 0.403

Derivative 𝑓 𝑥 = 𝑥 2 ⇒ 𝑓 ′ 𝑥 =2𝑥 − 𝟏 𝟐 𝟏 𝟐 𝟎 Rate of 𝑦, with respect to 𝑥, i.e. Δ𝑦 Δ𝑥 − 1 2 1 2 1 4 9 16 25 36 49 64 81 𝑓 𝑥 = 𝑥 2 ⇒ 𝑓 ′ 𝑥 =2𝑥 1 4 6 8 10 12 14 16 18 𝑓′(𝑘)=𝑤(𝑘−1)𝑓(𝑘−1)+𝑤(𝑘)𝑓(𝑘)+𝑤(𝑘+1)𝑓(𝑘+1) − 𝟏 𝟐 𝟏 𝟐 𝟎

Matching with correlation Locations in an image that are similar to a template How to measure the similarity Sum of the square of the differences 𝑖=−𝑁 𝑁 𝐹 𝑖 −𝐼(𝑥+1) 2 As the correlation between the filter and the image increases, the Euclidean distance between them decreases

Example 𝑖=−𝑁 𝑁 𝐹 𝑖 𝐼(𝑥+𝑖) 𝑖=−𝑁 𝑁 𝐹 𝑖 2 𝑖=−𝑁 𝑁 𝐼(𝑥+𝑖) 2 Normalized correlation= 3 7 5 Template 3 2 4 1 8 7 Image 3 7 5 40 43 39 34 64 85 52 27 61 65 59 84 105 75 38 Correlation 25 26 41 29 2 59 54 34 78 13 20 32 61 38 Sum of squared difference .94 .88 .73 .81 .99 .64 .59 .78 .84 .61 .93 .95 .83 .57 Normalized correlation

Correlation in 2D 𝐹∘𝐼 𝑥,𝑦 = 𝑖=−𝑁 𝑁 𝑗=−𝑁 𝑁 𝐹 𝑖,𝑗 𝐼(𝑥+𝑖,𝑦+𝑗) 𝐹∘𝐼 𝑥 = 𝑖=−𝑁 𝑁 𝐹 𝑖 𝐼(𝑥+𝑖) 𝐹∘𝐼 𝑥,𝑦 = 𝑖=−𝑁 𝑁 𝑗=−𝑁 𝑁 𝐹 𝑖,𝑗 𝐼(𝑥+𝑖,𝑦+𝑗) 𝟏 𝟗 𝟏 𝟑 𝟏 𝟑

Seperability 8 3 4 5 7 6 𝟏 𝟗 𝟎 𝟏 𝟑 𝟎 𝟏 𝟑 5.33 Input image Mask Averaged image 1 3 1 3 1 3 8 3 4 7 6 5 1 3 1 3 1 3 Reduced computational complexity?

Convolution Similar to correlation Flip over the filter before correlating 𝐹∗𝐼 𝑥 = 𝑖=−𝑁 𝑁 𝐹 𝑖 𝐼(𝑥−𝑖) 2D convolution we flip the filter both horizontally and vertically 𝐹∗𝐼 𝑥,𝑦 = 𝑖=−𝑁 𝑁 𝑗=−𝑁 𝑁 𝐹 𝑖,𝑗 𝐼(𝑥−𝑖,𝑦−𝑗) In case of symmetric filters?

Example: 1D 𝑓 𝑥 = 3,4,5 𝑔 𝑥 ={2,1} Dimension of the resultant signal = (No. of columns in f + No. of columns in g) - 1

Example: 2D Dimension of the resultant signal = (No. of rows in f + No. of rows in g) - 1 X (No. of columns in f + No. of columns in g) - 1 𝑥 𝑚,𝑛 = 4 5 6 7 8 9 h 𝑚,𝑛 = 1 1 1 4 5 6 7 8 9 𝑦 𝑚,𝑛 = 𝑦1 𝑦2 𝑦3 𝑦4 𝑦5 𝑦6 𝑦7 𝑦8 𝑦9 𝑦10 𝑦11 𝑦12 𝑦 𝑚,𝑛 = 4 5 6 11 13 15 11 13 15 7 8 9

Thank you Next lecture: Image Enhancement