57

Region description Information that lets you recognise a region

Embed Size (px)

Citation preview

Region description

Information that lets you recognise a region.

Image Processing and Computer Vision: 5 3

Introduction Region detection isolates regions

that differ from neighbours Description identifies property

values Labelling identifies regions

Image Processing and Computer Vision: 5 4

Contents Features derived from binary

images Structure Region (CCA) Shape

Texture Surface shape

Image Processing and Computer Vision: 5 5

Features derived from binary images Connected component analysis Perimeter Area

Image Processing and Computer Vision: 5 6

Connected Component Analysis To identify groups of connected

pixels To label separate regions

Image Processing and Computer Vision: 5 7

Algorithm

First passIf zero neighbours have a label

Pixel receives the next free labelIf one or more neighbours have same label

Pixel receives same label;If two or more neighbours have different labels

Pixel receives one label, equivalence is recorded

Second passRelabel all equivalent labels

?

321

4

Image Processing and Computer Vision: 5 8

Borders Straight lines

Chain codes Polylines

Curved lines Splines Circles

Phi-S Snakes

Image Processing and Computer Vision: 5 9

Chain Codes

0

1

2

3

45

6

7

Trace the object outline - follow pixels on boundaryCode directions of movement

Description is position independent, orientation dependent

Can use differential chain codes

Image Processing and Computer Vision: 5 10

Perimeter From Chain Code

Even codes have length 1Odd codes have length 2

Perimeter length = #even + 2 #odd

Image Processing and Computer Vision: 5 11

Area From Chain Code

0 1 2 3 4 5 6 7

h

0 h+1/2 h h-1/2 0 -h-1/2 -h -h+1/2

h is measured from an arbitrary datum,e.g. y co-ordinate of start of codes.

Image Processing and Computer Vision: 5 12

Crack Codes These follow pixel boundaries

Not pixel centres Same representation of

displacement Longer coding More accurate

Image Processing and Computer Vision: 5 13

Image Processing and Computer Vision: 5 14

Demo

Image Processing and Computer Vision: 5 15

Polyline Representation Represent the line by a set of joined

line segments Polyline and original endpoints

coincide Segments interpolate edge points Computed by curve splitting or

segment merging Decomposing initial curve Combining curve segments

Image Processing and Computer Vision: 5 16

Polyline Splitting(cf Hopalong last week)For each curve segment

D = maximum distance of segment to line between endpoints

If D > thresholdInsert a vertex

Image Processing and Computer Vision: 5 17

Segment Merging May be necessary between

endpoints of adjacent segments Use edge following techniques

Image Processing and Computer Vision: 5 18

Curved Line Sections Polyline representation is suitable

for linear sections Curved sections are inefficiently

represented Alternatives

Splines Circles

Image Processing and Computer Vision: 5 19

B-Splines A curve represented by

control points Endpoints fixed by two

control points Shape controlled by two

control points

Image Processing and Computer Vision: 5 20

If control points can be found Curve is compactly represented

Image Processing and Computer Vision: 5 21

Fourier Descriptors Represent co-ordinates of boundary

points as complex numbers They can be Fourier transformed Coefficients of transform are the

Fourier descriptors Retain more or fewer according to

desired accuracy

Image Processing and Computer Vision: 5 22

Example

Image Processing and Computer Vision: 5 23

Image Processing and Computer Vision: 5 24

Image Processing and Computer Vision: 5 25

Image Processing and Computer Vision: 5 26

Image Processing and Computer Vision: 5 27

Phi-S Curves

s(i, si) • characteristic of the object’s shape• independent of location• dependent on orientation

Image Processing and Computer Vision: 5 28

Image Processing and Computer Vision: 5 29

Snakes, Active/Dynamic Contours Borders follow outline of object Outline obscured? Snake provides a solution

Image Processing and Computer Vision: 5 30

Algorithm Snake computes smooth,

continuous border Minimises

Length of border Curvature of border

Against an image property Gradient?

EEEE imagecurvaturelengthtot

Image Processing and Computer Vision: 5 31

Minimisation Initialise snake Integrate energy along it Iteratively move snake to global

energy minimum

Image Processing and Computer Vision: 5 32

Image Processing and Computer Vision: 5 33

Texture Two definitions

A pseudoregular arrangement of a primitive element

A pseudorandom distribution of brightness values

Image Processing and Computer Vision: 5 34

Examples

Image Processing and Computer Vision: 5 35

Classification A useful property for identifying

surfaces Aerial photographs Medical imagery

Image Processing and Computer Vision: 5 36

Structural Texture Representations

Require Texture primitive - texel Placement rule

Ideal for regular - man-made - textures

Image Processing and Computer Vision: 5 37

Fourier Descriptors Placement rule periodicity Can use

Autocorrelation Fourier transform

To recognise it

Image Processing and Computer Vision: 5 38

Fourier Descriptor Compute modulus

of transform Energy in

different regions is characteristic of texture

Image Processing and Computer Vision: 5 39

Markov Random Field Representations Each pixel value a combination of

neighbours plus noise Find coefficients of model

Characterise texture Least squares minimisation

crujihjcirIcrINji

,,,,0,0,

Image Processing and Computer Vision: 5 40

Statistical Descriptions Better suited to pseudorandom,

natural textures First Order statistics Second order statistics

Image Processing and Computer Vision: 5 41

First Order Statistics Statistical descriptions of grey level

distribution Mean grey value Deviation of grey values Coefficient of variation etc.

Can give useful results Generally too sensitive to factors other than

identity of surface

Image Processing and Computer Vision: 5 42

Second Order Statistics Measures involving multiple pixels

Joint difference histogram Histogram of differences between

adjacent pixels Co-Occurrence matrices

Measure frequency of specific pairs of grey values

Image Processing and Computer Vision: 5 43

Co-Occurrence Matrices Define a relative separation vector

e.g. 3 pixels across, 2 up Use each pair of pixels separated by the

vector as matrix indices Increment this matrix element Shape of matrix characterises the

texture Can be characterised by factors derived

from it.

Image Processing and Computer Vision: 5 44

Edge Frequency Density of microedges is

characteristic of texture Apply an edge detector

Sobel is suitable Threshold result Compute density of edge elements

Image Processing and Computer Vision: 5 45

Image Processing and Computer Vision: 5 46

Shape from … To recover shapes of objects in a

scene By identifying spatial properties of

surface patches

Image Processing and Computer Vision: 5 47

Shape from Motion From

4 views Of

3 non-colinear points Can compute

motion and relative locations of points

Image Processing and Computer Vision: 5 48

Shape from Photometric Stereo Capture images of a scene in two

cameras Must know

Cameras’ separation Cameras’ relative orientation (parallel

in example) Co-ordinates of corresponding points

in images

Image Processing and Computer Vision: 5 49

Plan view of cameras’ optical paths.

camera 1

camera 2

Imageplane

Scene Opticalcentres

d

dx

x+d

z f

(x’, y’, f)

(x’’, y’’, f)

(x, y,z)

centreline

Image Processing and Computer Vision: 5 50

'''2

'''2

'''

'''

:

xxdf

z

or

fzx

fzx

d

gsubtractin

fzx

dxandfzx

dx

rearrange

fx

zdx

andfx

zdx

trianglessimilarUse

Image Processing and Computer Vision: 5 51

Provided that cameras are alignedseparation is knowncorresponding points are identified

The point’s depth can be computed.

Correspondence problem examined later.

Image Processing and Computer Vision: 5 52

Shape from Shading For matt surfaces, proportion of

incident light reflected depends on Surface reflectance Surface orientation with respect to

light source

cos.0

kI

I

Image Processing and Computer Vision: 5 53

If k can be estimated Image value for = 0

Can estimate cos , hence throughout image.

Surface orientation is not determined uniquely Two angles are needed

Image Processing and Computer Vision: 5 54

Shape from Texture

Apparent texture of a surface is dependent on the surface’s Orientation Range

Image Processing and Computer Vision: 5 55

Method Must be able to identify

fundamental texture elements Assume they are invariant Compute mapping to transform

each element to a standard appearance

Mapping determines surface orientation.

Image Processing and Computer Vision: 5 56

Summary Binary image features

Skeleton Boundaries

Texture Shape from …

Image Processing and Computer Vision: 5 57

There is no reason why anyone would want a computer in their homeKen Olsen, chairman DEC, 1977