Problem Session #5. EE368/CS232 Digital Image Processing

Similar documents
EE368/CS232 Digital Image Processing Winter Homework #5 Solutions

Roadmap. Introduction to image analysis (computer vision) Theory of edge detection. Applications

Machine vision. Summary # 4. The mask for Laplacian is given

Machine vision, spring 2018 Summary 4

Edge Detection. Introduction to Computer Vision. Useful Mathematics Funcs. The bad news

Edge Detection. Image Processing - Computer Vision

Basics on 2-D 2 D Random Signal

Lecture 24: Principal Component Analysis. Aykut Erdem May 2016 Hacettepe University

Example: Face Detection

ECE 661: Homework 10 Fall 2014

Filtering and Edge Detection

Principal Component Analysis

Recognition Using Class Specific Linear Projection. Magali Segal Stolrasky Nadav Ben Jakov April, 2015

Laplacian Filters. Sobel Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters. Laplacian Filters

Local Enhancement. Local enhancement

Feature Extraction and Image Processing

Advanced Introduction to Machine Learning CMU-10715

Eigenimaging for Facial Recognition

W vs. QCD Jet Tagging at the Large Hadron Collider

Keywords Eigenface, face recognition, kernel principal component analysis, machine learning. II. LITERATURE REVIEW & OVERVIEW OF PROPOSED METHODOLOGY

Image Analysis & Retrieval. Lec 14. Eigenface and Fisherface

Image Segmentation: Definition Importance. Digital Image Processing, 2nd ed. Chapter 10 Image Segmentation.

Robot Image Credit: Viktoriya Sukhanova 123RF.com. Dimensionality Reduction

Eigenimages. Digital Image Processing: Bernd Girod, 2013 Stanford University -- Eigenimages 1

Edge Detection. CS 650: Computer Vision

COS 429: COMPUTER VISON Face Recognition

Deriving Principal Component Analysis (PCA)

CITS 4402 Computer Vision

Lecture 04 Image Filtering

Bananagrams Tile Extraction and Letter Recognition for Rapid Word Suggestion

Problem Set 2. MAS 622J/1.126J: Pattern Recognition and Analysis. Due: 5:00 p.m. on September 30

Edges and Scale. Image Features. Detecting edges. Origin of Edges. Solution: smooth first. Effects of noise

Multimedia Databases. Previous Lecture. 4.1 Multiresolution Analysis. 4 Shape-based Features. 4.1 Multiresolution Analysis

Homework Set 3 Solutions REVISED EECS 455 Oct. 25, Revisions to solutions to problems 2, 6 and marked with ***

Multimedia Databases. Wolf-Tilo Balke Philipp Wille Institut für Informationssysteme Technische Universität Braunschweig

6.867 Machine Learning

FACE RECOGNITION BY EIGENFACE AND ELASTIC BUNCH GRAPH MATCHING. Master of Philosophy Research Project First-term Report SUPERVISED BY

Lecture 6: Edge Detection. CAP 5415: Computer Vision Fall 2008

Image Analysis & Retrieval Lec 14 - Eigenface & Fisherface

The Detection Techniques for Several Different Types of Fiducial Markers

Reconnaissance d objetsd et vision artificielle

CITS 4402 Computer Vision

Non-parametric Classification of Facial Features

Multimedia Databases. 4 Shape-based Features. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis. 4.1 Multiresolution Analysis

Dimensionality Reduction: PCA. Nicholas Ruozzi University of Texas at Dallas

Review for Exam 1. Erik G. Learned-Miller Department of Computer Science University of Massachusetts, Amherst Amherst, MA

CS 3710: Visual Recognition Describing Images with Features. Adriana Kovashka Department of Computer Science January 8, 2015

Introduction to Computer Vision. 2D Linear Systems

6 The SVD Applied to Signal and Image Deblurring

Lecture 7: Edge Detection

Modeling Classes of Shapes Suppose you have a class of shapes with a range of variations: System 2 Overview

CLUe Training An Introduction to Machine Learning in R with an example from handwritten digit recognition

8 The SVD Applied to Signal and Image Deblurring

8 The SVD Applied to Signal and Image Deblurring

SURF Features. Jacky Baltes Dept. of Computer Science University of Manitoba WWW:

EECS490: Digital Image Processing. Lecture #11

Homework 6 Solutions

Principal Component Analysis and Singular Value Decomposition. Volker Tresp, Clemens Otte Summer 2014

CS 231A Section 1: Linear Algebra & Probability Review

CS 231A Section 1: Linear Algebra & Probability Review. Kevin Tang

EECS490: Digital Image Processing. Lecture #26

Automatic detection and of dipoles in large area SQUID magnetometry

Real Time Face Detection and Recognition using Haar - Based Cascade Classifier and Principal Component Analysis

Image Analysis. PCA and Eigenfaces

Unsupervised Learning: K- Means & PCA

Introduction to Computer Vision

Robust Angle Invariant 1D Barcode Detection

Representing Images Detecting faces in images

Image Similarity Test Using Eigenface Calculation

Designing Information Devices and Systems I Spring 2017 Babak Ayazifar, Vladimir Stojanovic Homework 4

Compressive Sensing, Low Rank models, and Low Rank Submatrix

Local enhancement. Local Enhancement. Local histogram equalized. Histogram equalized. Local Contrast Enhancement. Fig 3.23: Another example

6.094 Introduction to MATLAB January (IAP) 2009

CAP 5415 Computer Vision Fall 2011

Computer Vision Lecture 3

Problem 1. Suppose we calculate the response of an LTI system to an input signal x(n), using the convolution sum:

CAP 5415 Computer Vision

Lecture 3: Linear Filters

(9) Morphological Image Processing (a) Basic set operations

Histogram Processing

Face recognition Computer Vision Spring 2018, Lecture 21

Adaptive Systems Homework Assignment 1

Machine Learning: Homework 5

2D Image Processing Face Detection and Recognition

Main matrix factorizations

Lecture 3: Linear Filters

1 A Support Vector Machine without Support Vectors

CS5670: Computer Vision

Instance-level recognition: Local invariant features. Cordelia Schmid INRIA, Grenoble

Linear Classifiers. Michael Collins. January 18, 2012

Principal Component Analysis -- PCA (also called Karhunen-Loeve transformation)

Designing Information Devices and Systems I Spring 2018 Homework 13

Digital Image Processing. Filtering in the Frequency Domain

Lecture 13 Visual recognition

LAB 6: FIR Filter Design Summer 2011

CS4495/6495 Introduction to Computer Vision. 2A-L6 Edge detection: 2D operators

Dimensionality Reduction Using PCA/LDA. Hongyu Li School of Software Engineering TongJi University Fall, 2014

System 1 (last lecture) : limited to rigidly structured shapes. System 2 : recognition of a class of varying shapes. Need to:

Introduction to Mathematical Programming

Laboratory handout 1 Mathematical preliminaries

Transcription:

Problem Session #5 EE368/CS232 Digital Image Processing

1. Solving a Jigsaw Puzzle Please download the image hw5_puzzle_pieces.jpg from the handouts webpage, which shows the pieces of a jigsaw puzzle. Since we know that the completed puzzle should show a picture of the famous Mona Lisa painting, we can download an image of the painting from the web to use as a reference when solving the puzzle; you can download hw5_puzzle_reference.jpg from the handouts webpage.

Step 1: We binarize the pieces image, with the result shown below. Step 2: We extract an edge map from the binary image (result shown below), which we will use later to draw the boundaries of the jigsaw pieces on top of the reference image.

Step 3: When the jigsaw pieces are fully assembled, the assembled image may have a different size than the reference image. To account for this mismatch, we resize the reference image (maintaining the same aspect ratio) to have approximately the same number of pixels as the total number of white pixels in the binary pieces image. Step 4: We perform region labeling on the binary pieces image.

Step 5: For each region in the binary pieces image, we compare the corresponding region in the original color pieces image to different regions in the reference image. Note that the regions being compared are non-rectangular in shape, because we utilize the regional shapes obtained from the segmentation in Step 1. We find the region in the reference image that best matches (has the smallest mean squared difference relative to) each piece region. Reference Template + - Mask x Final Difference Mask

Step 6: For the matching region in the reference image, we (i) label that region with the same number that identifies the jigsaw piece (ii) overlay the boundary of the jigsaw piece using the edge map from Step 2 + EOP

2. Eigenfaces and Fisherfaces for Recognition of Glasses In this problem, we will study the use of eigenfaces and fisherfaces for recognizing glasses in images. Please download the following files from the homework webpage: hw5_non_glasses_training.zip: 153 training images of people not wearing glasses hw5_glasses_training.zip: 67 training images of people wearing glasses hw5_non_glasses_testing.zip: 128 testing images of people not wearing glasses hw5_glasses_testing.zip: 52 testing images of people wearing glasses

Part A: Compute, display, and submit the mean face image over the training set. Mean Face

Part B: Using the Sirovich and Kirby method on the training set, compute the 100 eigenfaces with the largest eigenvalues. Please use mean-removed training samples to compute the eigenfaces and make sure each eigenface has unit L2 norm. Display and submit the top 10 eigenfaces. (MATLAB function: eig) Eigenface 1 Eigenface 2 Eigenface 3 Eigenface 4 Eigenface 5 Eigenface 6 Eigenface 7 Eigenface 8 Eigenface 9 Eigenface 10

Part C: Pick one of the eigenfaces from the top 10 eigenfaces which seems to accentuate features around the eyes. Create a 1-d classifier which distinguishes between non-glasses and glasses images by choosing a threshold for the eigenface coefficient that minimizes the error rate for the training images. Report the overall error rate on the training set. Then, evaluate the classifier on the testing images, and report the numbers of non-glasses images and glasses images that are correctly classified, as well as the overall error rate on the testing set. Eigenface 60 50 Non-glasses Glasses Frequency 40 30 20 T = 0.75 Eigenface 10 10 0-5 0 5 Transform Coefficient

Part D: Using the training set, compute, display, and submit the fisherface for recognizing glasses. Perform Fisher LDA in a 100-dimensional eigenface space (using the top 100 eigenfaces computed previously) and make sure the fisherface has unit L2 norm. Repeat part (c), except replace the single eigenface by the fisherface. Does the fisherface obtain a lower overall error rate on the testing set than a single eigenface? (MATLAB function: eig) Image Perform PCA 100 PCA Coefficients Perform Fisher LDA Fisher LDA Coefficient

60 50 Non-glasses Glasses Fisherface Frequency 40 30 20 T = 0.45 Fisherface 10 0-5 0 5 Transform Coefficient

3. Frequency Responses of Edge Templates Part A: Derive expressions for the frequency responses of the horizontal and vertical central difference, Prewitt, and Sobel edge templates and of the two diagonal Roberts edge templates. For each template, submit a plot of the magnitude of the frequency response. Which frequency components are boosted and which frequency components are attenuated by each edge template? (MATLAB functions: meshgrid, mesh, surf, abs)

Central Difference Operator h hor [x, y] = 1 0 h ver [x, y] = 1 [0] 1 [ ] 1 H hor H ver e jω x,e jω y ( ) = e jω x e jω x = 2 j sin ( ω x ) e jω x,e jω y ( ) = 2 j sin( ω y )

Part B: In some edge detection algorithms, e.g., the Canny edge detector, convolution with the edge template is combined with convolution with a Gaussian filter for noise suppression. Generate a Gaussian impulse response (function: fspecial) of standard deviation σ = 1 and finite extent (6σ +1) (6σ +1). Compute the Gaussian filter s frequency response (function: freqz2) using the sample frequency-domain sampling grid that you used in Part A. For each edge template, submit a plot of the magnitude of the product of the Gaussian filter s frequency and the edge template filter s frequency response.!

Without Gaussian Prefilter With Gaussian Prefilter

4. Document Image Restoration Please download the image hw5_insurance_form.jpg from the homework webpage. During faxing, the form has suffered some image distortions: it is slightly rotated and some of the table s horizontal and vertical lines have been erased. Design and implement an algorithm to automatically rotate the form to an upright orientation and repair the gaps in the broken lines. Clearly describe the steps in your algorithm, showing intermediate results for clarification if necessary. Display and submit the final restored image.

Binarization with Otsu s Method

Hough Transform MATLAB: hough, houghpeaks Orientation Histogram for Peaks in Hough Transform

Rotated to Upright Orientation MATLAB: imrotate

Erosion by 35-pixel Vertical Line MATLAB: imerode

Closing by 201-pixel Vertical Line MATLAB: imclose

Restoration of Vertical Lines in Table

Erosion by 49-pixel Horizontal Line MATLAB: imerode

Closing by 301-pixel Horizontal Line MATLAB: imclose

Restoration of Horizontal Lines in Table

Final Restoration Result EOP