Changed to use cv::Mat for motion feature calculation.