Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's a really straightforward approach to turning video into feature vectors which you can readily plug into any old ML algorithm. You can turn every decoded frame (which is essentially a PNG, right?) into a (Width*Height)x1 vector, where each cell is an RGB pixel. You can then compose these vectors into a matrix, or perform further operations on them, e.g. SVD. Whether or not this is a good approach, though, will depend of course on your application. For face detection, for example, this is not adequate, and you'll need more sophisticated algorithms. For a good overview of that, see Jason Lawrence's slides[1] and also take a look at some of the other stuff he covered in his Computer Vision course[2].

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...



Thanks for pointers! I'm basically below/at 101 with ML, but have background in computer graphics.

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.


For outlining, my initial reaction is to reach for two things:

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...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: