CPC H04N 13/156 (2018.05) [G06T 5/50 (2013.01); G06T 5/77 (2024.01); G06T 7/50 (2017.01); G06T 7/70 (2017.01); G06V 40/18 (2022.01); H04N 13/128 (2018.05); H04N 13/302 (2018.05); G06T 2207/10012 (2013.01); G06T 2207/20221 (2013.01); G06T 2207/30201 (2013.01); H04N 2013/0081 (2013.01)] | 16 Claims |
1. A stereo image generation method, suitable for an electronic apparatus, the method comprising:
obtaining a two-dimensional (2D) original image corresponding to a first viewing angle, and estimating a depth map of the 2D original image;
detecting interpupillary distance information of a user in real-time through an interpupillary distance detection apparatus;
performing a pixel shift processing on the 2D original image according to the interpupillary distance information of the user and the depth map to generate a reference image corresponding to a second viewing angle;
performing an image inpainting process on the reference image to obtain a restored image;
merging the restored image and the 2D original image to generate a stereo image conforming to a stereo image format, wherein the stereo image comprising a left-eye image and a right-eye image is generated based on the interpupillary distance information detected in real-time;
performing an image weaving processing on the stereo image to stagger pixel data of the left-eye image and pixel data of the right-eye image according to the interpupillary distance information detected in real-time, so as to obtain image data suitable for playback by a stereo display apparatus, wherein the interpupillary distance information detected in real-time for performing the image weaving processing is consistent with the interpupillary distance information detected in real-time for generating the stereo image; and
displaying the image data by the stereoscopic display apparatus for the user with the detected interpupillary distance information.
|