OpenCV - How to determine and measure the angle between two frames?

I am trying to understand and use OpenCV. I wanted to know if it is possible to find and measure the angle between two frames.

I will explain: the cam is fixed, and the frames can rotate around the center and not move. At the moment, I managed to rotate manually, and I would like to be able to compare frames and return the angle. For instance:

double getRotation(Image img1, Image img2) {
  //Compare the frames

  //Return the value
}

and then rotate it at that angle.

+5
source share
2 answers

If you can detect static objects, e. d. background, in frames you can find points called good_features_to_track ( cvGoodFeaturesToTrack) on the background, and track these points using optical_flow ( cvCalcOpticalFlowPyrLK).

"xy", cvGetAffineTransform.

( ), , cvGetAffineTransform. (. wikipedia):

enter image description here

\theta -

+3

, , hough . , , , , , . , , .

0

All Articles