Patent ID: 11908096
Assignee: BEIJING XIAOMI MOBILE SOFTWARE CO., LTD.
Field: Audio-visual technology (Electrical engineering)
Classification: CPC G  H | IPC G  H

Claim 17:
18. A non-transitory computer-readable storage medium, wherein when an executable computer program in the storage medium is executed by a processor, the processor:
acquires a first three-dimensional model corresponding to a two-dimensional image according to the two-dimensional image and a depth image;
acquires a target area and an area to be repaired corresponding to the first three-dimensional model, wherein the area to be repaired refers to an area occluded by a foreground object and the area is to be displayed in the case of a viewing angle being changed, and the target area refers to an area providing a color value and a depth value for the area to be repaired;
obtains a second three-dimensional model by repairing a pixel in the area to be repaired according to the color value and the depth value of a pixel in the target area; and
acquires a stereoscopic image to be displayed according to a preset viewing angle change path and the second three-dimensional model;
wherein acquiring the target area and the area to be repaired corresponding to the first three-dimensional model comprises:
acquiring a plurality of sub-graphs corresponding to the first three-dimensional model according to a preset depth threshold, wherein a node of each sub-graph is a depth pixel in a same depth layer;
acquiring a plurality of depth edges corresponding to the first three-dimensional model according to the plurality of sub-graphs, wherein the plurality of depth edges comprise a background depth edge, and the background depth edge refers to a depth edge in which each depth pixel belongs to a background;
performing iterative expansion around a starting point pixel by using each depth pixel in the background depth edge as the starting point pixel, wherein an expanded pixel belongs to a texture area in the case of a position of the expanded pixel being in the same depth layer as a corresponding starting point pixel, and the expanded pixel belongs to an occlusion area in the case of the position of the expanded pixel being not in the same depth layer as the corresponding starting point pixel; and
using the texture area as the target area corresponding to the first three-dimensional model, and using the occlusion area as the area to be repaired corresponding to the first three-dimensional model.