The invention relates to a binocular image and
object contour-based virtual and actual sheltering treatment method, which comprises the following steps of: accurately calculating the regional contour of a real object by an interactive
image segmentation algorithm, and taking the regional contour as the geometrical information of the real object; and according to the negatively-correlated relation between
parallax and depth, estimating the
parallax of a virtual object under a current
visual angle, determining the
relative depth information between the virtual object and the real object in a current scene, and hierarchically dividing the scene. The front-and-back sheltering relation between the virtual object and the real object is estimated and determined by using the
relative depth information, the depth information is not required to be calculated in a pixel-by-pixel manner; and the virtual and actual sheltering treatment is achieved in a two-dimensional image space, whether the sheltering between the virtual object and the real object exists or not is judged, and corresponding treatment is carried out, so that the binocular image and
object contour-based virtual and actual sheltering treatment method can be applicable to most sheltering circumstances and a better virtual and actual sheltering
treatment effect is achieved. The binocular image and
object contour-based virtual and actual sheltering treatment method can be widely applied to the spatial sheltering treatment of
virtual reality systems, such as interactive
digital entertainment, sports research and
training simulation, distance education and training and the like.