图像拼接--Creating full view panoramic image mosaics and environment maps

本文介绍了一种创新的全景图像拼接方法,该方法不仅放宽了相机运动的限制,还提供了一种快速且鲁棒的算法,用于解决全景图拼接中的常见问题。与传统的圆柱形和球形全景图相比,该方法能更好地处理任意旋转的图像,同时给出了估算相机焦距的方法。

Creating Full View Panoramic Image Mosaics and Environment Maps
In ACM SIGGRAPH, pages 251–258, 1997
Proceeding SIGGRAPH '97 Proceedings of the 24th annual conference on Computer graphics and interactive techniques

本文针对全景图拼接问题提出了一个新颖的方法。
当前主流拼接算法要求相机的运动受限制: require pure horizontal camera panning
panning 是什么了? 简单来说就是相机固定,在水平方向内转动
In video technology, panning refers to the horizontal scrolling of an image wider than the display

本文提出的算法放宽了约束,只要求没有太大的运动视差
our system does not require any controlled motions or constraints on how the images are taken (as long as there is no strong motion parallax)

手持相机得到的图像可以被很好的拼接起来。

我们使用一组映射来表示我们的 image mosaics,所以不存在singularity problems ,singularity problems 存在于 cylindrical or spherical maps 的 top 和 bottom 位置。 我们的算法是快速鲁棒的,因为它直接求解 3D 旋转矩阵,而不是广义 8 参数 planar perspective transforms,我们也给出计算相机焦距 focal length 的方法。

2 Cylindrical and spherical panoramas
Cylindrical panoramas 圆柱形全景 经常被使用,因为构建它比较简单。为了构建一个圆柱全景图,相机固定在一个 leveled tripod 上面,拍摄得到图像序列。如果相机的焦距或 field of view 已知,那么 每个 perspective 图像可以被 warped 到 圆柱坐标体系内。

在这里插入图片描述
Figure 1a shows two overlapping cylindrical images—notice how horizontal lines become curved.

当我们将输入图像全部映射到圆柱坐标或球型坐标体系内, constructing the panoramic mosaics becomes a pure translation problem 图像全景拼接问题就变为一个单纯的平移问题

Ideally, to build a cylindrical or spherical panorama from a horizontal panning sequence, only the unknown panning angles need to be recovered

在实际问题中,我们也需要考虑垂直方向小的扰动位移。
In practice, small vertical translations are needed to compensate for vertical jitter and optical twist.

Therefore, both a horizontal translation t x and a vertical translation t y are estimated for each input image.
所以对每个输入图像,我们需要估计一直水平位移和一个垂直位移

To recover the translational motion, we estimate the incremental translation δt = (δt x ,δt y ) by minimizing the intensity error
between two images
最优化问题通过泰勒级数展开,通过简单的最小二乘求解 simple least-squares solution
使用 cylindrical or spherical coordinates 创建全景图存在几个问题:
1)相机运动约束较强 it can only handle the simple case of pure panning motion
2) cylindrical or spherical coordinates 在顶部和底部误差较大
even though it is possible to convert an image to 2D spherical or cylindrical coordinates for a known tilting angle, ill-sampling at north pole and south pole causes big registration errors
3)相机焦距的获取有点难度
it requires knowing the focal length (or equivalently, field of view)

3 Perspective (8-parameter) panoramas
针对 cylindrical or spherical coordinates 的问题,有学者提出了 使用 full planar perspective motion models, The planar per-
spective transform warps an image into another using 8 parameters

The 8-parameter perspective transformation recovery algorithm works well provided that initial estimates of the correct transformation are close enough.

运动模型的变量多,所以导致 8-parameter perspective transformation recovery algorithm 收敛很慢,有时得到局部最优解
However, since the motion model contains more free parameters than necessary, it suffers from slow convergence and sometimes gets stuck in local minima

4 Rotational (3-parameter) panoramas
这里我们提出使用 3个参数的 the 3-parameter rotational model
在这里插入图片描述
Figure 2 shows how our method can be used to register four images with arbitrary (non-panning) rotation. Compared to the 8-parameter perspective model, it is much easier and more intuitive to interactively adjust images using the 3-parameter rotational model

5 Estimating the focal length
相机焦距的估计: A convenient way to obtain this estimate to deduce the value from one or more perspective
transforms computed using the 8-parameter algorithm

Alternative techniques for estimating the focal length are presented in [8, 16, 13, 10]

Once an initial set of f estimates is available, we can improve these estimates as part of the image registration process, using the same kind of least squares approach as for the rotation [15]

11

### 使用MATLAB实现分布式摄像头捕捉的全景图片拼接 为了实现在MATLAB中对来自多个分布式的摄像机捕获到的图像进行有效的全景拼接,可以采用多种特征匹配算法来识别不同视角下的共同区域并完成无缝连接。下面将具体描述这一过程,并提供一段基于SIFT算法的代码示例。 #### 选择合适的特征检测器和描述符 对于多视图几何问题来说,选择具有良好鲁棒性的特征点非常重要。考虑到实际应用环境可能存在光照变化、角度差异等因素影响,推荐使用具备尺度不变性和旋转不变性的SIFT算法作为特征提取工具[^5]。此外,也可以考虑其他高效稳定的方案如SURF或ORB等[^2][^4]。 #### 图像预处理 在正式进入拼接流程之前,通常还需要做一些准备工作: - **校正镜头畸变**:如果相机存在明显的径向失真现象,则需先通过已知参数对其进行矫正。 - **调整色彩平衡**:确保各张照片之间颜色一致,减少因设备特性造成的偏差。 ```matlab % 假设img1, img2 是两张待拼接的输入图像 % 这里省略了读取文件的具体命令 % 如果有必要的话执行去畸变操作 if need_undistort img1 = undistortImage(img1); img2 = undistortImage(img2); end % 调整亮度对比度使两幅画面更加接近 adjImg1 = imadjust(img1); adjImg2 = imadjust(img2); imshowpair(adjImg1, adjImg2,'montage'); title('Preprocessed Images') ``` #### 提取特征点与描述子 接下来就是核心部分——定位每帧内的显著位置以及量化这些局部模式的信息。这里选用SIFT函数自动获取关键点及其对应的高维矢量表示形式。 ```matlab points1 = detectSURFFeatures(rgb2gray(adjImg1)); % 或者detectFASTFeatures(),取决于需求 points2 = detectSURFFeatures(rgb2gray(adjImg2)); [features1, validPoints1] = extractFeatures(double(adjImg1), points1); [features2, validPoints2] = extractFeatures(double(adjImg2), points2); figure; showMatchedFeatures(adjImg1, adjImg2, validPoints1, validPoints2,... 'Montage', true); title('Detected Features and Matches Between Two Views') ``` #### 匹配对应关系&剔除异常值 一旦获得了足够的候选匹配项之后,下一步便是筛选出真正可靠的关联对儿。为此引入随机抽样一致性(RANSAC)模型估计技术,它可以帮助排除那些不符合整体结构规律的数据噪声点。 ```matlab indexPairs = matchFeatures(features1, features2,... [basicHomographyMatrix, inlierPointPairs] = estimateGeometricTransform(validPoints1(indexPairs(:,1)),... validPoints2(indexPairs(:,2)),'homography'); disp(['Number of matched pairs after filtering:', num2str(length(inlierPointPairs.Location))]); matchedInliersLeft = validPoints1(Location == indexPairs(inlierPointPairs.Location,1)); matchedInliersRight = validPoints2(Location == indexPairs(inlierPointPairs.Location,2)); figure; showMatchedFeatures(adjImg1, adjImg2, matchedInliersLeft, matchedInliersRight,... 'Montage',true); title('Filtered Inlier Matches After RANSAC Filtering') ``` #### 执行最终融合 当所有前期准备都完成后就可以着手构建完整的全景视图啦!借助于前面算得的基础单应变换矩阵`basicHomographyMatrix`, 可以轻松地把第二张图映射至第一张的空间坐标系内再加以合成。 ```matlab outputViewSize = [max(size(adjImg1)), max(size(adjImg2))]; panorama = warpImages(adjImg1, adjImg2, basicHomographyMatrix, outputViewSize); imshow(panorama); title('Final Panoramic Image Result') ``` 以上即为一套较为通用且易于理解的MATLAB环境下实施分布式摄录装置所产生成片之缝合作业指南。当然针对特定应用场景可能还需做适当修改优化哦!
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值