2014-04-23 15:21:10 -0600 | answered a question | Video Stabilization using opencv In your "warpAffine(frame,warped,Transform_avg,Size( frame.cols, frame.rows));" function, you must specify FLAG as WARP_INVERSE_MAP for stabilization. Sample code I have written: Mat src, prev, curr, rigid_mat, dst; VideoCapture cap("test_a3.avi"); while (1) { bool bSuccess = cap.read(src); if (!bSuccess) //if not success, break loop { cout << "Cannot read the frame from video file" << endl; break; } } Hoping this will solve your problem :) |