Feature Extraction Line & Curve

Similar documents
Master of Intelligent Systems - French-Czech Double Diploma. Hough transform

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

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

Chapter 5 Trigonometric Functions of Angles

LoG Blob Finding and Scale. Scale Selection. Blobs (and scale selection) Achieving scale covariance. Blob detection in 2D. Blob detection in 2D

Achieving scale covariance

MAT 211 Final Exam. Spring Jennings. Show your work!

Feature extraction: Corners and blobs

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

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

Lecture 8: Interest Point Detection. Saad J Bedros

Machine vision, spring 2018 Summary 4

CS5670: Computer Vision

INTEREST POINTS AT DIFFERENT SCALES

Edge Detection. Image Processing - Computer Vision

Lecture 8: Interest Point Detection. Saad J Bedros

SURFACE quality plays a critical role in quality control of

Detectors part II Descriptors

CS 534: Computer Vision Segmentation III Statistical Nonparametric Methods for Segmentation

Advanced Edge Detection 1

SIFT: Scale Invariant Feature Transform

Feature Tracking. 2/27/12 ECEn 631

Vlad Estivill-Castro (2016) Robots for People --- A project for intelligent integrated systems

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

Corner. Corners are the intersections of two edges of sufficiently different orientations.

Feature detectors and descriptors. Fei-Fei Li

Edge Detection in Computer Vision Systems

Ch 4. Linear Models for Classification

A. Correct! These are the corresponding rectangular coordinates.

Edge Detection. CS 650: Computer Vision

Feature detectors and descriptors. Fei-Fei Li

Harris Corner Detector

Things You Should Know Coming Into Calc I

Deformation and Viewpoint Invariant Color Histograms

Blob Detection CSC 767

An Algorithm to Identify and Track Objects on Spatial Grids

Corners, Blobs & Descriptors. With slides from S. Lazebnik & S. Seitz, D. Lowe, A. Efros

4.4: Optimization. Problem 2 Find the radius of a cylindrical container with a volume of 2π m 3 that minimizes the surface area.

and ( x, y) in a domain D R a unique real number denoted x y and b) = x y = {(, ) + 36} that is all points inside and on

CS 1674: Intro to Computer Vision. Final Review. Prof. Adriana Kovashka University of Pittsburgh December 7, 2016

Least squares contour alignment

SYMMETRY is a highly salient visual phenomenon and

Understanding Misclassification in a Five Particle CNN Jonathan Karp 8/04/2016

Templates, Image Pyramids, and Filter Banks

Problem Session #5. EE368/CS232 Digital Image Processing

POLAR FORMS: [SST 6.3]

Image Analysis. Feature extraction: corners and blobs

Robust Angle Invariant 1D Barcode Detection

Image Processing 1 (IP1) Bildverarbeitung 1

Properties of detectors Edge detectors Harris DoG Properties of descriptors SIFT HOG Shape context

Section 15.6 Directional Derivatives and the Gradient Vector

Representing regions in 2 ways:

Pole searching algorithm for Wide-field all-sky image analyzing monitoring system

Lecture 12. Local Feature Detection. Matching with Invariant Features. Why extract features? Why extract features? Why extract features?

Lecture 4: Perceptrons and Multilayer Perceptrons

1 Matrices and matrix algebra

3D Coordinate Transformations. Tuesday September 8 th 2015

Flux Invariants for Shape

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

worked out from first principles by parameterizing the path, etc. If however C is a A path C is a simple closed path if and only if the starting point

Calculus 1 Exam 1 MAT 250, Spring 2011 D. Ivanšić. Name: Show all your work!

Using edge information in time frequency representations for chirp parameter estimation

The choice of origin, axes, and length is completely arbitrary.

Example 2.1. Draw the points with polar coordinates: (i) (3, π) (ii) (2, π/4) (iii) (6, 2π/4) We illustrate all on the following graph:

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

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

Integrals in cylindrical, spherical coordinates (Sect. 15.7)

Metric-based classifiers. Nuno Vasconcelos UCSD

ARNOLD PIZER rochester problib from CVS Summer 2003

Strain analysis.

Slide a window along the input arc sequence S. Least-squares estimate. σ 2. σ Estimate 1. Statistically test the difference between θ 1 and θ 2

A Robust Modular Wavelet Network Based Symbol Classifier

More with Angles Reference Angles

Math 111D Calculus 1 Exam 2 Practice Problems Fall 2001

IYGB Mathematical Methods 1

Unit 2 Maths Methods (CAS) Exam

3. On the grid below, sketch and label graphs of the following functions: y = sin x, y = cos x, and y = sin(x π/2). π/2 π 3π/2 2π 5π/2

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 3 2, 5 2 C) - 5 2

Blur Image Edge to Enhance Zernike Moments for Object Recognition

Mixture Models and EM

Solve for an unknown rate of change using related rates of change.

Review exercise 2. 1 The equation of the line is: = 5 a The gradient of l1 is 3. y y x x. So the gradient of l2 is. The equation of line l2 is: y =

b g 6. P 2 4 π b g b g of the way from A to B. LATE AND ABSENT HOMEWORK IS ACCEPTED UP TO THE TIME OF THE CHAPTER TEST ON ASSIGNMENT DUE

Huw W. Lewis *, Dawn L. Harrison and Malcolm Kitchen Met Office, United Kingdom

Least squares and Eigenvalues

Conditions for Segmentation of Motion with Affine Fundamental Matrix

Computational Modeling of N-body Collisions

MIRA, SVM, k-nn. Lirong Xia

Vector Operations. Vector Operations. Graphical Operations. Component Operations. ( ) ˆk

Lecture 7: Finding Features (part 2/2)

For at finde den danske version af prøven, begynd i den modsatte ende!

Lecture 7: Finding Features (part 2/2)

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

Analytic Trigonometry. Copyright Cengage Learning. All rights reserved.

Unit IV: Introduction to Vector Analysis

Method 1: Geometric Error Optimization

INF Shape descriptors

Lesson 4-A. = 2.2, a = 2.0, b = 0.5 = 1.0, 2 = 3.0, 3

Types of Real Integrals

Simple Co-ordinate geometry problems

Transcription:

Feature Extraction Line & Curve 2/25/11 ECEn 631

Standard Procedure Locate edges within the image Link broken edges Thin thick edges For every edge pixel, find possible parameters Locate all clusters of parameters Average each cluster to find accurate parameters

3

4

Given a number of edge or feature pixels How to extract a line, curve, circle, or ellipse?

Line Detection Detects complex patterns of points in binary image. Maps a complex pattern decision problem into a simple peak detection problem in the space of the parameters of the curve Any line, y = m x + c, can be represented by a point in the m, c plane. Any point, [x, y], corresponds to a line c = -m x + y in parameter space. Different m and c represent different lines that pass the same point [x, y]

Peak Detection Image Space x Parameter Space m c y (10,22) and (30,62) n=-10m+22 and n=-30m+62 Multiple lines passing the same point

Y = m x + c for a vertical line? It won t work. Ex. (c, r)=(50, 50) θ< 0 0 50 θ d 50 c 50 θ d 50 c r θ=315 0 or -45 0 r θ=330 0 or -30 0 8

Ex. (c, r)=(50, 50) θ = 0 0 θ = -90 0 D=50 Θ=0 50 c D=50 50 c 50 50 r θ=0 0 r θ=270 0 or -90 0 9

Ex. (c, r)=(50, 50) θ > 0 0 θ > 180 0 d 50 c d 50 c 50 θ=30 0 50 r r θ=240 0 or -120 0 10

Ex. (c, r)=(50, 50) D=0 50 c Ex. (c, r)=(40, 30) D=0 40 30 c 50 r Θ~45 0 or 225 0 r Θ~53.1 0 or 233.1 0 There is a discontinuity between 11

12

Example P = [c, r] = [50, 50] and θ = 315 0 d = 50 cos(315) 50 sin(315) = 50(0.707)-50(-0.707) = 70 d θ 13

For each feature pixel, calculate d for all angles. 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 d 10 9 8 7 5 4 3 2 1 0 0 5 10 15 20 25 30 35 40 45 50 55 60 5 70 75 80 85 90 14 θ

0 2.0 5 2.2 10 2.3 15 2.4 20 2. 25 2.7 30 2.7 35 2.8 40 2.8 45 2.8 50 2.8 55 2.8 60 2.7 65 2.7 70 2. 75 2.4 80 2.3 85 2.2 90 2.0 5 5 5 5 4 4 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 0 1 0 1 1 1 1 1 1 0 0 0 0 1 0 0 0 0 0 1 0 For each feature pixel, calculate d for all angles. d 10 9 8 1 1 1 1 1 1 1 7 1 1 2 3 3 2 2 2 2 2 1 1 1 1 1 1 1 2 4 5 4 3 3 4 4 4 4 3 3 3 2 1 1 1 1 1 5 5 5 4 3 3 3 4 3 2 2 2 3 3 3 5 5 4 2 1 1 4 2 1 1 1 1 1 2 1 1 2 3 3 3 3 3 3 3 4 5 5 3 1 1 1 1 1 2 2 2 2 2 1 1 1 2 2 2 1 1 1 1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1 1 1 1 1 1 0 5 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 15 θ

What do you do next? Find Local Maxima. Why and how? Noise from edge detector and curved contour generate local and noisy peaks. A unique and single peak is almost impossible. Interpolation or weighted average will yield better accuracy (better than 5 degrees in this case) Set a limit on the closest distance between two peaks 10 9 8 1 1 1 1 1 1 1 7 1 1 2 3 3 2 2 2 2 2 1 1 1 1 1 1 1 2 4 5 4 3 3 4 4 4 4 3 3 3 2 1 1 1 1 1 5 5 5 4 3 3 3 4 3 2 2 2 3 3 3 5 5 4 2 1 1 4 2 1 1 1 1 1 2 1 1 2 3 3 3 3 3 3 3 4 5 5 3 1 1 1 1 1 2 2 2 2 2 1 1 1 2 2 2 1 1 1 1 2 2 2 2 2 2 2 1 2 2 2 2 2 1 1 1 1 1 1 1 0 5 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 1

6 5 4 6 5 4 1 1 2 5 5 2 1 1-5 0 5 1 1 2 4 5 1 1 1-5 0 5 θ = (1 ( 5 o )+1 0 o + 2 5 o + 4 ( 5 o )+ 6 0 o + 5 5 o + 2 ( 5 o )+1 0 o +1 5 o )/23 = 0.22 o d = (1 6 +1 6 + 2 6 + 4 5 + 6 5 + 5 5 + 1 4 +1 4 +1 4)/22 = 5.04545 17

18

19

An easier but not so accurate method 0 0 30 30 0 0 0 0 10 10 0 0 0 0 10 10 0 0 0 0 10 10 10 10 10 10 10 10 10 10 10 10 10 10 0 0 0 0 0 0 E x E y 0 0 20 20 0 0 10 10 0 0 0 0 0 0 0 0 30 30 20 10 30 30 20 10 30 30 30 30 20

0 0 30 30 0 0 0 0 E x 0 0 20 20 0 0 10 10 0 0 0 0 E y 30 30 20 10 30 30 20 10 30 30 30 30 0 0 0 0 0 0 d 0 4 5 0 0 3 3 4.9 5.8 0 0 4 4 5.4 6.4 0 0 5 5 5 5 0 θ 0 0 90 90 45 2 90 90 63 45 90 90 90 90-90 o =90 o 0 0 0 0 0 0 21

360 357 Store points to a list: d 3 2 1 2 1 8 0 0 10 20 30 40 50 60 70 80 90 θ 0 0 =(4,2)(5,2) 20 0 =(5,3) 40 0 =(4,3)(5,4) 60 0 =(4,4) 90 0 =(2,3)(2,4)(2,5)(3,3)(3,4) (3,5)(4,5)(5,5) 22

OpenCV Standard Hough transform (SHT) Accumulate all points HoughLines( Mat& image, vector<vec2f>& lines, double rho, double theta, int threshold, double srn=0, double stn=0 ); Progressive probabilissc Hough transform (PPPHT) Accumulate only a fracson of points to reduce computason Sme. HoughLinesP( Mat& image, vector<vec4i>& lines, double rho, double theta, int threshold, double minlinelength=0, double maxlinegap=0 ); 23

Circle Detection sinθ = E y /E cosθ = E x /E If a point [R, C] is given, a radius d is selected, and the direction of the vector from [R, C] to the center is computed, the coordinates of the center can be found. The radius d, row center r o, and column center c o are the three parameters used to vote for circles in the Hough Transform. It can be simplified if radius is known. 24

Circle Detection The accumulator is 3-dimensional (d, r o, c o ) Needs more memory and runs slower than line (2-D) Hough gradient method: Faster but not as accurate Find edge points Calculate their gradients local maxima selected as centers find points that have equal distance to a center H. K. Yuen, J. Princen, J. Illingworth, and J. Kittler. Comparative study of hough transform methods for circle finding. Image Vision Comput., 8(1):71 77, 1990. 25

Finding Any Curves A curve can be expressed as y = f (x,a), where a = [a 1,a 2,,a p ] is a vector of p parameters. Create an array A(s 1,s 2,,s p ) as an accumulator for all parameters, where s 1,s 2,,s p are the sizes of parameters. For each pixel E(i, j) such that when increment accumulator on the curve defined by y = f (x,a). Search local maxima. The output is a set of a 1,a 2,,a p that is the best representation of the curve. 2

Generalized Hough Transform Detects arbitrary shapes Select a localization point L within a template of the shape Move from an edge point to L Vote will peak at L D.H. Ballard, "Generalizing the Hough Transform to Detect Arbitrary Shapes", Pattern Recognition, Vol.13, No.2, p.111-122, 1981 θ R α L 27

HT is a voting algorithm (histogram) More efficient than pattern matching All points are processed independently Works well even with occlusion Robust to noise Computation time is long (ex. Line is faster than circle) Non-target shapes can cause problems 28