MATLAB Answers

How to find relative camera pose from homography matrix

10 views (last 30 days)
Nuno Marques
Nuno Marques on 13 Aug 2021
Commented: Matt J on 13 Aug 2021
Hello,
I have a sequence of images, and i need to know the relative pose of my camera in regard to the first frame. I have found the homography matrix and I have all the camera params. How can i get the relative pose using this information?
Thank you in advance.
  2 Comments
Nuno Marques
Nuno Marques on 13 Aug 2021
Hi. Yes, it's from a moving drone. I calculate the Homography matrix in every frame using the current frame and the previous. In other words, im constantly re-calculating the homography matrix.

Sign in to comment.

Answers (2)

Matt J
Matt J on 13 Aug 2021
Edited: Matt J on 13 Aug 2021
Yes, it's from a moving drone.
This means that the camera center is moving. Two images from cameras with different centers cannot be related by a homography, unfortunately. You would have to calculate relative pose by doing single-view geometric calibration of each camera position. If there are 5 or more trackable points in the scene, you may be able to do this.
  7 Comments
Nuno Marques
Nuno Marques on 13 Aug 2021
I also know the extrinsic parameters. And im confused on how to use lsqnonlin(). I've seen the explanation inhttps://www.mathworks.com/help/optim/ug/lsqnonlin.html but i have no ideia how to use it.

Sign in to comment.


Matt J
Matt J on 13 Aug 2021
You might also have a look at the relativeCameraPose() command. According to its documentation,
you have all the required inputs, however, I do not understand how a homography matrix could be enough to get it to work in light of the fact that the camera center is moving.
  4 Comments
Matt J
Matt J on 13 Aug 2021
There are orientation-invariant features that can be used to distinguish them. For example, the separation distances between two of the orange LEDs is smaller than the 3rd in the outer square, and similarly in the inner square.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!