Today I have many questions, and I need some help, even in some parts of my question. These questions are really urgent to answer, so please try to do everything possible with me.
I am working on image stabilization using the optical flow method. This step was done correctly and gave good results, now I want to implement stabilization for the video, that I have 2 ways to do this: First way: I got the translation and rotation matrices between the features of the first frame and the next frame. Now my supervisor suggested that I do this: Make the canvas larger than the original frame, and copy the first frame in the middle. For each next frame, use the transformation I got to calculate the offset and rotation. Use these options and copy the next frame to the corrected position. This should fix the video.
So how to do this? and please help with features in openCV, if available.
Second way
I tried to do it my own way, and I tried to get the corrected video by deforming the image that I got with the homography matrix, but in any case this does not work with the cvWarpPerspective(). function cvWarpPerspective(). . to fix what I'm doing here to get a stabilized image or what do you suggest?
Question:
1- The homographic matrix gives negative values: right?
2 As I said above about the rotation and translation matrices that I have to do for this equation in order to return the evaluation attribute in the second frame to its place in the first frame
Y = rotation matrix * x + translation matrix
which sometimes gives almost perfect results, and sometimes gives very terrible results, which I get negative values ββand far from the place where they should be, Why is this so?
Please answer what you can answer even if it is a sub question
Thank you very much.
c ++ image image-processing opencv
Mario
source share