面向增强现实的移动视点下室外视频的阴影检测
Detecting Shadows from Outdoor Videos under Moving Viewpoints for Augmented Reality
-
摘要: 针对增强现实中移动视点下的室外场景检测问题,提出一种基于光流跟踪的阴影在线检测算法.首先将当前帧中待检测的阴影分为将前一帧阴影跟踪过来的阴影部分和因视点改变出现的新阴影部分;然后在GraphCut框架下对跟踪结果进行优化,以消除光流跟踪产生的累积误差;再利用阴影区域的光照特点,如太阳光与天空光强度比值等,提取优化后的跟踪阴影区域的阴影特征,在线地检测新进的阴影区域;最后再次利用GraphCut算法对检测到的初始新阴影区域进行优化,消除基于阈值的方法检测独立新进阴影时产生的误差.在Matlab平台下对不同复杂度的室外场景进行实验的结果表明,该算法不仅能有效地减少跟踪阴影的误差,而且可准确地检测到室外场景中经常存在的软影.Abstract: To detect shadows from a live video captured with a free moving camera in augmented reality (AR), an online algorithm based on optical flow tracking is proposed in this paper. Firstly, the algorithm divides shadows in the current frame into the shadows tracked from previous frame with the optical flow tracking algorithm, and the new shadow caused by the camera movement. To alleviate the inevitably cumulative errors produced in tracking process, we refine tracking results under the framework of Graph Cut optimization. Observing that the tracked and new shadow of a frame should have the same illumination condition such as the same magnitude ratio between the sunlight and skylight, the shadow features from tracked shadows after optimization is extracted to detect new shadows. Finally, to eliminate the error of detecting isolated new shadows based on the thresholding method, the Graph Cut optimization is utilized again to refine new detected shadows. The experimental results demonstrate that the algorithm significantly reduces the cumulative error of tracking. Meanwhile, it is able to accurately detect the soft shadows frequently occurring in outdoor scenes.