Question baout how to calculate the relative rotation from between two shots.
Open
@fabianschenk is already working on this.
Since Nov 1, 2021.
question
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 899
- PR merge metrics
- No merged PRs in 30d
Description
Hello, opensfm is a great job, thank you. I use opensfm to reconstruct the camera position on a set of images.This group of pictures is taken by a fixed PTZ camera. The camera rotates around the yaw angle, takes 20 images, adjusts the pitch angle and repeats it three times. The reconstructed effect looks good, as shown in the following figure:

At this time, I want to calculate the relative rotation between the two images. The code is as follows.
reconstruction = data.load_reconstruction()[0]
mov_shot_pose = reconstruction.shots["20.jpg"].pose
fixed_pose = reconstruction.shots["0.jpg"].pose
relative_pose = mov_shot_pose.relative_to(fixed_pose)
rotation_matrix = relative_pose.get_rotation_matrix()
euler_angle = relative_pose.get_R_cam_to_world_min()
But this answer is wrong. I would like to ask how to calculate this relative rotation. Look forward to your reply.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.