The invention relates to a
virtual reality occlusion handling method, based on a
virtual model pretreatment, in
augmented reality system. The method comprises the steps of utilizing a depth camera KINECT to obtain a
color image and a
gray level image representing depth information; converting the
color image into a
bitmap image capable of being identified and tracked by an
augmented reality occlusion system and registering a
virtual model in a three-dimension mode; combining the three-dimensional registration position of the
virtual model and the self depth of the virtual model to conduct threshold treatment on the
gray level image and extracting the
peripheral contour of a real object; in the render scene of the virtual model, registering a contour coordinate
system in a three-dimensional mode; switching a two-dimensional outline vertex coordinate system into a three-dimensional coordinate corresponding to the actual size, drawing in the contour coordinate system, and using a re-drawn contour as a three-dimensional model to shield the virtual model; combining the
color image and the treated virtual model, filling a real object image into an outline internal area, namely, the
occlusion part of the virtual model, so as to obtain a
virtual reality occlusion effect. According to the method, pre-modeling and comparing the depth information of the virtual model pixel by pixel are not needed, so that the method is suitable for environments with unknown changes and can meet instantaneity requirements.