I propose effective enough method of "Optical flow" algorithm based on tracking contour points of segmented images.

Demo version OF_EDV_Demo.zip (2Mb)

Source video sequence

Processing of two adjacent images (visualization: direction - speed --> colour - brightness):

cvCalcOpticalFlowHS (Horn & Schunck algorithm

Input parameters: cvCalcOpticalFlowHS( Img1, Img2, 0, DxVMap, DyVMap, 0.002, cvTermCriteria(CV_TERMCRIT_ITER|CV_TERMCRIT_EPS,20,0.03));

cvCalcOpticalFlowLK (Lucas & Kanade algorithm)

Input parameters: cvCalcOpticalFlowLK( Img1, Img2, cvSize(11,11), DxVMap, DyVMap);

"Block matching method" (Complete look over in radius 4 pixels, size of blocks 17x17, time of processing of two adjacent images - more than one minute)

Proposed method

Processing of three adjacent images with the subsequent addition of the processed adjacent velocity maps and then Gaussian smoothing:

cvCalcOpticalFlowHS (Horn & Schunck algorithm)

cvCalcOpticalFlowLK (Lucas & Kanade algorithm)

"Block matching method"

Proposed method

The propose method can be applied to the motion segmentation and detection of objects in a video sequence:

Hosted by uCoz