opencv: Анализ фона и движения. Оптический поток

Download OpenCV: Анализ фона и движения. Оптический поток

Post on 05-Aug-2015

4.353 views

Category:

Documents

15 download

Embed Size (px)

TRANSCRIPT

/ , 2012

4.

http://people.rit.edu/andpph/photofile-misc/strobe-motion-ta-08.jpg

www.uralvision.blogspot.com perevalovds@gmail.com /

: - 3D , . - , . - ( , ).

. , , . : , -, - , ..

-

-

-

1. , . - "code book", , . . : - - , - , , ( ).

2. , N const float k = 0.01; back = (1-k) * back + k * image; , , . . - . .

3. 1. 2. ( , time of filght cameras) 3. Kinect , , .

- " "1. image1, image2 - , . 2. Mat diff; absdiff( image1, image2, diff); 3. Mat bin; // , threshold( diff, bin, 100 /* */, 255, CV_THRESH_BINARY );

- " " , . .

(optical flow, optic flow) - , , (, ) .

: , , -

http://www.ultimategraphics.co.jp/jp/images/stories/ultimate/BCC/optical.jpg

1. , . 2. - , , ( ""). 3. - , .

: . - ( fx(x, y), fy(x,y) ) - .

(I) ("" ) , .

(II) ( ) x, y, t. 1. Lucas-Kanade - . 2. Farneback - , 3. CLG - , OpenCV 4. Lucas-Kanade, " " 5. Horn-Schunk -

(III) () min-cut, max-flow, belief propagation.

1. - (Lucas-Kanade) , . - . : . : "aperture problem" - , . C- OpenCV, cvCalcOpticalFlowLK.

, . , . 10 , line. (: ).

-: Ik(x,y) (, ). : , Vk(x,y) - , Ik Ik+1. , x,y,t - .

I( x, y, t ) - , V( x, y, t ) = (Vx( x, y, t ), Vy( x, y, t ) ) - , (x,y,t).

-, , . , , :

, :

-

(Vx, Vy)- , Ix, Iy, It - . , Vx Vy. , . - . - , . , .

- , , p q1,...,qn:

,

-

,

-

(: , . qi , p. Vx, Vy .)

2. Farneback , .: . : Lucas-Kanade, .

void calcOpticalFlowFarneback( const Mat& prevImg, // , 8- const Mat& nextImg, // , prevImg Mat& flow, // , CV_32FC2 double pyrScale, //