I have n frames of 360x180 panoramic images. I'd like to determine the camera's rotation based on the comparison between two sequential images. For this project it's safe to assume that all features visible in the images are at infinity.
I am new (today) to OpenCV and definitely need to do more reading. I have an app that will find the KeyPoints using either SIFT or SURF, but am unsure of how to continue from here.
Thanks
To find the rotation between to images you need to know orientation of both, and therefore, the pose. To calculate the camera pose you need to find homography transformation from keypoints matches.
Imagine you know the orientation of the first frame and position, because you decide it arbitrarily. You have the keypoints extracted by SIFT. From here you have next steps:
1- Extract keypoints from next frame.
2- Find matches of the keypoints on both frames.
3- Use RANSAC to find the best set of inliers/outliers of that matches for next step
4- Use DLT (Direct Lienar Transform) with that set, this will use 4 matches to find homography between images.
5- Once you have homography, you can extract the pose, and the rotation.
You have openCV functions for all the steps except for pose from homography.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With