US 12,423,845 B2
Method for obtaining depth images, electronic device, and storage medium
Jung-Hao Yang, New Taipei (TW); Chin-Pin Kuo, New Taipei (TW); and Chih-Te Lu, New Taipei (TW)
Assigned to HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed by HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed on Aug. 29, 2022, as Appl. No. 17/897,568.
Claims priority of application No. 202210716239.3 (CN), filed on Jun. 22, 2022.
Prior Publication US 2023/0419522 A1, Dec. 28, 2023
Int. Cl. G06K 9/00 (2022.01); G06T 7/174 (2017.01); G06T 7/579 (2017.01); G06T 7/70 (2017.01)
CPC G06T 7/579 (2017.01) [G06T 7/174 (2017.01); G06T 7/70 (2017.01); G06T 2207/10016 (2013.01); G06T 2207/10028 (2013.01); G06T 2207/20081 (2013.01); G06T 2207/20084 (2013.01); G06T 2207/30248 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method for obtaining depth images implemented in an electronic device comprising:
obtaining a first image and a second image, the first image and the second image being adjacent frame images;
obtaining a predicted depth map of the first image based on a deep learning network model, and calculating a first error value of the predicted depth map by using a first preset loss function;
determining a first transformation matrix between the first image and the second image;
obtaining an instance segmentation image by performing an instance segmentation process on the first image, and obtaining a first mask image and a second mask image by performing a mask process on the instance segmentation image;
obtaining a target transformation matrix by performing an averaging process on the first transformation matrix according to the first mask image and the second mask image;
obtaining a second transformation matrix by performing the averaging process on the first transformation matrix based on the first mask image;
obtaining a third transformation matrix by perform the averaging process on the first transformation matrix based on the second mask image;
obtaining a target transformation matrix by adding the second transformation matrix and the third transformation matrix;
converting the predicted depth map into a first point cloud image based on internal parameters of a camera device, converting the first point cloud image into a second point cloud image based on the target transformation matrix, and converting the second point cloud image into a third image;
calculating a second error value between the second image and the third image by using a second preset loss function;
obtaining a target deep learning network model by adjusting the deep learning network model according to the first error value and the second error value; and
inputting the image to be detected into the target deep learning network model, and obtaining a depth image of the image to be detected.