recap object representations

25
1 CAP6411 CAP6411 Computer Vision Systems Computer Vision Systems Lecture 3 Lecture 3 Alper Yilmaz Alper Yilmaz Office: CSB 250 Office: CSB 250 Email: Email: [email protected] [email protected] Web: Web: http://www.cs.ucf.edu/courses/ http://www.cs.ucf.edu/courses/ cap6411/cap6411 cap6411/cap6411/spring2006 /spring2006 Recap Recap Object Representations Object Representations Shape of objects Shape of objects Point Representations Point Representations Primitive Geometric Shapes Object silhouette and contour Articulated shape models Skeletal models

Upload: others

Post on 06-Feb-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Recap Object Representations

1

CAP6411 CAP6411 Computer Vision SystemsComputer Vision SystemsLecture 3Lecture 3

Alper YilmazAlper YilmazOffice: CSB 250Office: CSB 250Email: Email: [email protected]@cs.ucf.eduWeb: Web: http://www.cs.ucf.edu/courses/http://www.cs.ucf.edu/courses/cap6411/cap6411cap6411/cap6411/spring2006/spring2006

RecapRecapObject RepresentationsObject Representations

Shape of objectsShape of objectsPoint RepresentationsPoint RepresentationsPrimitive Geometric ShapesObject silhouette and contourArticulated shape modelsSkeletal models

Page 2: Recap Object Representations

2

RecapRecapObject RepresentationsObject Representations

Appearance of objectsAppearance of objectsPDFsPDFsTemplatesTemplatesMultiMulti--view appearance methodsview appearance methods

RecapRecapProbability DistributionsProbability Distributions

Probability distributionProbability distributionProbability densityProbability densityIndependence of variablesIndependence of variablesMarginal distributionsMarginal distributions

Projection onto axisProjection onto axis

Conditional distributionsConditional distributionsBayesBayes’ rule’ rule

Page 3: Recap Object Representations

3

RecapRecapEigenspaceEigenspace DecompositionDecomposition

Encodes different views of an objectEncodes different views of an objectSelection of few eigenvectors is enoughSelection of few eigenvectors is enoughHighlights differences within the classHighlights differences within the class

Visual FeaturesVisual Features

Page 4: Recap Object Representations

4

PropertiesProperties

UniquenessUniquenessRelated to the object representationRelated to the object representation

Color for histogram based representationColor for histogram based representationEdges for contour based representationEdges for contour based representation

Combination of features improve Combination of features improve performance of vision algorithmsperformance of vision algorithms

Typical Visual FeaturesTypical Visual Features

ColorColorEdgesEdgesOptical flowOptical flowTextureTexture

Page 5: Recap Object Representations

5

Color FeatureColor Feature

Multiple bandsMultiple bandsRGB, HSV, etc.RGB, HSV, etc.

Single bandSingle bandBinaryBinaryGray scale, heat index, etc.Gray scale, heat index, etc.

RGB Color SpaceRGB Color Space(Red, Green, Blue)(Red, Green, Blue)

Color cubeColor cubeRange from 0Range from 0--255255Any color is specified by r, g, b Any color is specified by r, g, b triple.triple.The diagonal line of the cube The diagonal line of the cube represents all the graysrepresents all the graysSimply a linear scaling of a unit Simply a linear scaling of a unit color cube color cube Lies within our perceptual spaceLies within our perceptual spaceRepresents fewer colors than we Represents fewer colors than we can see.can see.

Page 6: Recap Object Representations

6

RGBRGB

HSV Color SpaceHSV Color Space(Hue, Saturation, Value)(Hue, Saturation, Value)

A common alternative to RGBA common alternative to RGBHue is the color typeHue is the color type

Ranges from 0Ranges from 0 360360

Saturation is amount of gray in colorSaturation is amount of gray in colorRanges from 0Ranges from 0 100%100%

Value is the brightnessValue is the brightnessRanges from 0Ranges from 0 100%100%

),,(min),,(max

BGRMINBGRMAX

==

Page 7: Recap Object Representations

7

Single Band ImagesSingle Band ImagesBinaryBinary

Two possible intensity valuesTwo possible intensity valuesProduced by Produced by thresholdingthresholdingUsed in shape analysisUsed in shape analysis

Elongation, area, compactness, Elongation, area, compactness, circumference, etc.circumference, etc.

Histogram of a binary imageHistogram of a binary image

Single Band ImagesSingle Band ImagesGray Level ImageGray Level Image

Only colors are shades of grayOnly colors are shades of grayLess storage spaceLess storage spaceAre sufficient to many tasksAre sufficient to many tasks

Many lowMany low--level vision algorithms level vision algorithms use gray level imagesuse gray level images

RGBRGBtoto

GrayscaleGrayscale

RGBRGBtoto

HSVHSV

Page 8: Recap Object Representations

8

Single Band ImagesSingle Band ImagesHeat IndexHeat Index

Expensive sensorsExpensive sensorsUsed in militaryUsed in militaryBlackBlack ColdColdWhiteWhite HotHot

Edge FeatureEdge Feature

Discontinuity of intensities in the imageDiscontinuity of intensities in the imageEdge modelsEdge models

StepStepRoofRoofRampRampSpikeSpike

Step Ramp

Roof Spike

Page 9: Recap Object Representations

9

Less sensitive to illumination changesLess sensitive to illumination changesCommonly used in contour based Commonly used in contour based image representationimage representationExtracted from gray level imagesExtracted from gray level imagesUsed in context of:Used in context of:

Object recognitionObject recognitionTrackingTrackingImage retrievalImage retrieval

Edge FeatureEdge Feature

Bowyer, K., Bowyer, K., KranenburgKranenburg, C., and Dougherty, S. 2001. Edge detector evaluation using emp, C., and Dougherty, S. 2001. Edge detector evaluation using empirical ROC curve. CVIU 10, 77irical ROC curve. CVIU 10, 77––103.103.

SobelSobel Edge DetectorEdge Detector

Sobel’sSobel’sedges in edges in xxdirectiondirection ⎥

⎥⎥

⎢⎢⎢

−−−

101202101

⎥⎥⎥

⎢⎢⎢

−−− 121000121Sobel’sSobel’s

edges in edges in yydirectiondirection

xI

yI

+

Page 10: Recap Object Representations

10

Canny Edge DetectorCanny Edge Detector

Image

gx(x,y) Gradientmagnitude

gy(x,y) Gradientdirection

Non-maximumsuppression

Hysteresisthresholding

Optical Flow FeatureOptical Flow Feature

Dense field of displacement vectorsDense field of displacement vectorsTranslation of each pixel in a regionTranslation of each pixel in a region

Computed from a set of framesComputed from a set of framesComputed from brightness constancy Computed from brightness constancy constraintconstraint

Intensity of a moving pixel does not change Intensity of a moving pixel does not change overover--timetime

),,(),,( ttyyxxItyxI ∆+∆+∆+=

Page 11: Recap Object Representations

11

Common UsesCommon Uses

Motion based segmentationMotion based segmentationObject trackingObject trackingVideo indexing and retrievalVideo indexing and retrievalCorrection of camera jitterCorrection of camera jitterImage alignmentImage alignmentStructure from motionStructure from motionVideo compressionVideo compression

Optical FlowOptical Flow

Flow vector in image space (2D)Flow vector in image space (2D)Taylor series expansion of right side around Taylor series expansion of right side around ∆∆tt

tIt

yIy

xIxtyxIttyyxxI

∂∂

∆+∂∂

∆+∂∂

∆+=∆+∆+∆+ ),,(),,(

),,(),,( ttyyxxItyxI ∆+∆+∆+=

tyx tIyIxItyxItyxI ∆+∆+∆+= ),,(),,(

tyx tIyIxI ∆+∆+∆=0 tyx IItyI

tx

+∆∆

+∆∆

=0

Page 12: Recap Object Representations

12

Optical FlowOptical Flow

tyx IItyI

tx

+∆∆

+∆∆

=0txu

∆∆

=tyv∆∆

=

0=++ tyx IvIuI Brightness constancy equationBrightness constancy equation

y

t

y

x

II

IIuv += Equation of a line in (Equation of a line in (uu,,vv) space) space

Computing Optical FlowComputing Optical FlowLucas & Lucas & KanadeKanade

Line fittingLine fittingDefine an energy functionalDefine an energy functionalTake derivatives equate it to 0Take derivatives equate it to 0Rearrange and construct an observation matrixRearrange and construct an observation matrix

∑ ++= 2)( tyx IvIuIE

0)(2 =++=∂∂ ∑ tyxx IvIuII

uE

0)(2 =++=∂∂ ∑ tyxy IvIuII

vE

Page 13: Recap Object Representations

13

Computing Optical FlowComputing Optical FlowLucas & Lucas & KanadeKanade

[ ] ∑∑∑

∑∑∑∑∑∑

−=⎥⎦

⎤⎢⎣

−=+

=++

txyxx

txyxx

txyxx

IIvu

III

IIIIvIu

IIIvIuI

2

2

2 0

0)(2 =++=∂∂ ∑ tyxy IvIuII

vE0)(2 =++=

∂∂ ∑ tyxx IvIuII

uE

[ ] ∑∑∑

∑∑ ∑∑ ∑ ∑

−=⎥⎦

⎤⎢⎣

−=+

=++

tyyyx

tyyyx

tyyyx

IIvu

III

IIIvIIu

IIvIIuI

2

2

2 0

} 48476444 8444 76 B

ty

tx

uA

yyx

yxx

IIII

vu

IIIIII

⎥⎥⎦

⎢⎢⎣

⎡−−

=⎥⎦

⎤⎢⎣

⎥⎥⎦

⎢⎢⎣

∑∑

∑∑∑∑

2

2

Computing Optical FlowComputing Optical FlowLucas & Lucas & KanadeKanade

BAu = BAAuA 11 −− = BAIu 1−= BAu 1−=

⎥⎥⎦

⎢⎢⎣

−−

⎥⎥⎦

⎢⎢⎣

⎡=⎥

⎤⎢⎣

∑∑

∑∑∑∑

ty

tx

yyx

yxx

IIII

IIIIII

vu

1

2

2

( ) ⎥⎥⎦

⎢⎢⎣

−−

⎥⎥⎦

⎢⎢⎣

−−

−=⎥

⎤⎢⎣

∑∑

∑∑∑∑

∑ ∑∑ ty

tx

xyx

yxy

yxyxIIII

IIIIII

IIIIvu

2

2

222

1

Page 14: Recap Object Representations

14

Page 15: Recap Object Representations

15

Texture FeatureTexture Feature

Measure of the intensity variation of a Measure of the intensity variation of a surface surface Quantifies smoothness and regularity. Quantifies smoothness and regularity. Requires a processing step to generate Requires a processing step to generate the descriptors.the descriptors.

Page 16: Recap Object Representations

16

Texture MeasuresTexture MeasuresGLCM GLCM (Gray level Co(Gray level Co--occurrence Matrices)occurrence Matrices)

Law’s Texture Energy MeasuresLaw’s Texture Energy MeasuresWaveletsWaveletsSteerable PyramidsSteerable Pyramids

GLCMsGLCMs

2D histogram of image intensities2D histogram of image intensitiesP(i,j,d,P(i,j,d,θθ)): Count of occurrence of gray : Count of occurrence of gray level level ii with with jj at distance at distance dd and in and in direction direction θθ..

Page 17: Recap Object Representations

17

GLCMsGLCMs

5 0 5 1 5 2 5 0

5 3 5 1 5 1 5 2

5 1 5 0 5 1 5 2

5 2 5 3 5 3 5 2

Intensity image patchIntensity image patch

5 0 5 1 5 2 5 3

5 0 0 2 0 0

5 1 1 1 3 0

5 2 1 0 0 1

5 3 0 1 1 1

P(d,θ), d=1, θ=0o

GLCMsGLCMs

Too many parametersToo many parametersComputationally ExpensiveComputationally ExpensiveNot suitable for coarse textureNot suitable for coarse textureSusceptible to noiseSusceptible to noise

Page 18: Recap Object Representations

18

Law’s Texture MeasuresLaw’s Texture Measures

Feature Extraction scheme based on Feature Extraction scheme based on gradient operatorsgradient operators25 Masks by convolution of 5 125 Masks by convolution of 5 1--D D vectorsvectors

LevelLevel L5 = [ 1 4 6 4 1]L5 = [ 1 4 6 4 1]EdgeEdge E5 = [E5 = [--1 1 --2 0 2 1]2 0 2 1]SpotSpot S5 = [S5 = [--1 0 2 0 1 0 2 0 --1]1]WaveWave W5= [W5= [--1 2 0 1 2 0 --2 1] 2 1] Ripple R5= [ 1 Ripple R5= [ 1 --4 6 4 6 --4 1]4 1]

Law’s Texture Energy Law’s Texture Energy MeasuresMeasures

( )

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

−−−−−−−−−−

=

120214808461201264808412021

55 EL t

[ ]146415 =L

[ ]120215 −−=EInput Image Output Image

( )

⎥⎥⎥⎥⎥⎥

⎢⎢⎢⎢⎢⎢

−−−−−−−−−−

=

10201408046012064080410201

55 SL t

[ ]102015 −−=S

( ) 55 EL t

Output Image

( ) 55 SL t

Page 19: Recap Object Representations

19

Wavelet AnalysisWavelet Analysis

Tool for multiTool for multi--resolution analysisresolution analysisProvides localization in both spatial and Provides localization in both spatial and frequency domainfrequency domainEvery decomposition contains Every decomposition contains information of a specified scale and information of a specified scale and orientationorientation

Wavelet AnalysisWavelet Analysis

Wavelet transform decomposes Wavelet transform decomposes f(xf(x))onto a basis of wavelet functions:onto a basis of wavelet functions:

( )( ) ( ) ( )

( ) ⎟⎠⎞

⎜⎝⎛ −

=

= ∫

abx

ax

where

dxxxfbfW

ba

baa

ϕϕ

ϕ

1

,

,

Page 20: Recap Object Representations

20

Wavelet AnalysisWavelet Analysis22--D Wavelet decomposition is obtained by D Wavelet decomposition is obtained by separable filter bank.separable filter bank.

image

Horizontal Low

HorizontalHigh

2

2

Vert. High

Vert. Low

Vert. High

Vert. Low

2

2

2

2

HH

LL

LH

HL

(Recursive)

Wavelet AnalysisWavelet Analysis

HH

LH

HL

Page 21: Recap Object Representations

21

GaborGabor WaveletsWaveletsAn effective strategy for extracting textural An effective strategy for extracting textural information from imagesinformation from imagesoptimal filtersoptimal filters11 both for both for

orientation and spatial frequency contentorientation and spatial frequency content22--D positionD position

[1] Daugman, ``Uncertainty relation for resolution in space, spatial frequency, and orientation optimized by two-dimensional visual cortical filters," Journal of the Optical Society of America A, vol. 2, pp. 1160-1169, 1985.

GaborGabor FiltersFiltersTwo dimensional Gabor filters over the image domain (x,y) have the following functional form

( ) ( ) ( )[ ] ( ) ( )[ ]000022

022

0 2, yyvxxujyyxx eeyxG −+−−−+−−= πβαπ

(x0,y0) specify position in the image(α,β) specify effective width and length(u0,v0) specify modulation

Page 22: Recap Object Representations

22

GaborGabor FiltersFilters

Real Part of a gabor filter

GaborGabor Filters with different Filters with different orientationsorientations

( ) ( )[ ]( )002cos)(, xxuxgyxG −= π ( ) ( ) ( )[ ]( )002cos, yyvxgyxG −= π

( ) ( ) ( ) ( )[ ]( )00002cos, yyvxxuxgyxG −+−= π ( ) ( ) ( ) ( )[ ]( )00002cos, yyvxxuxgyxG −−−= π

Page 23: Recap Object Representations

23

Steerable PyramidsSteerable Pyramids

Linear multiLinear multi--scale, multiscale, multi--orientation orientation image decompositionimage decompositionBasis functions are directional derivative Basis functions are directional derivative operators in different sizes and operators in different sizes and orientationsorientationsType of overType of over--complete wavelet complete wavelet transformtransformSteerable orientation decompositionSteerable orientation decomposition

Steerable PyramidsSteerable PyramidsImage High Pass Filter

Low Pass 1 Band Pass 1

Band Pass 2

Band Pass 3

Band Pass n

Low Pass 2

(Recursive)2

M

Page 24: Recap Object Representations

24

Steerable PyramidsSteerable Pyramids

Texture MeasuresTexture Measures

EnergyEnergy

EntropyEntropy

( )∑∑= =×

=M

x

N

yii yxI

NMe

1 1

2 ,1

( ) ( )yxIyxINM

Entropy i

M

x

N

yii ,log,1

1 1∑∑= =×

=

Page 25: Recap Object Representations

25

Texture MeasuresTexture Measures

KurtosisKurtosis

SkewSkew

VarianceVariance

( )[ ]3

,

41 1

4

−××

−=∑ ∑= =

σ

µ

NM

yxIk

M

x

N

yi

( )[ ]3

1 1

3,

σ

µ

××

−=∑ ∑= =

NM

yxISkew

M

x

N

yi

( )[ ]

NM

yxIM

x

N

yi

×

−=∑ ∑= =1 1

2

2

, µσ