OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague &...

9
OPPA European Social Fund Prague & EU: We invest in your future.

Transcript of OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague &...

Page 1: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

OPPA European Social FundPrague & EU: We invest in your future.

Page 2: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

Talk Outline

� appearance based tracking

� patch similarity using histogram

� tracking by mean shift

� experiments, discussion

Mean shift 1

Tomáš Svoboda, [email protected] Technical University in Prague, Center for Machine Perception

http://cmp.felk.cvut.czLast update: April 8, 2013

1Please note that the lecture will be accompanied be several sketches and derivations on the blackboardand few live-interactive demos in Matlab

2/21Appearance based tracking

2

2illustration from [1]

3/21Histogram based representation

image patch

5 10 15 20 25

5

10

15

20

25

30

0 50 100 150 200 2500

50

100

150

200

250

300

intensity

freq

uenc

y

histogram for 16 bins

Page 3: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

4/21Patch comparison

image patch

5 10 15 20 25

5

10

15

20

25

30

0 50 100 150 200 2500

50

100

150

200

250

300

intensity

frequ

ency

histogram for 16 bins

image patch

5 10 15 20 25

5

10

15

20

25

50 100 150 200 2500

10

20

30

40

50

60

70

80

intensity

frequ

ency

histogram for 16 bins

5/21histogram difference

assume normalized histograms, i.e∑mu=1 pu = 1

d =√1− ρ[p, q]

where ρ[p, q] is the Bhattacharyyacoefficient

ρ[p, q] =m∑

u=1

√puqu

image patch

5 10 15 20 25

5

10

15

20

25

30

0 50 100 150 200 2500

50

100

150

200

250

300

intensity

frequency

histogram for 16 bins

image patch

5 10 15 20 25

5

10

15

20

25

50 100 150 200 2500

10

20

30

40

50

60

70

80

intensity

frequency

histogram for 16 bins

6/21

Similarity measured by the Bhattacharyyacoefficient

Similarity surface of the frame 206

100 200 300 400 500 600 700

50

100

150

200

250

300

350

400

450

500

5500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

The object is the “4” plate and the model is histogram of image intensities.

s(y) =m∑

u=1

√pu(y)qu

where p(y) is the histogram of image patch at position y and q is thehistogram of the template.

Page 4: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

7/21Problem: finding modes in probability density

Similarity surface of the frame 206

100 200 300 400 500 600 700

50

100

150

200

250

300

350

400

450

500

5500

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

� the complete enumeration of similarity surface can be costly,

� can we do it faster and more elegantly?

8/21

Density Gradient Estimation

9/21Mean shift procedure

3

3Figure borrowed from [4]

Page 5: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

10/21

Meanshift segmentation of colours - colordistribution

4

4Figure from [2]

11/21

Meanshift segmentation of colours - color modesseeking

5

5Figure from [2]

12/21Mean shift segmentation - intensity and space

u, v are here spatial pixel coordinates

different normalization for intensity and spatial coordinates

Page 6: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

13/21Multivariate kernel density estimator

−1−0.5

00.5

1

−1

−0.5

0

0.5

10.2

0.4

0.6

0.8

1

Normal kernel, KN (x) = exp(−12‖x‖2)

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−1

−0.5

0

0.5

1

Epanechnikov kernel, KE(x) = 1 −‖x‖2

Given n data points xi in d-dimensional space Rd.

f̃h,K(x) =1

nhd

n∑

i=1

K

(x− xi

h

)

� looking for extremum of fh,K(x)

� gradient ∇fh,K(x) = 0

14/21Kernels

−1−0.5

00.5

1

−1

−0.5

0

0.5

10.2

0.4

0.6

0.8

1

Normal kernel, KN (x) = exp(−12‖x‖2)

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−1

−0.5

0

0.5

1

Epanechnikov kernel, KE(x) = 1 −‖x‖2

Can be seen as membership function.Remind Kernel density estimation (Parzen method).

Remember convolution? 6

6Taken from http://en.wikipedia.org/wiki/Kernel_density_estimation

15/21Mean-shift iterations

Assuming a reasonable differentiable kernel K, iterate till convergence:

yk+1 =

∑ni=1 xig(‖yk − xi‖2)∑n

i=1 g(‖yk − xi‖2)

g is the derivative of kernel profile.

Page 7: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

16/21Mean-shift tracking - ratio histogram

Ratio histogram:

ru = min

(qu

pu, 1

)

where q is the histogram of the targetand p is the histogram of the currentframe. wi = rb(xi) (just binning)

Image intensities (or colors) are tranformed into weights, wi, by backprojection of the ratio histogram. Mean-shift iterations:

yk+1 =

∑ni=1wixig(‖yk − xi‖2)∑n

i=1wig(‖yk − xi‖2)

17/21Mean-shift tracking - Bhattacharya coeficient

model, coordinates x∗i centered at 0:

qu = Cn∑

i=1

k(‖x∗i‖2)δ(b(x∗

i )− u)

target candidate centered at y:

pu(y) = Ch

nh∑

i=1

k

(∥∥∥∥y − xi

h

∥∥∥∥2)δ(b(xi)− u)

18/21ms tracking - object and its model

7

7Figure from [5]

Page 8: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

19/21ms tracking - iterations

8

8Figure from [5]

20/21References

Mean-shift originally from [3].

[1] Robert Collins. CSE/EE486 Computer Vision I. slides, web page.http://www.cse.psu.edu/~rcollins/CSE486/. Robert kindly gave general permission to reuse thematerial.

[2] Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. IEEETransactions on Pattern Analysis and Machine Analysis, 24(5):603–619, May 2002.

[3] Keinosuke Fukunaga and Larry D. Hostetler. The estimation of the gradient of a density function, withappilcations in pattern recognition. IEEE Transactions on Information Theory, 21(1):32–40, January 1975.

[4] Milan Šonka, Václav Hlaváč, and Roger Boyle. Image Processing, Analysis and Machine Vision.Thomson, 3rd edition, 2007.

[5] Tomáš Svoboda, Jan Kybic, and Václav Hlaváč. Image Processing, Analysis and Machine Vision. AMATLAB Companion. Thomson, 2007. Accompanying www site http://visionbook.felk.cvut.cz.

21/21End

Page 9: OPPA European Social Fund Prague & EU: We invest in your ... · OPPA European Social Fund Prague & EU: We invest in your future. Talk Outline appearance based tracking ... 5 10 15

OPPA European Social FundPrague & EU: We invest in your future.