Method, device, equipment and storage medium for generating binocular stereoscopic panoramic images
By inputting the panoramic image into the depth estimation model and mapping it into a panoramic image of the left and right eyes, the problem that ordinary devices cannot directly generate binocular stereoscopic panoramic images is solved, and cost reduction and operation simplification is achieved.
Patent Information
- Application Number
- CN202210242661.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-11
- Publication Date
- 2024-12-20
- Estimated Expiration
- 2042-03-11
AI Technical Summary
The prior art is difficult to directly generate binocular stereoscopic panoramic images/videos through ordinary non-stereometric panoramic images/videos, and requires professional-grade multi-lens equipment, which is complex in operation and high in cost.
By inputting the panoramic image into a preset depth estimation model, a depth image is obtained, and the panoramic image is mapped into a panoramic image of the left eye and the right eye according to the preset pupil distance and depth image, thereby generating a binocular stereoscopic panoramic image.
It realizes the direct generation of binocular three-dimensional panoramic images/videos through ordinary non-stereometric panoramic images/videos equipment, which reduces costs, simplifies the operation process, and avoids the need to use professional-grade multi-lens equipment.
Smart Images

Figure CN114742703B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a method, device, equipment and storage medium for generating a binocular stereoscopic panoramic image. Background Art
[0002] With the development of technologies such as virtual reality (VR), users have higher and higher requirements for images. In electronic devices such as VR glasses, binocular stereoscopic panoramic images or videos can be displayed to users, and the left and right eye images are displayed on the left and right eye screens respectively. After users obtain this information with differences, they will have a sense of three-dimensionality in their minds.
[0003] In the traditional method, electronic devices can use multiple lenses to simultaneously shoot the same object, stitch the images captured by multiple lenses into a left-eye panoramic picture and a right-eye panoramic picture, and combine them to obtain a binocular stereoscopic panoramic image. However, the above method generally requires professional-grade multi-lens panoramic shooting equipment, which is complicated to operate and expensive.
[0004] At present, the shooting equipment of ordinary non-stereoscopic panoramic images / videos is very common, and the operation is simple and the cost is low. There is an urgent need for a simple and fast method to directly generate stereoscopic panoramic images / videos from ordinary non-stereoscopic panoramic images / videos. Summary of the invention
[0005] Based on this, it is necessary to provide a method, device, equipment and storage medium for generating a binocular stereo panoramic image in response to the above technical problems, which can directly generate a binocular stereo panoramic image / video from an ordinary non-stereo panoramic image / video.
[0006] In a first aspect, a method for generating a binocular stereo panoramic image is provided, the method comprising:
[0007] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0008] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0009] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0010] In one embodiment, mapping the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture according to a preset pupil distance and a depth image includes:
[0011] According to the preset pupil distance and the depth image, a left-eye mapping relationship and a right-eye mapping relationship are obtained; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between the first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture;
[0012] According to the left-eye mapping relationship and the right-eye mapping relationship, the panoramic images are mapped and projected respectively to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0013] In one embodiment, obtaining a left eye mapping relationship and a right eye mapping relationship according to a preset pupil distance and a depth image includes:
[0014] Obtaining a second coordinate and a third coordinate according to the depth information, the preset pupil distance and the first coordinate;
[0015] The corresponding relationship between the first coordinate and the second coordinate is determined as a left-eye mapping relationship; and the corresponding relationship between the first coordinate and the third coordinate is determined as a right-eye mapping relationship.
[0016] In one embodiment, obtaining the second coordinate according to the depth information, the preset pupil distance and the first coordinate includes:
[0017] According to the formula Calculate the longitude coordinate in the second coordinate;
[0018] Determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate;
[0019] Wherein, φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, and L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0020] In one embodiment, obtaining the third coordinate according to the depth information, the preset pupil distance, and the longitude coordinate in the first coordinate includes:
[0021] According to the formula Calculate the longitude coordinate in the third coordinate;
[0022] Determine the latitude coordinate in the first coordinate as the latitude coordinate in the third coordinate;
[0023] Where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0024] In one embodiment, the method further comprises:
[0025] Acquire training samples; the training samples include panoramic sample images and sample depth images corresponding to the panoramic sample images;
[0026] The panoramic sample image is used as the reference input of the initial depth estimation model, the sample depth image is used as the reference output of the initial depth estimation model, the initial depth estimation model is trained according to a preset loss function, and a depth estimation model is obtained.
[0027] In a second aspect, a method for generating a binocular stereoscopic panoramic video is provided, the method comprising:
[0028] Using the binocular stereo panoramic image generation method described in the first aspect, each panoramic image in the panoramic video is mapped into a binocular stereo panoramic image;
[0029] Based on the binocular stereo panoramic images, a binocular stereo panoramic video is generated.
[0030] In a third aspect, a device for generating a binocular stereoscopic panoramic image is provided, the device comprising:
[0031] An acquisition module is used to input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image; the depth image includes depth information corresponding to each pixel in the panoramic image;
[0032] A mapping module, used for mapping the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture according to a preset pupil distance and a depth image;
[0033] The generating module is used to generate a binocular stereoscopic panoramic image according to the left eye panoramic image and the right eye panoramic image.
[0034] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0035] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0036] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0037] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0038] In a fifth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0039] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0040] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0041] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0042] In a sixth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0043] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0044] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0045] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0046] The above binocular stereo panoramic image generation method, device, equipment and storage medium, the electronic device inputs the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image; then, according to the depth image and the preset pupil distance, the panoramic image is mapped into a left eye panoramic picture and a right eye panoramic picture; a binocular stereo panoramic image is generated according to the left eye panoramic picture and the right eye panoramic picture; wherein the above depth image includes the depth information corresponding to each pixel point in the panoramic image. Since the electronic device can obtain the depth image of the panoramic image, the above panoramic image can be mapped into a left eye panoramic picture and a right eye panoramic picture respectively according to the depth image and the preset pupil distance to obtain a binocular stereo panoramic image, so that the electronic device can complete the mapping conversion between the panoramic image and the binocular stereo panoramic image, without the need to complete the acquisition of the binocular panoramic stereo image through professional multi-lens panoramic shooting equipment, which reduces the cost of the electronic device and is simple to operate. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] Figure 1 A diagram of an application environment of a method for generating a binocular stereoscopic panoramic image in one embodiment;
[0048] Figure 21 is a flow chart of a method for generating a binocular stereoscopic panoramic image in one embodiment;
[0049] Figure 3 is a schematic diagram of a method for generating a binocular stereo panoramic image in one embodiment;
[0050] Figure 4 is a flow chart of a method for generating a binocular stereoscopic panoramic image in another embodiment;
[0051] Figure 5 is a flow chart of a method for generating a binocular stereoscopic panoramic image in another embodiment;
[0052] Figure 6 is a flow chart of a method for generating a binocular stereoscopic panoramic image in another embodiment;
[0053] Figure 7 is a structural block diagram of a device for generating a binocular stereoscopic panoramic image in one embodiment;
[0054] Figure 8 is a structural block diagram of a device for generating a binocular stereoscopic panoramic image in another embodiment;
[0055] Fig. 9 is a structural block diagram of a device for generating a binocular stereoscopic panoramic image in another embodiment;
[0056] Fig.10 is a structural block diagram of a device for generating a binocular stereoscopic panoramic image in another embodiment;
[0057] Fig.11 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0059] The method for generating a binocular stereoscopic panoramic image provided in the present application can be applied to an electronic device, and the electronic device can process the panoramic image to obtain a binocular stereoscopic panoramic image corresponding to the panoramic image. The above-mentioned electronic device may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The above-mentioned electronic device may also be an imaging device such as a camera or a camcorder; the above-mentioned camera may be, but is not limited to, an ordinary camera, a pocket camera, an anti-shake camera, a virtual reality (VR) panoramic camera, a sports camera, and a consumer-grade or professional-grade panoramic camera, etc.
[0060] In one embodiment, Figure 1 As shown, a method for generating a binocular stereoscopic panoramic image is provided, and the method is applied to an electronic device as an example for explanation, comprising:
[0061] S101. Input a panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image; the depth image includes depth information corresponding to each pixel in the panoramic image.
[0062] Among them, the panoramic image can be obtained by shooting with an electronic device, or it can be an image stored in the electronic device, which is not limited here. The panoramic image obtained by shooting with an electronic device can be an image shot by the electronic device through a panoramic camera, or it can be an image frame in a video shot by the electronic device, which is not limited here. When the panoramic image is an image stored in an electronic device, it can be stored in the electronic device in a picture format, or it can be a video frame in a stored video. For example, the electronic device can be a VR glasses, and the panoramic image can be a panoramic image input into the VR glasses to be played.
[0063] The camera of the electronic device can be a dual fisheye panoramic camera. When the electronic device takes a panoramic image, any angle can be covered by the field of view of one of the lenses of the dual fisheye panoramic camera. The electronic device can stitch images taken by different lenses to obtain a panoramic image.
[0064] The above-mentioned depth estimation model may be a neural network model, and the above-mentioned depth estimation model may be used to extract the depth information of each pixel in the panoramic image, and generate a depth image corresponding to the panoramic image according to the depth information corresponding to each pixel. The above-mentioned depth information refers to the distance between the object represented by the pixel in the image and the center of the camera when shooting the panoramic image.
[0065] The electronic device may input the panoramic image into the above-mentioned depth estimation model, or may pre-process the panoramic image before inputting it into the depth estimation model, which is not limited here. For example, the pre-processing operation of the panoramic image by the electronic device may include downsampling the panoramic image, changing the projection method of the panoramic image, changing the brightness or contrast of the panoramic image, and converting the panoramic image into a single-channel grayscale image. The above-mentioned depth estimation model may output a depth image corresponding to the panoramic image, and the size of the above-mentioned depth image may be equal to the panoramic image or smaller than the panoramic image, which is not limited here.
[0066] The depth image and the panoramic image may adopt the same panoramic projection method, and the panoramic projection method may be a spherical projection or an equidistant cylindrical projection, which is not limited here.
[0067] S102: Map the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture according to a preset pupil distance and a depth image.
[0068] On the basis of obtaining the depth image, the electronic device may map the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture, so that the parallax generated by the left-eye panoramic picture and the right-eye panoramic picture corresponds to the depth image.
[0069] When the user watches the left eye panoramic picture with the left eye and the right eye panoramic picture with the right eye, the same object appears in different positions between the left eye and the right eye, which is called parallax. The larger the parallax, the closer the user perceives the object to be; the smaller the parallax, the farther the user perceives the object to be.
[0070] After the electronic device maps the panoramic image into the corresponding left-eye panoramic screen and right-eye panoramic screen, the distance perceived by the user through the parallax generated by the above binocular stereoscopic panoramic image corresponds to the above depth image. For example, the above panoramic image includes object A, and the depth information corresponding to the object A in the depth image obtained by the depth estimation model is H; after the electronic device maps the panoramic image into the left-eye panoramic screen and the right-eye panoramic screen based on the above depth image, the user can perceive the distance of the object A from the user through the left-eye panoramic screen and the right-eye panoramic screen, and the distance corresponds to the depth information H.
[0071] Specifically, the electronic device may use an omni-directional stereo (ODS) projection method to map the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture.
[0072] S103: Generate a binocular stereoscopic panoramic image according to the left-eye panoramic picture and the right-eye panoramic picture.
[0073] On the basis of obtaining the left-eye panoramic picture and the right-eye panoramic picture, the electronic device can compose the left-eye panoramic picture and the right-eye panoramic picture into a binocular stereoscopic panoramic image.
[0074] In the above binocular stereo panoramic image generation method, the electronic device inputs the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image; then, according to the depth image and the preset pupil distance, the panoramic image is mapped into a left eye panoramic picture and a right eye panoramic picture; a binocular stereo panoramic image is generated according to the left eye panoramic picture and the right eye panoramic picture; wherein the above depth image includes the depth information corresponding to each pixel point in the panoramic image. Since the electronic device can obtain the depth image of the panoramic image, the above panoramic image can be mapped into a left eye panoramic picture and a right eye panoramic picture respectively according to the depth image and the preset pupil distance to obtain a binocular stereo panoramic image, so that the electronic device can complete the mapping conversion between the panoramic image and the binocular stereo panoramic image without the need to complete the acquisition of the binocular panoramic stereo image through professional multi-lens panoramic shooting equipment, which reduces the cost of the electronic device and is simple to operate.
[0075] Figure 2 FIG. 1 is a flow chart of a method for generating a binocular stereoscopic panoramic image in one embodiment. This embodiment relates to a method for an electronic device to map a panoramic image into a left-eye panoramic picture and a right-eye panoramic picture. Based on the above embodiment, Figure 2 As shown, the above S102 includes:
[0076] S201. Obtain a left-eye mapping relationship and a right-eye mapping relationship according to a preset pupil distance and a depth image; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between a first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture.
[0077] The pupil distance may be used to represent the distance between the left pupil and the right pupil of the user. In one implementation, a preset value of the pupil distance may be stored in the electronic device, and the panoramic image may be mapped using the preset value.
[0078] In another implementation, the electronic device may use different pupil distances for different users; the electronic device may preset a correspondence between different user accounts and pupil distances, and the pupil distance in the above correspondence may be input by the user, or selected by the user from a plurality of preset values, or obtained by the electronic device based on user image extraction, and the method for obtaining the above pupil distance is not limited here. For example, when a user uses an electronic device, the user may capture images through the electronic device or a terminal such as a mobile phone connected to the electronic device, and the above image capture process may be during the user registration process or the login process, which is not limited here.
[0079] In another implementation, different types of electronic devices may correspond to different pupil distances. For example, the electronic device may be a VR pair of glasses or a smart helmet, etc. Different pupil distances may be used for different electronic devices to meet the mapping requirements of binocular stereoscopic panoramic images of the electronic device.
[0080] On the basis of obtaining the pupil distance and the depth image, the electronic device can obtain the left-eye mapping relationship and the right-eye mapping relationship corresponding to the panoramic image based on the ODS mapping method.
[0081] The above mapping relationship is a coordinate correspondence relationship. For the pixel points in the panoramic image, they can be mapped to the left eye panoramic picture and the right eye panoramic picture respectively. The coordinates of the above pixel points in the panoramic image can be the first coordinates, the coordinates in the left eye panoramic picture can be the second coordinates, and the coordinates in the right eye panoramic picture can be the third coordinates, such as Figure 3 The left-eye mapping relationship is the correspondence between the first coordinate and the second coordinate of each pixel point in the panoramic image, and the right-eye mapping relationship is the correspondence between the first coordinate and the third coordinate of each pixel point in the panoramic image.
[0082] S202 . According to the left-eye mapping relationship and the right-eye mapping relationship, the panoramic images are respectively projected to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0083] After obtaining the left eye mapping relationship and the right eye mapping relationship, the electronic device can determine to which position the pixel points in the panoramic image are mapped, and then determine the coordinates of each pixel point in the left eye panoramic picture and the right eye panoramic picture. After matching the above-mentioned second coordinates with the corresponding pixel values, the left eye panoramic picture is obtained. After matching the above-mentioned third coordinates with the corresponding pixel values, the right eye panoramic picture is obtained.
[0084] The above-mentioned method for generating binocular stereoscopic panoramic images, the electronic device obtains the left eye mapping relationship and the right eye mapping relationship through the pupil distance and the depth image, and can accurately map the panoramic image into a binocular stereoscopic panoramic image, so that the binocular stereoscopic panoramic image can present a stereoscopic effect corresponding to the depth information of the panoramic image.
[0085] Figure 4 FIG. 1 is a flow chart of a method for generating a binocular stereoscopic panoramic image in an embodiment. This embodiment relates to a way for an electronic device to obtain a left-eye mapping relationship and a right-eye mapping relationship. Based on the above embodiment, Figure 4 As shown, the above S201 includes:
[0086] S301. Acquire the second coordinate and the third coordinate according to the depth information, the preset pupil distance and the first coordinate.
[0087] The first coordinate, the second coordinate and the third coordinate may be spherical coordinates or three-dimensional plane coordinates, which are not limited here. The electronic device may perform coordinate mapping according to a preset formula to calculate the second coordinate and the third coordinate corresponding to each first coordinate.
[0088] In one implementation, each pixel point in the panoramic image and the depth image may be identified by using spherical coordinates; that is, the coordinates of each pixel point may be composed of longitude coordinates and latitude coordinates.
[0089] The above-mentioned preset formula may include a longitude coordinate calculation formula and a latitude coordinate calculation formula. Among them, the longitude coordinates in the above-mentioned second coordinate and the third coordinate may be related to the depth information, the preset pupil distance and the longitude coordinate in the first coordinate. For the same first coordinate, the longitude coordinate of the corresponding second coordinate is different from the longitude coordinate of the third coordinate. The difference between the longitude coordinate of the above-mentioned second coordinate and the longitude coordinate of the third coordinate can be obtained by the ratio of the pupil distance to the depth information corresponding to the coordinate. Since the parallax generated by the left eye panoramic picture and the right eye panoramic picture is mainly related to the longitude coordinate for generating distance information, the electronic device can directly determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate and the latitude coordinate in the third coordinate.
[0090] For the second coordinate, the electronic device can use the formula Calculate the longitude coordinate in the second coordinate, and determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate. Where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0091] The third coordinate, the electronic device can be based on the formula Calculate the longitude coordinate in the third coordinate, and determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate. Where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0092] That is to say, the formula for calculating the latitude coordinate in the above preset formula can be:
[0093] R θ (φ,θ)=L θ (φ,θ)=θ
[0094] Among them, Lθ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, R θ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate.
[0095] S302, determining the corresponding relationship between the first coordinate and the second coordinate as a left-eye mapping relationship; and determining the corresponding relationship between the first coordinate and the third coordinate as a right-eye mapping relationship.
[0096] Based on the second coordinate and the third coordinate, the electronic device can determine the correspondence between the first coordinate and the second coordinate of each pixel point as the left eye mapping relationship, and determine the correspondence between the first coordinate and the third coordinate as the right eye mapping relationship.
[0097] In the above binocular stereoscopic panoramic image generation method, the electronic device uses spherical coordinates to complete coordinate mapping, which can be applied to panoramic images of any projection method, thereby improving the applicability of mapping panoramic images to binocular stereoscopic panoramic images.
[0098] Figure 5 FIG. 1 is a flow chart of a method for generating a binocular stereoscopic panoramic image in an embodiment. This embodiment relates to an implementation of a depth estimation model. Based on the above embodiment, Figure 5 As shown, the above method also includes:
[0099] S401, obtaining training samples; the training samples include panoramic sample images and sample depth images corresponding to the panoramic sample images.
[0100] The electronic device can obtain a binocular stereo panoramic sample image, and then extract depth information from the binocular stereo panoramic sample image to obtain a sample depth image corresponding to the binocular stereo panoramic sample image; further, the electronic device can perform monocular processing on the binocular stereo panoramic sample image to obtain a panoramic sample image corresponding to the binocular stereo panoramic sample image. The panoramic sample image and its corresponding sample depth image constitute a training sample.
[0101] In another implementation, a binocular stereo panoramic camera and a monocular panoramic camera can be used to shoot the same scene at the same time to obtain a binocular stereo panoramic sample image and a panoramic sample image respectively, and then a sample depth image is generated according to the binocular stereo panoramic sample image to obtain the above-mentioned training samples.
[0102] S402: Using the panoramic sample image as a reference input of an initial depth estimation model, using the sample depth image as a reference output of the initial depth estimation model, training the initial depth estimation model according to a preset loss function, and obtaining a depth estimation model.
[0103] Based on the acquisition of training samples, the electronic device can use the panoramic sample image as the reference input of the initial depth estimation model, and the sample depth image as the reference output of the initial depth estimation model, and train the initial depth estimation model according to a preset loss function to obtain a depth estimation model.
[0104] The above binocular stereo panoramic image generation method can obtain a depth estimation model through sample training, so that the depth image of the panoramic image can be obtained according to the depth estimation model, providing a data basis for mapping from the panoramic image to the binocular stereo panoramic image.
[0105] In one embodiment, a method for generating a binocular stereoscopic panoramic image is provided. Figure 6 As shown, the above method includes:
[0106] S501, inputting the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image;
[0107] S502, according to the formula Calculate the longitude coordinate of the pixel point in the panoramic image in the second coordinate in the left eye panoramic picture;
[0108] S503, according to the formula Calculate the longitude coordinate of the pixel point in the panoramic image in the third coordinate of the right eye panoramic picture;
[0109] S504, determining the latitude coordinate of the pixel point in the first coordinate in the monocular panoramic picture as the latitude coordinate in the second coordinate and the latitude coordinate in the third coordinate;
[0110] S505, determining the corresponding relationship between the first coordinate and the second coordinate as a left-eye mapping relationship; and determining the corresponding relationship between the first coordinate and the third coordinate as a right-eye mapping relationship;
[0111] S506 , mapping and projecting the panoramic images respectively according to the left-eye mapping relationship and the right-eye mapping relationship to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0112] S507 , generating a binocular stereoscopic panoramic image according to the left-eye panoramic picture and the right-eye panoramic picture.
[0113] The technical principle and implementation effect of the above binocular stereo panoramic image generation method can be found in the above embodiments and will not be elaborated here.
[0114] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0115] In one embodiment, a method for generating a binocular stereoscopic panoramic video is provided. An electronic device can adopt the above-mentioned method for generating a binocular stereoscopic panoramic image to map each panoramic image in a panoramic video into a binocular stereoscopic panoramic image; then, a binocular stereoscopic panoramic video is generated based on each binocular stereoscopic panoramic image.
[0116] The implementation principle and technical effect of the above-mentioned binocular stereoscopic panoramic video generation method can be found in the embodiment of the above-mentioned binocular stereoscopic panoramic image generation method, which will not be described in detail here.
[0117] Based on the same inventive concept, the embodiment of the present application also provides a binocular stereoscopic panoramic image generation device for implementing the binocular stereoscopic panoramic image generation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more binocular stereoscopic panoramic image generation devices provided below can refer to the limitations of the binocular stereoscopic panoramic image generation method above, and will not be repeated here.
[0118] In one embodiment, Figure 7 As shown, a device for generating a binocular stereoscopic panoramic image is provided, comprising:
[0119] The acquisition module 10 is used to input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image; the depth image includes depth information corresponding to each pixel in the panoramic image;
[0120] A mapping module 20, for mapping the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture according to a preset pupil distance and a depth image;
[0121] The generating module 30 is used to generate a binocular stereoscopic panoramic image according to the left-eye panoramic picture and the right-eye panoramic picture.
[0122] In one embodiment, based on the above embodiment, Figure 8 As shown, the mapping module 20 includes:
[0123] The acquisition unit 201 is used to obtain a left-eye mapping relationship and a right-eye mapping relationship according to a preset pupil distance and a depth image; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between the first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture;
[0124] The mapping unit 202 is used to map and project the panoramic images according to the left-eye mapping relationship and the right-eye mapping relationship to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0125] In one embodiment, based on the above embodiment, Fig. 9 As shown, the acquisition unit 201 includes:
[0126] An acquisition subunit 2011 is used to acquire a second coordinate and a third coordinate according to the depth information, a preset pupil distance and the first coordinate;
[0127] The determination subunit 2012 is configured to determine the correspondence between the first coordinate and the second coordinate as a left-eye mapping relationship; and determine the correspondence between the first coordinate and the third coordinate as a right-eye mapping relationship.
[0128] In one embodiment, based on the above embodiment, the acquisition subunit 2011 is specifically used to: Calculate the longitude coordinate in the second coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0129] In one embodiment, based on the above embodiment, the acquisition subunit 2011 is specifically used to: Calculate the longitude coordinate in the third coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the third coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0130] In one embodiment, based on the above embodiment, Fig.10As shown, the above-mentioned device also includes a training module 40, which is used to: obtain training samples; the training samples include a panoramic sample image, and a sample depth image corresponding to the panoramic sample image; use the panoramic sample image as a reference input of the initial depth estimation model, use the sample depth image as a reference output of the initial depth estimation model, train the initial depth estimation model according to a preset loss function, and obtain a depth estimation model.
[0131] The technical principle and implementation effect of the above-mentioned binocular stereoscopic panoramic image generation device can be found in the above-mentioned method embodiment, and will not be described in detail here.
[0132] Each module in the above binocular stereo panoramic image generation device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0133] In one embodiment, an electronic device is provided, whose internal structure diagram can be as follows: Fig.11 As shown. The electronic device includes a processor, a memory, a communication interface, a display screen and an input device connected via a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for generating a binocular stereoscopic panoramic image is implemented. The display screen of the electronic device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covered on the display screen, or a button, a trackball or a touch pad set on the housing of the electronic device, or an external keyboard, touch pad or mouse, etc.
[0134] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0135] In one embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:
[0136] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0137] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0138] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0139] In one embodiment, the processor further implements the following steps when executing the computer program: obtaining a left-eye mapping relationship and a right-eye mapping relationship according to a preset pupil distance and a depth image; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between a first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture; and according to the left-eye mapping relationship and the right-eye mapping relationship, respectively mapping and projecting the panoramic images to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0140] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the second coordinate and the third coordinate according to the depth information, the preset pupil distance and the first coordinate; determining the correspondence between the first coordinate and the second coordinate as the left eye mapping relationship; and determining the correspondence between the first coordinate and the third coordinate as the right eye mapping relationship.
[0141] In one embodiment, when the processor executes the computer program, it also implements the following steps: according to the formula Calculate the longitude coordinate in the second coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0142] In one embodiment, when the processor executes the computer program, it also implements the following steps: according to the formula Calculate the longitude coordinate in the third coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the third coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0143] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining training samples; the training samples include a panoramic sample image, and a sample depth image corresponding to the panoramic sample image; using the panoramic sample image as a reference input of an initial depth estimation model, using the sample depth image as a reference output of the initial depth estimation model, training the initial depth estimation model according to a preset loss function, and obtaining a depth estimation model.
[0144] In one embodiment, when the processor executes the computer program, the following steps are also implemented: executing the steps of the method for generating a binocular stereo panoramic image, mapping each panoramic image in the panoramic video into a binocular stereo panoramic image; and generating a binocular stereo panoramic video based on each binocular stereo panoramic image.
[0145] The implementation principle and technical effect of the electronic device provided in this embodiment are similar to those of the above method embodiment, and will not be described in detail here.
[0146] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0147] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0148] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0149] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0150] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the preset pupil distance and the depth image, a left-eye mapping relationship and a right-eye mapping relationship are obtained; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between a first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture; according to the left-eye mapping relationship and the right-eye mapping relationship, the panoramic images are respectively mapped and projected to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0151] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the depth information, the preset pupil distance and the first coordinate, the second coordinate and the third coordinate are obtained; the corresponding relationship between the first coordinate and the second coordinate is determined as a left eye mapping relationship; and the corresponding relationship between the first coordinate and the third coordinate is determined as a right eye mapping relationship.
[0152] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the formula Calculate the longitude coordinate in the second coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0153] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the formula Calculate the longitude coordinate in the third coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the third coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0154] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining training samples; the training samples include a panoramic sample image, and a sample depth image corresponding to the panoramic sample image; using the panoramic sample image as a reference input of an initial depth estimation model, using the sample depth image as a reference output of the initial depth estimation model, training the initial depth estimation model according to a preset loss function, and obtaining a depth estimation model.
[0155] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: executing the steps of the method for generating a binocular stereo panoramic image, mapping each panoramic image in the panoramic video into a binocular stereo panoramic image respectively; and generating a binocular stereo panoramic video based on each binocular stereo panoramic image.
[0156] The computer-readable storage medium provided in this embodiment has similar implementation principles and technical effects to those of the above method embodiments, and will not be described in detail here.
[0157] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0158] Input the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, where the depth image includes depth information corresponding to each pixel in the panoramic image;
[0159] According to the preset pupil distance and the depth image, the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture;
[0160] A binocular stereoscopic panoramic image is generated based on the left-eye panoramic image and the right-eye panoramic image.
[0161] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to the preset pupil distance and the depth image, a left-eye mapping relationship and a right-eye mapping relationship are obtained; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between a first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture; according to the left-eye mapping relationship and the right-eye mapping relationship, the panoramic images are respectively mapped and projected to generate a left-eye panoramic picture and a right-eye panoramic picture.
[0162] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: based on the depth information, the preset pupil distance and the first coordinate, the second coordinate and the third coordinate are obtained; the corresponding relationship between the first coordinate and the second coordinate is determined as a left eye mapping relationship; and the corresponding relationship between the first coordinate and the third coordinate is determined as a right eye mapping relationship.
[0163] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the formula Calculate the longitude coordinate in the second coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0164] In one embodiment, when the computer program is executed by the processor, the following steps are further implemented: according to the formula Calculate the longitude coordinate in the third coordinate; determine the latitude coordinate in the first coordinate as the latitude coordinate in the third coordinate; where φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
[0165] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining training samples; the training samples include a panoramic sample image, and a sample depth image corresponding to the panoramic sample image; using the panoramic sample image as a reference input of an initial depth estimation model, using the sample depth image as a reference output of the initial depth estimation model, training the initial depth estimation model according to a preset loss function, and obtaining a depth estimation model.
[0166] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: executing the steps of the method for generating a binocular stereo panoramic image, mapping each panoramic image in the panoramic video into a binocular stereo panoramic image respectively; and generating a binocular stereo panoramic video based on each binocular stereo panoramic image.
[0167] The implementation principle and technical effects of the computer program product provided in this embodiment are similar to those of the above method embodiments and will not be described in detail here.
[0168] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0169] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0170] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for generating a binocular stereo panoramic image, characterized in that: The method comprises: Inputting the panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image, wherein the depth image includes depth information corresponding to each pixel in the panoramic image; A mapping relationship is determined according to a preset pupil distance and the depth image, and the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture based on the mapping relationship; the mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a target coordinate corresponding to the pixel point in the left-eye panoramic picture and the right-eye panoramic picture; the longitude coordinate of the target coordinate is obtained by performing an arcsine process on the preset pupil distance and the depth information, and the latitude coordinate of the target coordinate is the latitude coordinate of the first coordinate; A binocular stereoscopic panoramic image is generated according to the left-eye panoramic picture and the right-eye panoramic picture.
2. The method according to claim 1, characterized in that The mapping relationship includes a left-eye mapping relationship and a right-eye mapping relationship, the target coordinates include a second coordinate in the left-eye panoramic picture and a third coordinate in the right-eye panoramic picture, the mapping relationship is determined according to a preset pupil distance and the depth image, and the panoramic image is mapped into a left-eye panoramic picture and a right-eye panoramic picture based on the mapping relationship, including: According to the preset pupil distance and the depth image, a left-eye mapping relationship and a right-eye mapping relationship are obtained; the left-eye mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a second coordinate of the pixel point in the left-eye panoramic picture; the right-eye mapping relationship includes a correspondence between the first coordinate and a third coordinate of the pixel point in the right-eye panoramic picture; According to the left-eye mapping relationship and the right-eye mapping relationship, the panoramic images are mapped and projected respectively to generate the left-eye panoramic picture and the right-eye panoramic picture.
3. The method according to claim 2, characterized in that The obtaining of the left eye mapping relationship and the right eye mapping relationship according to the preset pupil distance and the depth image includes: Acquire the second coordinate and the third coordinate according to the depth information, the preset pupil distance and the first coordinate; The corresponding relationship between the first coordinate and the second coordinate is determined as the left-eye mapping relationship; and the corresponding relationship between the first coordinate and the third coordinate is determined as the right-eye mapping relationship.
4. The method according to claim 3, characterized in that Acquiring the second coordinate according to the depth information, the preset pupil distance and the first coordinate includes: According to the formula Calculate the longitude coordinate in the second coordinate; Determine the latitude coordinate in the first coordinate as the latitude coordinate in the second coordinate; Wherein, φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, and L φ (φ,θ) is the longitude coordinate in the second coordinate corresponding to the first coordinate, and p is the preset pupil distance.
5. The method according to claim 3, characterized in that: Acquiring the third coordinate according to the depth information, the preset pupil distance, and the longitude coordinate in the first coordinate includes: According to the formula Calculate the longitude coordinate in the third coordinate; Determine the latitude coordinate in the first coordinate as the latitude coordinate in the third coordinate; Wherein, φ is the longitude coordinate in the first coordinate; θ is the latitude coordinate in the first coordinate, D(φ,θ) is the depth information corresponding to the first coordinate in the depth image, R φ (φ,θ) is the longitude coordinate in the third coordinate corresponding to the first coordinate, and p is the preset pupil distance.
6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Acquire training samples; the training samples include panoramic sample images and sample depth images corresponding to the panoramic sample images; The panoramic sample image is used as a reference input of an initial depth estimation model, the sample depth image is used as a reference output of the initial depth estimation model, and the initial depth estimation model is trained according to a preset loss function to obtain the depth estimation model.
7. A method for generating a binocular stereoscopic panoramic video, characterized in that: The method comprises: Using the binocular stereo panoramic image generation method according to any one of claims 1 to 6, each panoramic image in the panoramic video is mapped into a binocular stereo panoramic image; Based on the binocular stereoscopic panoramic images, a binocular stereoscopic panoramic video is generated.
8. A device for generating a binocular stereoscopic panoramic image, characterized in that: The device comprises: An acquisition module, used to input a panoramic image into a preset depth estimation model to obtain a depth image corresponding to the panoramic image; the depth image includes depth information corresponding to each pixel in the panoramic image; A mapping module, configured to determine a mapping relationship according to a preset pupil distance and the depth image, and map the panoramic image into a left-eye panoramic picture and a right-eye panoramic picture based on the mapping relationship; the mapping relationship includes a correspondence between a first coordinate of a pixel point in the panoramic image and a target coordinate corresponding to the pixel point in the left-eye panoramic picture and the right-eye panoramic picture; the longitude coordinate of the target coordinate is obtained by performing an arcsine process on the preset pupil distance and the depth information, and the latitude coordinate of the target coordinate is the latitude coordinate of the first coordinate; A generating module is used to generate a binocular stereoscopic panoramic image according to the left-eye panoramic picture and the right-eye panoramic picture.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
11. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
