Sorry if that's too basic for what you were asking. If you want to see some messy code that does this using OpenCV, here's some I wrote a while back with a friend, starting on line 127: https://github.com/sprestwood/CompVisionS2015/blob/master/te...
[1] http://www.cs.virginia.edu/~gfx/Courses/2015/TopicsVision/le...
[2] http://www.cs.virginia.edu/~gfx/Courses/2015/TopicsVision/sc...
I was wondering if one could utilise ML for either or both of two things: object outline spatial/temporal (feathering can solve for motion blur) and better Chroma key.
1. Kalman filters to track an object in motion within a frame [1]
2. Edge detection on the subframe you got from (1) [2]
Both appear to be available out of the box in OpenCV[3][4], though you'll have to fiddle with parameters I'm sure.
[1] Example: https://www.youtube.com/watch?v=K14SK4v3-IY
[2] https://en.wikipedia.org/wiki/Canny_edge_detector
[3] http://docs.opencv.org/trunk/dd/d6a/classcv_1_1KalmanFilter....
[4] http://docs.opencv.org/2.4/doc/tutorials/imgproc/imgtrans/ca...
https://www.pyimagesearch.com (free tutorials in the blog) https://www.pyimagesearch.com/pyimagesearch-gurus/ (paid for "guru" course)