我正在尝试使用 openCV 拼接器类来组合航拍图像。我遇到的问题是 Stitcher 类是为旋转相机设置的,我现在有一个平移和旋转相机。
有没有办法处理旋转和平移相机(到目前为止在谷歌上没有找到任何建议或文件等)?特别是在捆绑调整区域,因为这给了我 nan 的。
我正在尝试使用 openCV 拼接器类来组合航拍图像。我遇到的问题是 Stitcher 类是为旋转相机设置的,我现在有一个平移和旋转相机。
有没有办法处理旋转和平移相机(到目前为止在谷歌上没有找到任何建议或文件等)?特别是在捆绑调整区域,因为这给了我 nan 的。
In order to stitch the images together you need to have a homography. In order to get that homography you either have to
1. rotate your camera stationary or
2. take pictures of a planar scene
Since you take aerial shots from different positions you go for point number 2. You have to fly high so that the height of the objects is very small in relation to the flying height, so you can say you have a good approximation to a planar scene. It is recomended to take nadir shots, i.e. shots that are taken towards the centre of the earth.
If you use the stitcher class set the warper to ''PlaneWarper'' for your aerial shots. The Surf featuresfinder with these parameters works fine, at least for me:
Stitcher stitcher = Stitcher::createDefault(false);
stitcher.setWarper(new PlaneWarper());
stitcher.setFeaturesFinder(new detail::SurfFeaturesFinder(1000,3,4,3,4));