521466S Machine Vision Assignment #7 Hough transform

Similar documents
Convolution. 1D Formula: 2D Formula: Example on the web:


Computer Vision & Digital Image Processing. Edge linking and boundary detection

Fast and Robust Normal Estimation for Point Clouds with Sharp Features

ADVANTAGES AND DISADVANTAGES OF THE HOUGH TRANSFORMATION IN THE FRAME OF AUTOMATED BUILDING EXTRACTION

Jiří Matas. Hough Transform

Canny Edge Detection

Finding Equations of Sinusoidal Functions From Real-World Data

+ 4θ 4. We want to minimize this function, and we know that local minima occur when the derivative equals zero. Then consider

Computational Foundations of Cognitive Science

jorge s. marques image processing

J. P. Oakley and R. T. Shann. Department of Electrical Engineering University of Manchester Manchester M13 9PL U.K. Abstract

QUALITY TESTING OF WATER PUMP PULLEY USING IMAGE PROCESSING

Introduction to Medical Imaging. Lecture 11: Cone-Beam CT Theory. Introduction. Available cone-beam reconstruction methods: Our discussion:

Edge detection. (Trucco, Chapt 4 AND Jain et al., Chapt 5) -Edges are significant local changes of intensity in an image.

Locating and Decoding EAN-13 Barcodes from Images Captured by Digital Cameras

IMPLICIT SHAPE MODELS FOR OBJECT DETECTION IN 3D POINT CLOUDS

Bildverarbeitung und Mustererkennung Image Processing and Pattern Recognition

Galaxy Morphological Classification

With the Tan function, you can calculate the angle of a triangle with one corner of 90 degrees, when the smallest sides of the triangle are given:

Poker Vision: Playing Cards and Chips Identification based on Image Processing

A Study on M2M-based AR Multiple Objects Loading Technology using PPHT

Efficient Storage, Compression and Transmission

MVA ENS Cachan. Lecture 2: Logistic regression & intro to MIL Iasonas Kokkinos Iasonas.kokkinos@ecp.fr

SIGNATURE VERIFICATION

OBJECT TRACKING USING LOG-POLAR TRANSFORMATION

SPINDLE ERROR MOVEMENTS MEASUREMENT ALGORITHM AND A NEW METHOD OF RESULTS ANALYSIS 1. INTRODUCTION

Algorithm for License Plate Localization and Recognition for Tanzania Car Plate Numbers

Introduction to Logistic Regression

PHOTOGRAMMETRIC TECHNIQUES FOR MEASUREMENTS IN WOODWORKING INDUSTRY

Machine Learning Final Project Spam Filtering

Machine Learning and Data Mining. Regression Problem. (adapted from) Prof. Alexander Ihler

MA 323 Geometric Modelling Course Notes: Day 02 Model Construction Problem

Using MATLAB to Measure the Diameter of an Object within an Image

Segmentation and Automatic Descreening of Scanned Documents

5 INTEGER LINEAR PROGRAMMING (ILP) E. Amaldi Fondamenti di R.O. Politecnico di Milano 1

Lecture 14: Section 3.3

Modelling, Extraction and Description of Intrinsic Cues of High Resolution Satellite Images: Independent Component Analysis based approaches

Duality in General Programs. Ryan Tibshirani Convex Optimization /36-725

B Answer: neither of these. Mass A is accelerating, so the net force on A must be non-zero Likewise for mass B.

Analecta Vol. 8, No. 2 ISSN

Automatic 3D Reconstruction via Object Detection and 3D Transformable Model Matching CS 269 Class Project Report

Iowa State University Electrical and Computer Engineering. E E 452. Electric Machines and Power Electronic Drives. Laboratory #3 Figures of Merit

If A is divided by B the result is 2/3. If B is divided by C the result is 4/7. What is the result if A is divided by C?

Programming Exercise 3: Multi-class Classification and Neural Networks

Solutions for Review Problems

2.2 Creaseness operator

CALCULATION OF CLOUD MOTION WIND WITH GMS-5 IMAGES IN CHINA. Satellite Meteorological Center Beijing , China ABSTRACT

Gephi Tutorial Quick Start

This Method will show you exactly how you can profit from this specific online casino and beat them at their own game.

Building an Advanced Invariant Real-Time Human Tracking System

Section 2.4: Equations of Lines and Planes

Sachin Patel HOD I.T Department PCST, Indore, India. Parth Bhatt I.T Department, PCST, Indore, India. Ankit Shah CSE Department, KITE, Jaipur, India

MTH Related Rates

Linear Filtering Part II

The Technical Archer. Austin Wargo

T O B C A T C A S E G E O V I S A T DETECTIE E N B L U R R I N G V A N P E R S O N E N IN P A N O R A MISCHE BEELDEN

So, you want to make a photo-realistic rendering of the Earth from orbit, eh? And you want it to look just like what astronauts see from the shuttle

Probabilistic Latent Semantic Analysis (plsa)

Knowledge Discovery and Data Mining. Structured vs. Non-Structured Data

Applied Algorithm Design Lecture 5

Exploratory data analysis (Chapter 2) Fall 2011

E27 SPRING 2013 ZUCKER PROJECT 2 PROJECT 2 AUGMENTED REALITY GAMING SYSTEM

Mean-Shift Tracking with Random Sampling

Alan Eldridge and Tara Walker. Understanding Level of Detail Expressions

Lecture 9. Poles, Zeros & Filters (Lathi 4.10) Effects of Poles & Zeros on Frequency Response (1) Effects of Poles & Zeros on Frequency Response (3)

13.4 THE CROSS PRODUCT

MATLAB Workshop 14 - Plotting Data in MATLAB

Real-time pedestrian detection in FIR and grayscale images

Detection and Restoration of Vertical Non-linear Scratches in Digitized Film Sequences

How To Draw A Circle Of Radius 1 On A Computer (For A Computer)

1 Portfolio Selection

A.Besson, IPHC-Strasbourg

Blind Deconvolution of Barcodes via Dictionary Analysis and Wiener Filter of Barcode Subsections

Lab #8: Introduction to ENVI (Environment for Visualizing Images) Image Processing

Mean Value Coordinates

Numerical Analysis Lecture Notes

Cluster Analysis: Advanced Concepts

Local features and matching. Image classification & object localization

Adding vectors We can do arithmetic with vectors. We ll start with vector addition and related operations. Suppose you have two vectors

We can display an object on a monitor screen in three different computer-model forms: Wireframe model Surface Model Solid model

Solutions to Exercises, Section 5.1

H.Calculating Normal Vectors

Drawing Lines with Pixels. Joshua Scott March 2012

Automatic Calibration of an In-vehicle Gaze Tracking System Using Driver s Typical Gaze Behavior

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Core Maths C2. Revision Notes

The Role of Size Normalization on the Recognition Rate of Handwritten Numerals

Spatio-Temporal Nonparametric Background Modeling and Subtraction

We shall turn our attention to solving linear systems of equations. Ax = b

Vision based Vehicle Tracking using a high angle camera

Plane Stress Transformations

Machine Learning for Medical Image Analysis. A. Criminisi & the InnerEye MSRC

5.7 Maximum and Minimum Values

Experiment #1, Analyze Data using Excel, Calculator and Graphs.

Recursive Estimation

Transcription:

521466S Machine Vision Assignment #7 Hough transform Spring 2014 In this assignment we use the hough transform to extract lines from images. We use the standard (r, θ) parametrization of lines, lter the accumulator, and extract the most prominent lines. Figure 1: The Kanizsa triangle. Theory Here is a brief summary of the hough transform. Refer to the lecture notes for a more detailed explanation. We will implement a simple Hough transform. Note that there are more robust ways of implementing it, but they are also more complicated. The hough transform consists of 4 basic steps: threshold gradient, accumulate votes, lter the accumulator, and extract objects. Threshold gradient The rst step is to select which pixels will cast votes. We threshold the gradient image and the pixels above threshold will cast votes. Selecting the threshold is not trivial and could vary across the image. In this case we will use a xed threshold for each image. Accumulate votes A given pixel (x, y) in the image could potentially belong to any line of the form ρ = x cos θ + y sin θ (1)

. This is, in theory, an innite collection of lines. However, we will discretize and bound the line space (ρ, θ) so that this becomes a nite set. Then each point will vote for all the lines it could belong to. We will discretize any variable a with max value max a and min value min a into N a bins with the following formulas s a = max a min a [units / bin] (2) N a 1 ( ) a mina k(a) = round + 1 [bin] (3) s a where s a is the step that describes how many units each bin represents and k a is the bin index for a given value of a. The angle of the line θ can be easily bounded between [0..π]. However, the radius ρ depends on the image size. The maximum possible radius would be produced by the pixel farthest away from the origin and is thus max ρ = W 2 + H 2 for an image of size (W, H). Because we are bounding the angle to half the circle, we must accept negative radii and thus min ρ = max ρ. Similarly, the number of bins for θ can be xed (e.g. N θ = 400), but for ρ it should depend on the image size to avoid losing resolution (e.g. N ρ = round(max ρ )). Filter the accumulator Because of noise, pixels on the same line might not cast the votes to the exact same bin. Instead of a single bin with a high value, we might nd a small cluster of bins, all with high values. To cope with noise one should lter the accumulator. For example, one can perform a low-pass ltering and then apply non-maxima suppression. Note that the kernel size for the ltering depends on the discretization of the line space. Extract the objects One usually has to limit the objects extracted from the accumulator. Thus, it is necessary to order the objects according to the vote count. First, all bins that have a vote count above threshold are extracted. They are then ordered according to vote count. And nally, the bin index is transformed back to line parameters by inverting Eq. (3). Instructions 1. Download the code and images This assignment comes with Matlab functions and a testing images. downloaded from: They can be http://www.ee.oulu.fi/research/imag/courses/machine_vision/assignments/ The assignment also has a main script that should guide you through the steps: main.m. Two images are provided for testing, the Kanizsa triangle and a car. Execute the script rst with the triangle and then test the results with the car. 2. Thresholding

The thresholding code is provided in the main script. Execute it and observe the results. The results are trivial with the triangle but notice how some edges are missed with the car due to the xed threshold. Also notice that even a perfectly sharp edge will create thick thresholded lines. Figure 2: Thresholded image. 3. Build the accumulator Complete the function buildhoughaccumulator(). This function should calculate the discretization parameters from Eq. (3) and build the accumulator of size (N θ, N ρ ). Each point should cast votes along the sinusoidal line dened by Eq. (1). Figure 3: Accumulator. 4. Extract lines Complete the function extractlinesfromhoughaccumulator(). This function takes an accumulator and extracts the N most voted lines. Note that each bin in the accumulator corresponds to a line. The parameters of the line are implicitly contained in the bin row and column indices.

Extract the 6 most voted lines for the triangle image and visualize them (using plotlines()). The result should look like g. 4. Notice that the lines extracted are pretty much the same but slightly shifted. This happens because we haven't ltered the accumulator and votes have been cast on neighbouring bins. Figure 4: Extracted lines directly from accumulator. 5. Filter the accumulator The function filterhoughaccumulator() performs non-maxima suppression on the accumulator. Use it to produce a second accumulator with only maxima values. Extract lines on this new accumulator. The result should look like g. 5. Figure 5: Extracted lines from ltered accumulator. 6. Improvements Run the algorithm on the car image. Figure 6: First 50 extracted lines from car image. Notice that the given algorithm is not perfect. The black line that separates the door is not detected by the thresholding, neither are the vertical fence posts. Filtering could include smoothing as well as non-maxima suppression. Feel free to play with the algorithm and suggest any improvements with your submission.

Deliverables Send an email to dherrera@ee.oulu.fi with the following. The subject line should be Machine Vision-A7-[student number] (e.g. Vision-A7-1234567). Machine A single attached zip le named A7-[student number].zip which should include: 1. buildhoughaccumulator.m (1 point) 2. extractlinesfromhoughaccumulator.m (1 point) The deadline for this assignment is on Monday 23rd of April.