An Application of Video Segmentation Using Optical Flows

12
AN APPLICATION OF VIDEO SEGMENTATION USING OPTICAL FLOWS AND DBSCAN CLUSTERING Yusuf Ziya Uzun Artificial Neural Networks – CMP5133

Transcript of An Application of Video Segmentation Using Optical Flows

Page 1: An Application of Video Segmentation Using Optical Flows

AN APPLICATION OF VIDEO

SEGMENTATION USING OPTICAL

FLOWS AND DBSCAN CLUSTERING

Yusuf Ziya Uzun

Artificial Neural Networks – CMP5133

Page 2: An Application of Video Segmentation Using Optical Flows

OBJECTIVES Resample video to desired size Divide video to Images Capture OF (Optical Flow) Vectors DBSCAN clustering Find OF Vector orientation Colorize clusters by using vector

orientations

Page 3: An Application of Video Segmentation Using Optical Flows

A PROBLEM ABOUT VIDEO SEGMENTATION The ground truth does not exist: The

desired results always depend on the user requirements and specifications.

Even for a fixed image, there may be more than one "best" segmentation because the criteria defining the quality of a segmentation are application dependent.

-Pierre Soille

Page 4: An Application of Video Segmentation Using Optical Flows

OPTICAL FLOW Motion: displacement, direction,

velocity, acceleration, time and speed Optical Flow: distribution of the

apparent velocities of objects in an image

Zoom out Zoom in Pan right to left

Page 5: An Application of Video Segmentation Using Optical Flows

OPTICAL FLOW METHODS Two Main Category: Sparse and Dense

Horn and Schunck Kanade-Lucas-Tomasi(KLT)Gunnar - Farneback

Page 6: An Application of Video Segmentation Using Optical Flows

OPTICAL FLOW SEGMENTATION Separate moving objects from

background by using motion vectors(optical flow) Just split image N pieces.

Problems:ApertureBarber-pole (Motion vs Optical)

Closer Objects Have Bigger Velocity? Stereo Vision

Page 7: An Application of Video Segmentation Using Optical Flows

CLUSTERING: DBSCAN Density-based spatial clustering of

applications with noise (DBSCAN) Given a set of points and radius:

Groups close points Alone points become outliers

Page 8: An Application of Video Segmentation Using Optical Flows

IMPLEMENTATION C# and EmguCV Resampling video with ffmpeg manually

Ratio: same in videoSize: 640 px width

Divide video and capture frames (x – 5) and x to compareOF Vectors:

Gunnar – Farneback Dense OF Vectors Gaussian Box Filter A global threshold to remove noise

Page 9: An Application of Video Segmentation Using Optical Flows

IMPLEMENTATION DBSCAN:

Globally defined epsilon and # of pointsComputing clusters of OF vectors

OF vector orientationColoring clusters by looking OF vector

orientations

Page 10: An Application of Video Segmentation Using Optical Flows

DEMO

Page 11: An Application of Video Segmentation Using Optical Flows

CONCLUSION Many Global Variables DBSCAN and OF combination useful Experimental Variables Domain Dependent Not good to use everywhere Can combine with Supervised Learning

Page 12: An Application of Video Segmentation Using Optical Flows

THANK YOU