Shape description and modelling

Similar documents
Types of image feature and segmentation

Basic Algorithms for Digital Image Analysis: a course

Machine vision. Summary # 6: Shape descriptors

Lecture 8 Object Descriptors

Practical Image and Video Processing Using MATLAB

Boundary descriptors. Representation REPRESENTATION & DESCRIPTION. Descriptors. Moore boundary tracking

Lecture 14 Shape. ch. 9, sec. 1-8, of Machine Vision by Wesley E. Snyder & Hairong Qi. Spring (CMU RI) : BioE 2630 (Pitt)

Feature Extraction and Image Processing, 2 nd Edition. Contents. Preface

Ulrik Söderström 21 Feb Representation and description

Topic 6 Representation and Description

Lecture 18 Representation and description I. 2. Boundary descriptors

CHAPTER 1 Introduction 1. CHAPTER 2 Images, Sampling and Frequency Domain Processing 37

CoE4TN4 Image Processing

EE 584 MACHINE VISION

Shape Classification and Cell Movement in 3D Matrix Tutorial (Part I)

Case-Based Reasoning. CS 188: Artificial Intelligence Fall Nearest-Neighbor Classification. Parametric / Non-parametric.

CS 188: Artificial Intelligence Fall 2008

Digital Image Processing

EECS490: Digital Image Processing. Lecture #23

Algorithms for Recognition of Low Quality Iris Images. Li Peng Xie University of Ottawa

Motion Estimation and Optical Flow Tracking

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Computer Vision. Recap: Smoothing with a Gaussian. Recap: Effect of σ on derivatives. Computer Science Tripos Part II. Dr Christopher Town

Chapter 11 Representation & Description

Feature description. IE PŁ M. Strzelecki, P. Strumiłło

CS5670: Computer Vision

Digital Image Processing Fundamentals

Review for the Final

Fundamentals of Digital Image Processing

Harder case. Image matching. Even harder case. Harder still? by Diva Sian. by swashford

Lecture 10: Image Descriptors and Representation

Robust Shape Retrieval Using Maximum Likelihood Theory

Edge and corner detection

Discovering Visual Hierarchy through Unsupervised Learning Haider Razvi

CS664 Lecture #21: SIFT, object recognition, dynamic programming

Image retrieval based on region shape similarity

Age Invariant Face Recognition Aman Jain & Nikhil Rasiwasia Under the Guidance of Prof R M K Sinha EE372 - Computer Vision and Document Processing

Requirements for region detection

Chapter 11 Representation & Description

CS443: Digital Imaging and Multimedia Binary Image Analysis. Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University

An Adaptive Eigenshape Model

OBJECT DESCRIPTION - FEATURE EXTRACTION

Binary Image Processing. Introduction to Computer Vision CSE 152 Lecture 5

Image Processing. Image Features

Matching and Recognition in 3D. Based on slides by Tom Funkhouser and Misha Kazhdan

Advanced Video Content Analysis and Video Compression (5LSH0), Module 4

Digital Image Processing Chapter 11: Image Description and Representation

Automatic Modelling Image Represented Objects Using a Statistic Based Approach

Augmented Reality VU. Computer Vision 3D Registration (2) Prof. Vincent Lepetit

Image matching. Announcements. Harder case. Even harder case. Project 1 Out today Help session at the end of class. by Diva Sian.

Automated Pivot Location for the Cartesian-Polar Hybrid Point Distribution Model

A Computer Vision System for Graphical Pattern Recognition and Semantic Object Detection

FAST-MATCH: FAST AFFINE TEMPLATE MATCHING

Local Features Tutorial: Nov. 8, 04

Representing Moving Images with Layers. J. Y. Wang and E. H. Adelson MIT Media Lab

HOUGH TRANSFORM CS 6350 C V

Introduction. Introduction. Related Research. SIFT method. SIFT method. Distinctive Image Features from Scale-Invariant. Scale.

Chapter 3 Image Registration. Chapter 3 Image Registration

Coarse-to-fine image registration

Raghuraman Gopalan Center for Automation Research University of Maryland, College Park

Su et al. Shape Descriptors - III

A New Algorithm for Shape Detection

Multimedia Information Retrieval

Image representation. 1. Introduction

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Computer vision: models, learning and inference. Chapter 13 Image preprocessing and feature extraction

Shape Descriptor using Polar Plot for Shape Recognition.

Announcements. Recognition (Part 3) Model-Based Vision. A Rough Recognition Spectrum. Pose consistency. Recognition by Hypothesize and Test

CS4670: Computer Vision

Recognition, SVD, and PCA

Prof. Noah Snavely CS Administrivia. A4 due on Friday (please sign up for demo slots)

Carmen Alonso Montes 23rd-27th November 2015

Building Multi Script OCR for Brahmi Scripts: Selection of Efficient Features

Learning based face hallucination techniques: A survey

Outline 7/2/201011/6/

Visual Representations for Machine Learning

Lecture 17: Solid Modeling.... a cubit on the one side, and a cubit on the other side Exodus 26:13

Image Processing. Bilkent University. CS554 Computer Vision Pinar Duygulu

Recognition (Part 4) Introduction to Computer Vision CSE 152 Lecture 17

Edge and local feature detection - 2. Importance of edge detection in computer vision

Anne Solberg

Implementation and Comparison of Feature Detection Methods in Image Mosaicing

Lecture 15 Active Shape Models

Face Recognition At-a-Distance Based on Sparse-Stereo Reconstruction

Face Recognition Using Active Appearance Models

Fitting D.A. Forsyth, CS 543

Snakes, level sets and graphcuts. (Deformable models)

Image and Multidimensional Signal Processing

CSE 252B: Computer Vision II

Face Alignment Under Various Poses and Expressions

CSE 527: Introduction to Computer Vision

CS 4495 Computer Vision A. Bobick. CS 4495 Computer Vision. Features 2 SIFT descriptor. Aaron Bobick School of Interactive Computing

2D rendering takes a photo of the 2D scene with a virtual camera that selects an axis aligned rectangle from the scene. The photograph is placed into

Examination in Image Processing

Non-Rigid Image Registration

Translation Symmetry Detection: A Repetitive Pattern Analysis Approach

Final Exam Study Guide

APPLICATION OF RADON TRANSFORM IN CT IMAGE MATCHING Yufang Cai, Kuan Shen, Jue Wang ICT Research Center of Chongqing University, Chongqing, P.R.

FROM PIXELS TO REGIONS

CS4733 Class Notes, Computer Vision

Transcription:

COMP3204/COMP6223: Computer Vision Shape description and modelling Jonathon Hare jsh2@ecs.soton.ac.uk

Extracting features from shapes represented by connected components

Recap: Connected Component A connected component is a set of pixels in which every pixel is connected either directly or through any connected path of pixels from the set.

Borders Inner Border Outer Border

Two ways to describe shape Region Description Boundary Description

Region Description

Simple Scalar Shape Features

Area and Perimeter Perimeter = length around the outside of component = + ' orrespond'to'the'x'and'y'coordinates'of'(co Area = number of pixels in component

Compactness Compactness measures how tightly packed the pixels in the component are. It s often computed as the weighted ratio of area to perimeter squared: = 4"() ' pactness'so'that'a C 1 C 0.11 C 0.79

Centre of Mass just the mean x and y position of all the pixels in the component

4"() he'ratio'of'the'area'to'the'perimeter'squared:' = ' 4"() ' = rmalizes'the'compactness'so'that'a'circle'is'the'most'compact' malizes'the'compactness'so'that'a'circle'is'the'most'compact' Irregularity/dispersion area'of'a'circle'=' ),'with'a'compactness'of'1.' rea'of'a'circle'=' ),'with'a'compactness'of'1.' ny+authors+define+compactness+in+slightly+different+ways,+although+ A measure of how spread-out the shape is y+authors+define+compactness+in+slightly+different+ways,+although+ ept+is+the+same+ pt+is+the+same+ dispersion'can'be'measured'as'the'ratio'of'major'chord'length'to' ispersion'can'be'measured'as'the'ratio'of'major'chord'length'to' way'to'compute'it'is'as'follows:' y'to'compute'it'is'as'follows:' max + + max = ' = ' orrespond'to'the'x'and'y'coordinates'of'the'centroid'(i.e.'the'mean' rrespond'to'the'x'and'y'coordinates'of'the'centroid'(i.e.'the'mean' itions'of'all'pixels'in'the'component).' ositions'of'all'pixels'in'the'component).' lternative'is'to'represent'dispersion'as'the'ratio'of'the'smallest' 'alternative'is'to'represent'dispersion'as'the'ratio'of'the'smallest' 'encompasses'the'shape'to'the'largest'circle'that'can'fit'inside'the' at'encompasses'the'shape'to'the'largest'circle'that'can'fit'inside'the' max " = max " = min min + + ' + + 4.''Send'any'comments/bugs/typos'to'jsh2@ecs.soton.ac.uk.'' '

Demo: scalar region features

Moments

Standard Moments Moments describe the distribution of pixels in a shape. Moments can be computed for any grey-level image. For the purposes of Moments'describe'the'distribution'of'pixels'in'a'shape.' ments'describe'the'distribution'of'pixels'in'a'shape.' describing shape, we ll just focus on moments of a connected Moments'describe'the'distribution'of'pixels'in'a'shape.' o Moments'can'be'computed'for'any'greyYlevel'image.'For'the'purposes'of'describing' o omoments'can'be'computed'for'any'greyylevel'image.'for'the'purposes'of'describing' Moments'can'be'computed'for'any'greyYlevel'image.'For'the'purposes'of'describing' component. shape,'we ll'just'focus'on'moments'of'a'connected'component.' shape,'we ll'just'focus'on'moments'of'a'connected'component.' shape,'we ll'just'focus'on'moments'of'a'connected'component.' o Standard'two:dimensional)Cartesian)moment'of'an'image,'with'order'p'and'q'is' o ostandard'two:dimensional)cartesian)moment'of'an'image,'with'order'p'and'q'is' Standard two-dimensional Cartesian moment of an image, with order p Standard'two:dimensional)Cartesian)moment'of'an'image,'with'order'p'and'q'is' defined'as:' defined'as:' defined'as:' and q is defined as: =, ' " "= =, ' ', " ' '' In the case of a connected component, this simplifies to: o In'the'case'of'a'connected'component,'this'simplifies'to:' o In'the'case'of'a'connected'component,'this'simplifies'to:' o In'the'case'of'a'connected'component,'this'simplifies'to:' = " =" ' ' " = ' The zero order moment of a connected component m00 is just the area The'zero'order'moment'of'a'connected'component'm 00'is'just'the'area'of' The'zero'order'moment'of'a'connected'component'm 00'is'just'the'area'of' of The'zero'order'moment'of'a'connected'component'm 00'is'just'the'area'of' the'component.'the'centre'of'mass'is'(centroid):' the component. The centre of mass is (centroid): the'component.'the'centre'of'mass'is'(centroid):' " " the'component.'the'centre'of'mass'is'(centroid):' " " =, = =, = '"' " =, = ' Standard'2d'Cartesian'moments'can'be'used'as'descriptors'of'a'shape' o ostandard'2d'cartesian'moments'can'be'used'as'descriptors'of'a'shape'

Central Moments Standard 2d moments can be used as shape descriptors But, they re not invariant to translation, rotation and scaling Central Moments are computed about the centroid of the shape, and are thus translation invariant: Note: # 01 and # 10 are always 0, so have no descriptive power t:' " = ' rder'centralised'moment'is'the'a

Normalised Central Moments Normalised Central Moments are both scale and translation invariant: oments)are'both'translation'and'sc = " where = + " 2 + 1 ed'after'the'inventor)'are'a'set'of'7

Demo: Moments

Hu Moments Hu Moments are a set of 7 translation, scale and rotation invariant moments: M1 5 η 20 1 η 02 M2 5 ðη 20 2 η 02 Þ 2 1 4η 2 11 M3 5 ðη 30 2 3η 12 Þ 2 1 ð3η 21 2 η 03 Þ 2 M4 5 ðη 30 1 η 12 Þ 2 1 ðη 21 1 η 03 Þ 2 M5 5 ðη 30 2 3η 12 Þðη 30 1 η 12 Þððη 30 1 η 12 Þ 2 2 3ðη 21 1 η 03 Þ 2 Þ 1 ð3η 21 2 η 03 Þðη 21 1 η 03 Þð3ðη 30 1 η 12 Þ 2 2 ðη 21 1 η 03 Þ 2 Þ M6 5 ðη 20 2 η 02 Þððη 30 1 η 12 Þ 2 2 ðη 21 1 η 03 Þ 2 Þ 1 4η 11 ðη 30 1 η 12 Þðη 21 1 η 03 Þ M7 5 ð3η 21 2 η 03 Þðη 30 1 η 12 Þððη 30 1 η 12 Þ 2 2 3ðη 21 1 η 03 Þ 2 Þ 1 ð3η 12 2 η 30 Þðη 21 1 η 03 Þð3ðη 12 1 η 30 Þ 2 2 ðη 21 1 η 03 Þ 2 Þ

Demo: Hu Moments

Even more invariance There s another common set of rotation invariant moments called Zernike moments. Used a lot in medical imaging for describing the shape of tumours. Other sets moments can be even more invariant to shape transformation e.g. Affine invariant moments

Boundary Description

Chain Codes 1 Simple way of encoding a boundary. Walk around the boundary and encode the direction you take on each step as a number 2 3 2 0 Then cyclically shift the code so it forms the smallest possible integer value (making it invariant to the starting point) 4 3 5 6 1 7 0

Chain Codes Example

Chain Codes Example 7

Chain Codes Example 77

Chain Codes Example 771

Chain Codes Example 7712

Chain Codes Example 77123

Chain Codes Example 771234

Chain Codes Example 7712345

Chain Codes Example 7123457

Chain Codes Example 1234577

Chain Code Invariance Can be made rotation invariant: Encode the differences in direction rather than absolute values. Can be made scale invariant: Resample the component to a fixed size Doesn t work well in practise

Chain Code Advantages and Limitations Can be used for computing perimeter area, moments, etc. Perimeter for an 8-connected chain code is N(even numbers in code) + 2N(odd numbers in code) Practically speaking, not so good for shape matching Problems with noise, resampling effects, etc Difficult to find good similarity/distance measures

Fourier Descriptors The Fourier transform can be used to encode shape information by decomposing the boundary into a (small) set of frequency components. There are two main steps to consider: Defining a representation of a curve (the boundary) Expanding the representation using Fourier theory. By choosing these steps carefully it is possible to create rotation, translation and scale invariant boundary descriptions that can be used for recognition, etc.

Describing Multiple Shapes

Region Adjacency Graphs Build a graph from a set of connected components Each node corresponds to a component Nodes connected if they share a border

Region Adjacency Graphs Can easily detect patterns in the graph e.g. a node with one child with four children Invariant to non-linear distortions, but not to occlusion

Demo: RAGs

Flexible Shape Modelling and Fitting

Point Distribution Models

Idea: learn a low dimensional parametric model of how the shape of an object can vary. Shape represented by a fixed number of 2d points at distinguishable locations on the object. e.g. for faces, points at the corners of the mouth and eyes, tip of the noise, etc Need a training set of images with the same points marked

Demo: Shape Data

Procrustes Analysis Need to align (rotate and scale) all training points. All point-sets must have the same size and be about the origin. Generalised procrustes analysis is an iterative technique for achieving this: 1.# arbitrarily#choose#a#reference#shape#(typically#by#selecting# it#among#the#available#instances#and#centring#it#about#the# origin)# #2.# superimpose#all#instances#to#current#reference#shape#(by# computing#the#optimal#translation,#scaling#and#rotation#for#each)# #3.# compute#the#mean#shape#of#the#current#set#of#superimposed# shapes# #4.# if#the#procrustes#distance#(the#euclidean#distance#between# [x1,y1,x2,y2, ]#and#[x 1,y 1,x 2,y 2, ])#between#mean#and# reference#shape#is#above#a#threshold,#set#reference#to#mean#shape# and#continue#to#step#2.

Demo: Procrustes Analysis

Form the data points into a shape matrix S= x y x y x y Each row corresponds to an image (it s essentially a featurevector for the shape in that image) x y x y x y Each pair of columns contains (x, y) coordinates of aligned corresponding points across the images

Apply PCA to learn a low-dimensional basis S T S = QQ T Q can be used to generate shapes from a low-dimensional weight vector, w: v = wq T

Demo: PDM

Active Shape Models and Constrained Local Models ASMs/CLMs extend a PDM by also learning local appearance around each point Typically just as an image template Using a constrained optimisation algorithm, the shape can be optimally fitted to an image Constraints: Plausible shape Good template matching

Demo: CLM fitting

Active Appearance Models AAMs go even further and model the global appearance of the shape using Eigenfaces Optimiser fits the model to new images by searching for both plausible shape and plausible global appearance

Summary Many different ways to describe shape of connected components Choice really depends on required invariance Multiple shapes can efficiently be represented by a RAG Very robust Point distribution models apply PCA to x-y coordinate pairs across multiple images to produce a low-dimensional parametric model ASMs/CLMs also model local appearance, and can use this to optimise the fit of the model parameters to match an image