Lecture 16: Morphology (ch 7) & Image Matching (ch 13) ch. 7 and ch

Slides:



Advertisements
Similar presentations
EigenFaces and EigenPatches Useful model of variation in a region –Region must be fixed shape (eg rectangle) Developed for face recognition Generalised.
Advertisements

The content of these slides by John Galeotti, © 2012 Carnegie Mellon University (CMU), was made possible in part by NIH NLM contract# HHSN P,
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Chapter 9: Morphological Image Processing
Course Syllabus 1.Color 2.Camera models, camera calibration 3.Advanced image pre-processing Line detection Corner detection Maximally stable extremal regions.
Each pixel is 0 or 1, background or foreground Image processing to
Computer Vision Spring ,-685 Instructor: S. Narasimhan Wean 5403 T-R 3:00pm – 4:20pm Lecture #20.
© 2003 by Davi GeigerComputer Vision September 2003 L1.1 Face Recognition Recognized Person Face Recognition.
Project 4 out today –help session today –photo session today Project 2 winners Announcements.
Face Recognition Jeremy Wyatt.
Lecture 4 Unsupervised Learning Clustering & Dimensionality Reduction
Computer Vision I Instructor: Prof. Ko Nishino. Today How do we recognize objects in images?
2007Theo Schouten1 Morphology Set theory is the mathematical basis for morphology. Sets in Euclidic space E 2 (or rather Z 2 : the set of pairs of integers)
CS 485/685 Computer Vision Face Recognition Using Principal Components Analysis (PCA) M. Turk, A. Pentland, "Eigenfaces for Recognition", Journal of Cognitive.
The content of these slides by John Galeotti, © Carnegie Mellon University (CMU), was made possible in part by NIH NLM contract# HHSN P,
SVD(Singular Value Decomposition) and Its Applications
Machine Vision for Robots
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
1 Recognition by Appearance Appearance-based recognition is a competing paradigm to features and alignment. No features are extracted! Images are represented.
Gianni Ramponi University of Trieste Images © 2002 Gonzalez & Woods Digital Image Processing Chapter 9 Morphological Image.
Face Recognition: An Introduction
CSE 185 Introduction to Computer Vision Face Recognition.
CSSE463: Image Recognition Day 27 This week This week Today: Applications of PCA Today: Applications of PCA Sunday night: project plans and prelim work.
Last update Heejune Ahn, SeoulTech
CS654: Digital Image Analysis
References Books: Chapter 11, Image Processing, Analysis, and Machine Vision, Sonka et al Chapter 9, Digital Image Processing, Gonzalez & Woods.
CS654: Digital Image Analysis
1 Mathematic Morphology used to extract image components that are useful in the representation and description of region shape, such as boundaries extraction.
An Improved Approach For Image Matching Using Principle Component Analysis(PCA An Improved Approach For Image Matching Using Principle Component Analysis(PCA.
Morphological Image Processing Robotics. 2/22/2016Introduction to Machine Vision Remember from Lecture 12: GRAY LEVEL THRESHOLDING Objects Set threshold.
Morphological Image Processing (Chapter 9) CSC 446 Lecturer: Nada ALZaben.
Part 3: Estimation of Parameters. Estimation of Parameters Most of the time, we have random samples but not the densities given. If the parametric form.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Content Based Coding of Face Images
1 C.A.L. Bailer-Jones. Machine Learning. Data exploration and dimensionality reduction Machine learning, pattern recognition and statistical data modelling.
CSE 554 Lecture 8: Alignment
(CMU ECE) : (CMU BME) : BioE 2630 (Pitt)
CSSE463: Image Recognition Day 27
CSSE463: Image Recognition Day 26
LECTURE 09: BAYESIAN ESTIMATION (Cont.)
University of Ioannina
LECTURE 10: DISCRIMINANT ANALYSIS
Recognition: Face Recognition
Lecture 13 Shape ch. 9, sec. 1-8, of Machine Vision by Wesley E
Mean Shift Segmentation
Lecture 12 Level Sets & Parametric Transforms sec & ch
Lecture 6 Linear Processing ch. 5 of Machine Vision by Wesley E
In summary C1={skin} C2={~skin} Given x=[R,G,B], is it skin or ~skin?
Lecture 5 Image Characterization ch. 4 of Machine Vision by Wesley E
CS Digital Image Processing Lecture 5
Lecture 15 Active Shape Models
CS4670: Intro to Computer Vision
CSSE463: Image Recognition Day 25
CS4670: Intro to Computer Vision
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
LECTURE 09: DISCRIMINANT ANALYSIS
CSSE463: Image Recognition Day 25
Announcements Project 2 artifacts Project 3 due Thursday night
Announcements Project 4 out today Project 2 winners help session today
Where are we? We have covered: Project 1b was due today
Announcements Artifact due Thursday
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
Lecture 3 Math & Probability Background ch
Filtering An image as a function Digital vs. continuous images
(CMU ECE) : (CMU BME) : BioE 2630 (Pitt)
Lecture 14 Shape ch. 9, sec. 1-8, of Machine Vision by Wesley E
Lecture 3 Math & Probability Background ch
Announcements Artifact due Thursday
(CMU ECE) : (CMU BME) : BioE 2630 (Pitt)
The “Margaret Thatcher Illusion”, by Peter Thompson
Presentation transcript:

Lecture 16: Morphology (ch 7) & Image Matching (ch 13) ch. 7 and ch Lecture 16: Morphology (ch 7) & Image Matching (ch 13) ch. 7 and ch. 13 of Machine Vision by Wesley E. Snyder & Hairong Qi Note: To print these slides in grayscale (e.g., on a laser printer), first change the Theme Background to “Style 1” (i.e., dark text on white background), and then tell PowerPoint’s print dialog that the “Output” is “Grayscale.” Everything should be clearly legible then. This is how I also generate the .pdf handouts.

Mathematical Morphology The study of shape… Using Set Theory Most easily understood for binary images.

Binary Morphology: Basic Idea Make multiple copies of a shape Translate those copies around Combine them with either their: Union, ∪, in the case of dilation, ⨁ Intersection, ∩, in the case of erosion, Θ Dilation makes things bigger Erosion makes things smaller

Binary Morphology: Basic Idea Q: How do we designate: The number of copies to make? The translation to apply to each copy? A: With a structuring element (s.e.) A (typically) small binary image. We will assume the s.e. always contains the origin. For each marked pixel in the s.e.: Make a new copy of the original image Translate that new copy by the coordinates of the current pixel in the s.e. Binary image IS a shape

Dilation Example ⨁ = fA fB = s.e. 10 9 8 7 6 5 4 3 2 1 fB = s.e. 10 9 8 7 6 5 4 3 2 1 3 2 1 -1 -2 -3 ⨁ = Intuitively, what happened here? A = { (2,8),(3,8),(7,8),(8,8),(5,6),(2,4),(3,4),(3,3),(4,3),(5,3),(6,3),(7,3),(7,4),(8,4) } B = { (0,0),(0,-1) }

Erosion Example For erosion, we translate by the negated coordinates of the current pixel in the s.e. = Θ fB = s.e. 10 9 8 7 6 5 4 3 2 1 -1 -2 -3 fA Intuitively, what happened here?

Notation A (binary) image: fA The set of marked pixels in fA: A A = { (x1,y1), (x2,y2), … } A translated image or set: fA(dx,dy) or A(dx,dy) The number of elements in A: #A Complement (inverse) of A: Ac Reflection (rotation) of A: Ã Ã = { (-x,-y) | (x,y) ∈ A } 2 1 -1 -2

Properties Dilation: Erosion: Duality: Not Inverses: ~ Commutative, Associative, & Distributive Increasing: If A ⊆ B then A ⨁ K ⊆ B ⨁ K Extensive: A ⊆ A ⨁ B Erosion: Anti-extensive (A Θ B ⊆ A), … (see the text) Duality: (A Θ B)c = Ac ⨁ B (A ⨁ B)c = Ac Θ B Not Inverses: A ≠ (A Θ B) ⨁ B A ≠ (A ⨁ B) Θ B ~ This is actually the opening of A by B closing of A by B ~

Opening Preserves the geometry of objects that are “big enough” fA o fB = (fA Θ fB) ⨁ fB Preserves the geometry of objects that are “big enough” Erases smaller objects Mental Concept: “Pick up” the s.e. and place it in fA. Never place the s.e. anywhere it covers any pixels in fA that are not marked. fA o fB = the set of (marked) pixels in fA which can be covered by the s.e.

Opening Example Use a horizontal s.e. to remove 1-pixel thick vertical structures: 1 -1 10 9 8 7 6 5 4 3 2 1 10 9 8 7 6 5 4 3 2 1 10 9 8 7 6 5 4 3 2 1 Erosion Dilation

Gray-Scale Morphology Morphology operates on sets Binary images are just a set of marked pixels Gray-scale images contain more information How can we apply morphology to this extra intensity information? We need to somehow represent intensity as elements of a set

The Umbra Gray-scale morphology operates on the umbra of an image. Imagine a 2D image as a pixilated surface in 3D We can also “pixilate” the height of that surface The 2D image is now a 3D surface made of 3D cells The umbra of a 1D image 5 4 3 2 1 6 7 8 9 10 The umbra of a 1D s.e. 2 1 -2 -1 Dilation 5 4 3 2 1 6 7 8 9 10

The Distance Transform (DT) Records at each pixel the distance from that pixel to the nearest boundary (or to some other feature). Used by other algorithms The DT is a solution of the Diff. Eq.: || 𝛻DT(x) || = 1, DT(x) = 0 on boundary Can compute using erosion DT(x) = iteration when x disappears Details in the book 1 2 3 DT of a region’s interior

Voronoi Diagram Divides space Related to DT Q: To which of a set of regions (or points) is this point the closest? Voronoi Diagram’s boundaries = points that are equi-distant from multiple regions Voronoi Domain of a region = the “cell” of the Voronoi Diagram that contains the region Details in the text The voronoi diagram of a set of 10 points is public domain from: http://en.wikipedia.org/wiki/File:2Ddim-L2norm-10site.png

Imaging Matching (ch. 13) Matching iconic images Matching graph-theoretic representations Most important: Eigenimages Springs & Templates

Template Matching Template ≈ a relatively small reference image for some feature we expect to see in our input image. Typical usage: Move the template around the input image, looking for where it “matches” the best (has the highest correlation). Rotation & scale can be problematic Often require multiple passes if they can’t be ruled out a-priori How “big” do we make each template? Do we represent small, simple features Or medium-size, more complex structures?

Eigenimages Goal: Identify an image by comparing it to a database of other images Problem: Pixel-by-pixel comparisons are two expensive to run across a large database Solution: Use PCA

PCA (K-L Expansion) y’ y b2 b1 x’ x Big Picture: Fitting a hyper-ellipsoid & then (typically) reducing dimensionality by flattening the shortest axes Same as fitting an (N+1)-dimensional multivariate Gaussian, and then taking the level set corresponding to one standard deviation Mathematically, PCA reduces the dimensionality of data by mapping it to the first n eigenvectors (principal components) of the data’s covariance matrix The first principal component is the eigenvector with the largest eigenvalue and corresponds to the longest axis of the ellipsoid The variance along an eigenvector is exactly the eigenvector’s eigenvalue This is VERY important and VERY useful. Any questions? Karhunen–Loève The book provides more detail probably discuss more when do Cootes & Taylor ASM.

Eigenimages: Procedure Run PCA on the training images See the text for efficiency details Store in the database: The set of dominant Eigenvectors = the principle components = the Eigenimages For each image, store its coefficients when projected onto the Eigenimages Match a new image: Project it onto the basis of the Eigenimages Compare the resulting coefficients to those stored in the database.

Eigenimages Example PCA Training Images Eigenimages / Eigenfaces PCA Project Onto Which training image(s) does each face most resemble? New Images: The face database and the derived Eigenface examples are all from AT&T Laboratories Cambridge: http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html & http://en.wikipedia.org/wiki/File:Eigenfaces.png

Matching Simple Features Classification based on features Ex: mean intensity, area, aspect ratio Idea: Combine a set of shape features into a single feature vector Build a statistical model of this feature vector between and across object classes in a sequence of training shapes Classification of a new shape = the object class from which the new shape’s feature vector most likely came. We’ll discuss shape features in a future lecture.

Graph Matching: Association Graphs Match nodes of model to segmented patches in image Maximal cliques represent the most likely correspondences Clique = a totally connected subgraph Problems: Over/under segmentation, how to develop appropriate rules, often > 1 maximal clique One of two maximal cliques 1A 2B 3C 3B 2C B C A Image 2 3 1 Model “A” and “1” are the only spherical objects, so there is no ambiguity there All other objects are cylindrical, and could match in multiple ways

Graph Matching: Springs & Templates Idea: When matching simple templates, we usually expect a certain arrangement between them. So, arrange templates using a graph structure. The springs are allowed to deform, but only “so” much. Eye Nose Left edge Right Top of head Mouth Fischler and Elschlager’s “Pictorial Structures” spring & template model for image matching from the early 1970s

Graph Matching: Springs & Templates A match is based on minimizing a total cost. Problem: Making sure missing a point doesn’t improve the score.