Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing...

41
Course14 Dynamic Vision

Transcript of Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing...

Page 1: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Course14 Dynamic Vision

Page 2: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Course14 Dynamic Vision

Biological vision can cope with changing world.

----- Moving and changing objects----- Change illumination----- Change View-point----- Other changes

Computer vision does in the similar ways. But we have only focus on:

----- Stationary camera, stationary objects----- Stationary camera, moving objects----- Moving camera, stationary objects----- Moving camera, moving objects

Page 3: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

1.Change Detection

----- Stationary camera, moving objects in scene.

----- Detect moving object from stationary scene.

----- Two or more frames of image.

----- Images are well aligned.

 

Page 4: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(1)  Difference Pictures:DPjk(x, y)=1 , if |fj(x,y) – fk(x,y)| > TDPjk(x, y)=0 , otherwise

PDPjk(x, y)=1 , if fj(x,y) – fk(x,y) > TPDPjk(x, y)=0 , otherwise

NDPjk(x, y)=1 , if fj(x,y) – fk(x,y) < TNDPjk(x, y)=0 , otherwise

Size filter should used to remove small connected components that are due to noisy pixels.Small motion cannot be detected when use size filter.

Page 5: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(2)  Accumulated Difference Pictures

----- a sequence of images taken by a stationary camera at different time.

----- to detect small/slow motion objects by enhancing the difference of pixel values.

ADP0(x,y) = 0

ADPk(x,y) = ADPk-1(x,y) + DP1k(x,y)

Page 6: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

ADP0(x,y) = 0

ADPk(x,y) = ADPk-1(x,y) + DP1k(x,y)

Page 7: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Where

(3) Time-varying Edge Detection:

----- Detect the edges of moving objects.

----- Intensity changes in space and in time make up each other.

dt

tyxdf

ds

tyxdfzyxEt

),,(),,(),,(

otherwise1

1),(if),(),,( yxfyxf

ds

tyxdf

otherwise1

1),,(if),,(),,( tyxdftyxdf

dt

tyxdf

Page 8: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Since spatial and temporal changes of image

complement each other. Either Good intensity

change/Slow object motion or Poor intensity

change/Proper object motion can yield good result

of edge detection of moving objects.

Page 9: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(4) Segment moving object with moving camera

----- Moving objects in stationary scene.

----- Translational moving camera.

When camera is performing translational motion in a stationary scene. The image of the scene looks as if caming out from FOE of the image.

dz

dydz

dx

Y

XFOE

f

f

Page 10: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Do Ego-motion-polar transformation for every frame of images:

In the new images of EMP space, stationary points are displayed only along the polar axis between the frames of image sequence, moving points are not so. Thus, moving points and stationary points can be

separated.

),,(),,( tyxftrE

22 )()( ff YYXXr

)(tan 1

f

f

xX

yY

Page 11: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

2. 3D structure from motion

3D structure from images means to find the depth of

scene of the corresponding feature points in image.

(1) 3D structure from motion of point correspondences:

(1)

TpRp3

Page 12: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

since perspective projection

We have

(2)

Apply to both sides of equ (2)

So,

TPzRPz

pz

P 1 pz

P 1

P

0 TPPRPz

RPP

TPz

Page 13: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Once knowing point correspondences and motion

parameters, 3D depth of image point can be

computed.

Note: the 3D structure will be up to a scale

factor if the absolute value of translation is

uncertain, such as being computed from two

frames of images.

Page 14: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(2) 3D structure from motion of Line Correspondences.

and

are line correspondence over two frames of images.

C

B

A

N

C

B

A

N

Page 15: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Let the corresponding 3D line has the form:

parameter,: nQpL

NRN

NRNn

1

1

(

)(

f)by yoursel derive()(

)()sgn(

1

1

nN

nN

NRN

NRTznNQ

Page 16: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(3) 3D structure from ego-motion camera. ----- Stationary scene.

----- Translationally moving camera with known speed.

----- FOE of image has been computed.

----- Determine the depth of 3D scene.

Ego-motion Complex Log Mapping:

dz

dydz

dx

b

aFOE

jrebYjaX )()(

Page 17: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Where

Define

i.e., u = lnr v =

Now, we want to find the relation of u, v and camera movement in z-direction. Remember that:

22 )()( bYaXr

)(tan 1

aX

bY

),(),(lnln rjvrujrw

z

xX

z

yY (assume f = 1)

Page 18: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

dz

dr

rr

dz

d

dz

du 1ln

dz

bzy

azx

d

bzy

azx

22

22

1

z

1

du

dzz So,

Page 19: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

dz

azx

bzy

d

dz

d

dz

dv

1tan

dz

az

x

bz

y

d

az

x

bz

y

2

1

1

02

a

zx

z

zy

bazx

zy

bazx

Page 20: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

We can conclude that:

----- in ego-motion complex log mapping (EMCLM) space,

is only related the depth changes of scene.

----- Since dz can be measured from the speed of camera movement and du can be computed from image, the depth of scene can be found by

----- The movement of camera in z-direction does not affect the EMCLM velocity. i.e.

dz

du

du

dzz

0dt

dv

Page 21: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(4) Match Correspondences

-----Find the corresponding image features (Points or Lines) from two images frames that correspond to the same features in 3D scene.

1)  Point Matching (relaxation labeling)

Given: a set of feature points in image frame 1 and another set of feature point in image 2.

Find: a unique correspondences of points between the two sets of points.

Page 22: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(a) Defines object set O={o1, o2, …, om} from image points of

frame 1, each element is a node. Define Label set L={l1,

l2, …, ln} from points of frame 2.

(b) Establish relationship set among the nodes of object

nodes, such as neighboring points.

(c) Establish an initial match set

M(0)={(<o1,l1>,<o1,l2>,…<o1,ln>),

……

(<oi,l1>,<oi,l2>,…<oi,ln>)

(<om,l1>,<om,l2>,…<om,ln>)};

i.e. each object node aligned to all labels.

Page 23: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(d) Establish consistency measurement of each node and its related nodes with respect to aligned pairs.

e.g. <oi,li> consistent with <oj,lh>, <ow,lv>, …

Page 24: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Consistency measurement may be based on:

----- geometric relation among node in image.

----- gray level or gradient in the original image of the node.

(e) Compute similarity (or disparity) of each node with respect to matched pair.

e.g. where di, l----- disparity,

such as displacement vector.

Probability of match between oi and li :

lili d

w,

, 1

1

kki

lii w

wilP

,

,)|(

Page 25: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(f) Update match set M(k) iteratively:

If the similarity of <oi,li> is high, encourage the match of

its consistent nodes, otherwise, discourage the match of

its consistent nodes.

e.g.

and, normalize the updated probability; where and are

constant.

i

ii

o,lo

kj

kil jhpq

of nodes related of

yconsistencby near

)()( )|(

))(|()|( )()()1( kil

ki

ki qilpilp

Page 26: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(g)  Remove the match pair of small similarity (small match

probability ) from match set M(k)

(h) Repeat step (f) and (g) until each node has no more

than one label in M(k).

)|()( ilp ki

(2) Match Line correspondences

Given: Two set of Lines in image A and image B resp

ectively.

Find: Unique correspondences of lines between imag

e A and B.

Page 27: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(a)  Matching function:

----- Position disparity.

Relative position in an image:

where is edge direction.

Position disparity between two sub-sets of image

lines from images A and B.

oiojioiojij ppuppd )]sgn([

iu

1

1 121 ),,,;,,2,1(

n

i

n

ijkBkAijn ji

ddkkknd

Page 28: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

----- Orientation disparity:

1

1 121 ),,,;,,2,1(

n

i

n

ijkBkAijn ji

kkkn

Page 29: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

----- Other disparity:• Length of Line• Intensity of original image•  Contrast•  Steepness•  Straightness (residues of Least squares)

(b) Kernel match:

Match a small sub-sets from image Lines of frames A and B, for robustness consideration of the kernel,----- Number of lines should be no less than 3.----- Lines should be long (stable).----- Lines should not be paralleled.----- Lines should be separated as much as possible.

Page 30: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Minimize the match function over selected subjects between two image frames.

----- attribute, such as position ,orientation.

----- weight

(c) Match expansion:

Once kernel matching is completed, the line correspondences obtained will serve a reference for the match of remaining lines.

)21),,,;,,2,1( 2121 nxxn ,..,k,k,n;k,,(kkkn

,1,0 x thx

Page 31: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Choose a longest line from unmatched line of image

A. Add it into the subset of matched kernel of image

A, calculate match functions for every unmatched

line in image B. The line of image B with minimum

match function is considered a matched line. Add this

matched pair of lines into matching kernel and repeat

the process until no further line needs to match.

Page 32: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(3) Tracking

Given: m objects moving in scene, a sequence of n image frames is taken from the scene.

Find: the trajectories of each object in the image sequence.

i.e.

Ti = < Pi1, Pi

2,…, Pin>; i=1,2, … m

If we use dik to be trajectory deviation of frame k.

dik=( Pi

k-1 Pik, Pi

k Pik+1)

We want: for each object.

1

2

minn

k

kii dD

Page 33: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

(a) Path Coherence Function

Assume in consecutive image frames that:

----- change of object location is small. ----- change of scalar velocity is small. ----- change of moving direction is small.

Path coherence function can be defined as

where w1, w2 are weight.

)21()cos1(),,(21

21

21

11

dd

ddwwPPP k

i

k

i

k

i

Page 34: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

----- turning angel from Pik-1 Pi

k to Pik Pi

k+1

d1, d2 ----- distances between Pik-1 , Pi

k and Pik, Pi

k+1

respectively.

(b) Occlusion problem

When occlusions occur in scene from viewpoint. Some target points may lose from some image frames. This causes problem in tracking.

Page 35: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

To solve this problem, we introduce the concept of phantom point:

----- Virtual object point in frames. ----- No specified coordinates. ----- Has maximum distance dmax from the consecutive

frames. ----- Has a maximum value of path coherence function .

Page 36: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

point phantom ispoint any if

features trueare points both if)distance()(Disp

max

11

d

, PP, PP

ki

kik

ik

i

otherwise

points trueare points threeif),(

point phantom is if0

),Dev(

max

11

1

11

k

ik

ik

i

ki

ki

ki

ki , PPP

P

, PPP

Thus:

Page 37: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Tracking algorithm a) Path Initialization

Make initial trajectories for each feature point by linking the nearest point in consecutive frames from frame 1 to frame n. If feature points are missing in some frames, introduce phantom points.

b)  Exchange assignments:

From frame 2 to frame n–1 , for each frame:

i) Perfrom forward exchange:

For each feature point i of frame k, find all the combinations wi

th possible feature j of k+1 frame within a window of dmax.

Page 38: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Calculate:

Gijk = [ Dev ( Pi

k-1 , Pik, Pi

k+1) + Dev( Pjk-1 , Pj

k, Pjk+1)]

–[ Dev( Pik-1 , Pi

k, Pjk+1) + Dev ( Pj

k-1 , Pjk, Pi

k+1)]

Find the i-j pair with maximum value of Gmax=( Gijk).

If Gmax > 0 , exchange the trajectory assignment of i

and j in k+1 frame.

(ii) Perform backward exchange:

For each point i of frame k, find all the combinations with poss

ible point j of frame k-1 within a window of dmax.

Page 39: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Calculate:Gij

k = [ Dev( Pik-1 , Pi

k, Pik+1) + Dev ( Pj

k-1 , Pjk, Pj

k+1)]

–[ Dev( Pjk-1 , Pi

k, Pik+1) + Dev ( Pi

k-1 , Pjk, Pj

k+1)]

Find the ij pair with Gmax=( Gijk).

If Gmax > 0 ,exchange trajectory assignments of i and j in frame k–1.

Note: Final results of trajectories may involve phantom points.

Page 40: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

The lecture is overThe lecture is over

And And

Thank you for your Thank you for your attendanceattendance

Page 41: Course14 Dynamic Vision. Biological vision can cope with changing world. ----- Moving and changing objects ----- Change illumination ----- Change View-point.

Hope you have leant Hope you have leant

some Basic Concept some Basic Concept

ofof

Computer VisionComputer Vision

in this lecture, which in this lecture, which

is helpful in you is helpful in you

research.research.