The invention provides a method for calculating a
monocular video
depth map. The method is characterized by comprising a step of decomposing a video to be recovered into frames according to a frame, a step of extracting picture feature points of each frame, a step of matching the feature points and forming a feature
point trajectory, a step of calculating a global
rotation matrix and a translation vector, a step of optimizing camera parameters, a step of calculating dense
optical flow of a selected frame, and a step of calculating a depth value of the selected frame to obtain a
depth map. According to the method of the technical scheme, a depth
estimation method of surface from motion (SFM) based on a physical mechanism is used, and a dense
optical flow is used for matching. According to the method, no training sample is needed, optimization
modes of segmentation,
plane fitting and the like are not used, and the calculation quantity is small. At the same time, according to the method, a problem that the depth values of all pixels can not be obtained especially in a texture-free area in a process from sparse reconstruction to dense reconstruction in the prior art is solved, while the calculation efficiency is improved, the accuracy of the
depth map is ensured.