要实现高品质的增强现实效果需要解决虚拟物体与现实场景的光照一致性问题.虽然采用HDR技术能获取场景的环境映照,但需要解决所获取的光照环境信息与真实场景的对齐问题.为此提出一种基于特征自动匹配的环境映照对齐方法.首先采用AfIine-SIFT算法和随机抽样一致性算法对环境映照和拍摄场景进行特征匹配并优化匹配结果,然后利用基于运动推断结构的摄像机定标算法求得匹配对的三维位置,从而计算出环境映照与真实场景的对应关系,实现了二者的自动对齐.基于该技术搭建的高真实感实时虚实融合系统采用基于关键帧的相机跟踪技术,可以实时地将虚拟物体注册到拍摄的视频场景里,并允许对其进行实时的交互编辑.在渲染时有效地利用了自动对齐后的光照环境信息,采用重要性采样算法和阴影映射技术实现了实时的高质量渲染.实验结果表明,所搭建的增强现实系统很好地解决了实时虚实融合中的几何一致性和光照一致性问题.
In order to achieve high-quality augmented reality, the problem of illumination consistence between virtual objects and real scenes should be solved. High dynamic range technique can be used to recover the environment map of the scene. However, for using this technique, we need to first solve the align problem between the recovered illumination environment and the real scene. This paper proposes a feature-based alignment algorithm, which can automatically align the illumination environment map with the captured real scene. First, Affine-SIFT is employed to extract and match the common features between the environment map and the captured video. RANSAC method is used to remove the outliers. Then the 3D positions of the matched feature points can be computed by structure-from-motion technique. Finally, according to these 3D matches, the correlation between the environment map and the real scene can be obtained and the automatic alignment is accomplished. Based on this technique, this paper presents a high-quality real-time augmented reality system. The proposed system employs a key-frame based real-time camera tracking technique to robustly register the virtual objects into the online video stream. The users are allowed to real-time edit the realistically inserted virtual objects. During the rendering pass, with the auto-aligned illumination environment,we use the importance sampling algorithm and shadow mapping technique to realistically render the inserted virtual objects. The experimental results demonstrate that the proposed augmented reality system can well address the geometry and illumination consistency problems in real-time composition.