Using OpenCV for video analysis