Image display method, device and storage medium

Through multi-camera collection and synthesis of images, combined with terminal device posture information, 3D stereoscopic photo display is realized, which solves the problem of single and one-dimensional photo display in the existing technology, and improves user experience and display effect.

CN117729320BActive Publication Date: 2024-10-11HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410174850.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-07
Publication Date
2024-10-11
Estimated Expiration
2044-02-07

AI Technical Summary

Technical Problem

The photo display method in existing terminal devices is single, which is only a 2D flat image, lacking a three-dimensional display effect, which affects the user experience.

Method used

Collect images through multiple cameras, synthesize multiple third images, and display them sequentially according to the posture information of the terminal device, simulating the scene effects under different viewing angles to achieve 3D stereoscopic display.

Benefits of technology

It enriches image display methods, improves user photo browsing experience, and achieves fast response and high-precision 3D stereoscopic photo display.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117729320B_ABST
    Figure CN117729320B_ABST
Patent Text Reader

Abstract

The present application provides an image display method, device and storage medium, which can achieve 3D stereoscopic display effect, enrich the image display mode, and improve the user's photo browsing experience. The method includes: in response to a first operation of the user, obtaining a first image captured by a first camera, and obtaining a second image captured by a second camera, the first camera and the second camera have a first distance in a first direction, and the acquisition time of the first image is the same as the acquisition time of the second image; detecting the posture information of the terminal device; when the posture information meets the preset posture condition, displaying multiple third images in sequence, the third images are synthesized based on the first image and the second image, wherein in the first direction, each third image corresponds to a shooting angle of view, and the multiple third images are sorted in sequence according to the shooting angle of view.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of terminals, and in particular to an image display method, device and storage medium. Background Art

[0002] With the development of terminal technology, users can use terminal devices such as mobile phones and tablet computers to take pictures and view them.

[0003] At present, the pictures available for users to view and browse in terminal devices are all 2D flat photos, and the way for users to browse photos is relatively simple. Summary of the invention

[0004] In order to solve the above technical problems, the present application provides an image display method, device and storage medium. In this method, the terminal device can realize the 3D stereoscopic display effect of the shooting scene by displaying multiple third images, enriching the image display mode and improving the user's photo browsing experience.

[0005] In a first aspect, the present application provides an image display method. The method includes: a terminal device obtains a first image captured by a first camera in response to a first operation of a user, and obtains a second image captured by a second camera, wherein the first camera and the second camera have a first distance in a first direction, and the first image and the second image are captured at the same time. The terminal device detects its own posture information. When the posture information is greater than or equal to a preset parameter threshold, the terminal device displays a plurality of third images in sequence, and the third image is synthesized based on the first image and the second image, wherein in the first direction, each target image corresponds to a shooting angle of view, and the plurality of third images are sorted in sequence according to the shooting angle of view.

[0006] Through this embodiment, after the terminal device acquires the first image and the second image through two cameras, it can synthesize the third image corresponding to different shooting angles, and display the third image in sequence according to the posture of the terminal device. Since the third images are arranged in sequence according to the shooting angles, the third images can be displayed in sequence to simulate the viewing effect of the user on the same shooting scene at different angles, simulating the 3D stereoscopic display effect of the shooting scene, enriching the image display mode, and improving the user's photo browsing experience. In addition, by pre-generating multiple third images, it is possible to quickly respond to the posture changes of the terminal device and quickly display 3D stereoscopic photos.

[0007] Among them, the terminal device can be a multi-camera terminal device, that is, a terminal device with multiple cameras.

[0008] The first operation may be a shooting operation performed by the user on the target shooting interface.

[0009] The first camera and the second camera may be different cameras on the same terminal device. Exemplarily, the first camera and the second camera may be a telephoto camera, a wide-angle camera, an ultra-wide-angle camera, a TOF camera, etc. In one example, the first camera and the second camera may both be RGB cameras. In another example, the first camera may be an RGB camera, and the second camera may be a depth sensor such as a TOF device.

[0010] The first image may be a first image frame, and the second image may be a second image frame. For example, the first image may be one of a left-eye image and a right-eye image, and the second image may be the other of the left-eye image and the right-eye image.

[0011] The first camera and the second camera are at different positions in the first direction.

[0012] The first direction may be an extension direction of an axis, for example, an extension direction of an x-axis or a y-axis.

[0013] The posture information may be information related to the posture of the terminal device. For example, the posture information may be angle tilt information. The angle tilt parameter may be a parameter that can measure the degree of tilt of the terminal device. For example, the rotation angle, rotation speed, rotation acceleration, etc. of the terminal device around the x-axis or y-axis. The posture information may also be other postures, such as shaking of the terminal device, which is not limited.

[0014] Among them, the preset posture condition can be the device posture required for 3D stereoscopic display. Exemplarily, the preset posture condition can be that the angle tilt parameter of the terminal device is greater than or equal to the preset parameter condition. Among them, the preset parameter threshold can be a preset angle value. It should be noted that the preset posture condition can also be other conditions, such as shaking the terminal device multiple times, etc., which can also be set according to specific circumstances and actual scenes, and there is no specific limitation on this.

[0015] The third image may also be referred to as a transition image. The plurality of third images may be arranged in order from small to large shooting angles, for example, image 1, image 2, ..., image 6.

[0016] Optionally, the terminal device may detect an angle tilt parameter of the terminal device in response to a second operation of the user.

[0017] The second operation may be an operation of the user to display the 3D stereoscopic photo. For example, it may be a trigger operation of a stereoscopic photo display control on a user interface. For another example, it may be a preset trigger operation of the user on the main camera photo.

[0018] According to the first aspect, the posture information includes an angle tilt parameter of the terminal device, and the preset posture condition includes that the angle tilt parameter is greater than or equal to a preset parameter threshold. In this way, when the mobile phone is tilted, the 3D stereoscopic photo can be displayed according to the tilt of the mobile phone, presenting a stereoscopic photo display effect.

[0019] According to the first aspect, or any implementation of the first aspect above, the first direction is the extension direction of the first axis, and detecting the angle tilt parameter of the terminal device includes: detecting the rotation angle of the terminal device around the second axis. In this way, the 3D stereoscopic photo can be displayed accordingly according to the rotation angle of the terminal device, for example, when tilted left or right, the image change effect in the process of changing from the left eye to the right eye is displayed, which further improves the photo display effect and improves the user experience.

[0020] Exemplarily, the first axis and the second axis may be the same axis or different axes. In one example, when the terminal device is in a portrait state or a landscape state during image acquisition and image display, one of the first axis and the second axis is the x-axis and the other is the y-axis. In another example, when the terminal device is in a portrait state during image acquisition and a landscape state during image display, or in a landscape state during image acquisition and a portrait state during image display, the first axis and the second axis may both be the x-axis or both be the y-axis.

[0021] According to the first aspect, or any implementation of the first aspect above, the rotation angle includes a clockwise rotation angle or a counterclockwise rotation angle around the second axis, and multiple third images are displayed in sequence, including: when the counterclockwise rotation angle of the terminal device around the second axis is greater than or equal to the preset parameter threshold, multiple third images are displayed in sequence according to the results of arranging the multiple third images in positive order; when the clockwise rotation angle of the terminal device around the second axis is greater than or equal to the preset parameter threshold, multiple third images are displayed in sequence according to the results of arranging the multiple images in reverse order. In this way, different 3D stereoscopic photo display effects can be achieved for the same shooting scene according to the different rotation directions of the terminal device, further improving the flexibility of image display. For example, when the terminal device is tilted to the left, multiple third images are displayed in positive order. For another example, when the terminal device is tilted to the right, multiple third images are displayed in reverse order.

[0022] Exemplarily, the result of arranging the plurality of third images in positive order is image 1, image 2, ..., image 6; and the result of arranging the plurality of third images in reverse order is image 6, image 5, ..., image 1.

[0023] According to the first aspect, or any implementation of the first aspect above, displaying multiple third images in sequence includes: playing a target video file, the target video file includes multiple third images in sequence, and each third image is a video frame of the target video file. In this way, the multiple third images can be accurately displayed in sequence by playing the target video file, reducing the probability of erroneous display and improving the accuracy of the stereoscopic photo display effect.

[0024] Exemplarily, the target video file may be an MP4 file.

[0025] Exemplarily, the order of the video frames in the target video file is consistent with the positive order of the plurality of third images. For example, the video frames of the target video file may be image 1, image 2, ..., image 6 in sequence. In other words, the first frame of the target video frame may be the first third image, and the last frame of the target video frame may be the last third image.

[0026] Exemplarily, the terminal device can play the target video file forward when the counterclockwise rotation angle around the second axis is greater than or equal to the preset parameter threshold, and the terminal device can play the target video file backward when the clockwise rotation angle around the second axis is greater than or equal to the preset parameter threshold.

[0027] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the first operation, acquiring a fourth image captured by the third camera, the fourth image being captured at the same time as the first image; wherein the third image is obtained by filling the blind area with the fourth image. In this way, the accuracy of the third image can be further improved through the fourth image, and the display effect of the 3D stereoscopic photo can be further improved.

[0028] Exemplarily, the fourth image may be referred to as a third image frame.

[0029] According to the first aspect, or any implementation of the first aspect above, the method further includes: in response to the first operation, acquiring a fifth image captured by the depth sensor, the fifth image being captured at the same time as the first image; wherein the third image is synthesized based on the first image, the second image, and the fifth image. In this way, the terminal device can generate a transitional photo based on the depth information of the captured scene, thereby further improving the display effect of the stereoscopic photo.

[0030] Exemplarily, the depth sensor may be a sensor for collecting depth information of a photographed scene, such as a TOF device.

[0031] Exemplarily, the fifth image may be referred to as a depth image frame.

[0032] According to the first aspect, or any implementation of the first aspect above, after obtaining the first image captured by the first camera and the second image captured by the second camera, and before detecting the posture information of the terminal device, the method also includes: performing image segmentation on the first image to obtain a first foreground image and a first background image; performing image segmentation on the second image to obtain a second foreground image and a second background image; generating multiple third background images based on the first background image and the second background image; generating multiple third foreground images based on the first foreground image and the second foreground image, wherein the multiple third background images correspond to the multiple third foreground images one by one, and each group of corresponding third background images and third foreground images corresponds to the same shooting angle; generating a third image based on each group of corresponding third foreground images and third background images. In this way, according to the change of the occlusion relationship between the foreground and background of the image, the 3D photo display effect can be achieved, and the fast and accurate display of stereoscopic photos is achieved.

[0033] Among them, image segmentation can be image segmentation for separating foreground and background. Exemplarily, when the terminal device also captures a fifth image, the terminal device can separate the foreground and background of the first image and the second image based on the fifth image. For example, the image content whose depth information is less than or equal to the depth threshold is determined as the foreground content, and the image content whose depth information is greater than or equal to the depth threshold is determined as the image content. Optionally, the terminal device can also determine the depth information of the photographed object based on the first image and the second image, and there is no specific limitation on this.

[0034] Among them, the first background image can be called a first background image; the second background image can be called a second background image; the first foreground image can be called a first foreground image; and the second foreground image can be called a second foreground image.

[0035] Among them, the third background image can be called a transition background.

[0036] The third foreground image may be referred to as a transition foreground.

[0037] The third foreground image and the third background image can be processed by image fusion to obtain a third image.

[0038] According to the first aspect, or any implementation of the first aspect above, a third image is generated based on each group of corresponding third foreground images and third background images, including: in response to the first operation, obtaining a fourth image captured by the third camera, the fourth image being captured at the same time as the first image; performing image segmentation on the fourth image to obtain a fourth background image; for each group of corresponding third foreground images and third background images, using the fourth background image to perform blind area supplementation on the third background image in each group to obtain a fifth background image; performing image fusion on the fifth background image and the third foreground image in each group to obtain the third image corresponding to each group. In this way, the integrity of the background image can be improved by filling the blind area, thereby further improving the display effect of the stereoscopic photo.

[0039] Among them, the fourth background image can be called the third background image.

[0040] Exemplarily, the fourth background image may be registered with the first background image, and the blind area may be filled after the image registration. The image registration may include processes such as feature point detection and feature point matching.

[0041] According to the first aspect, or any implementation of the first aspect above, the first image is segmented to obtain a first foreground image and a first background image, including: in response to the first operation, a fifth image acquired by the depth sensor is acquired, and the acquisition time of the fifth image is the same as the acquisition time of the first image; the first image is segmented using the fifth image to obtain the first foreground image and the first background image. In this way, the foreground content and background content in the image can be accurately extracted, thereby improving the boundary accuracy of the foreground and background in the third photo, thereby improving the display effect of the stereoscopic photo.

[0042] Exemplarily, the fifth image and the depth threshold may be used to perform image segmentation.

[0043] According to the first aspect, or any implementation of the first aspect above, each third image corresponds to a preset scale factor, and multiple third background images are generated based on the first background image and the second background image, including: determining multiple first feature point pairs, each first feature point pair includes a first feature point in the first background image and a second feature point in the second background image, and the first feature point and the second feature point match; determining a background transition matrix based on the multiple first feature point pairs; and determining the third background image corresponding to each preset scale factor based on the background transition matrix and each preset scale factor. In this way, the transition background can be accurately generated, and the accuracy of the transition photo is improved.

[0044] Exemplarily, the background transition matrix may be a precursor matrix. The size of the matrix may be a 3*3 matrix.

[0045] According to the first aspect, or any implementation of the first aspect above, each third image corresponds to a preset scale factor, and multiple third foreground images are generated based on the first foreground image and the second foreground image, including: determining multiple second feature point pairs, each second feature point pair includes a third feature point in the first foreground image and a fourth feature point in the second foreground image, and the third feature point matches the fourth feature point; determining a foreground transition matrix based on the multiple second feature point pairs; and determining the third foreground image corresponding to each preset scale factor based on the foreground transition matrix and each preset scale factor. In this way, the transition foreground can be accurately generated, and the accuracy of the transition photo is improved.

[0046] Exemplarily, the foreground transition matrix may also be a predecessor matrix. The size of the matrix may be a 3*3 matrix.

[0047] According to the first aspect, or any implementation of the first aspect above, before playing the target video file, the method further includes: generating a target video file based on multiple third images; generating a target display file based on the target video file and the first image; and storing the target display file in the target storage area. The first image and the target video file can be stored correspondingly through the target display file, so as to facilitate the corresponding display of the stereoscopic photo and the ordinary photo.

[0048] The first image may be a primary photo.

[0049] The target display file may be an MP3 file.

[0050] The first image may be used as a cover. Optionally, in order to facilitate users to quickly obtain photo information, the first image may be used as a cover of a target video file. In a second aspect, the present application provides an electronic device. The electronic device includes: one or more processors; a memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps:

[0051] In response to a first operation of the user, a first image captured by a first camera is acquired, and a second image captured by a second camera is acquired, wherein a first distance between the first camera and the second camera is in a first direction, and a time of acquisition of the first image is the same as a time of acquisition of the second image;

[0052] Detecting the posture information of the terminal device;

[0053] When the posture information meets the preset posture conditions,

[0054] displaying a plurality of third images in sequence, the third images being synthesized based on the first image and the second image,

[0055] In the first direction, each third image corresponds to a shooting angle of view, and the plurality of third images are arranged in sequence according to the shooting angles of view.

[0056] According to the second aspect, the posture information includes an angle tilt parameter of the terminal device, and the preset posture condition includes that the angle tilt parameter is greater than or equal to a preset parameter threshold.

[0057] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps:

[0058] In response to the first operation, a fourth image captured by the third camera is acquired, where the fourth image is captured at the same time as the first image;

[0059] The third image is obtained by filling the blind area with the fourth image.

[0060] According to the second aspect, or any implementation of the second aspect above, when the computer program is executed by one or more processors, the electronic device performs the following steps:

[0061] In response to the first operation, a fifth image captured by the depth sensor is acquired, where a capture time of the fifth image is the same as a capture time of the first image;

[0062] The third image is synthesized based on the first image, the second image and the fifth image.

[0063] The second aspect and any implementation of the second aspect correspond to the first aspect and any implementation of the first aspect respectively. The technical effects corresponding to the second aspect and any implementation of the second aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here.

[0064] In a third aspect, the present application provides a computer-readable medium for storing a computer program, wherein the computer program includes instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0065] The third aspect and any implementation of the third aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the third aspect and any implementation of the third aspect can refer to the technical effects corresponding to the first aspect and any implementation of the first aspect, which will not be repeated here.

[0066] In a fourth aspect, the present application provides a computer program, comprising instructions for executing the method in the first aspect or any possible implementation of the first aspect.

[0067] The fourth aspect and any implementation of the fourth aspect correspond to the first aspect and any implementation of the first aspect, respectively. The technical effects corresponding to the fourth aspect and any implementation of the fourth aspect can refer to the technical effects corresponding to the above-mentioned first aspect and any implementation of the first aspect, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0068] Figure 1A-1G A group of user interface schematic diagrams of the image display method provided by the embodiment of the present application are shown;

[0069] Figure 2A-2C Another group of user interface schematic diagrams of the image display method provided by an embodiment of the present application is shown;

[0070] Figure 3A-3B Another group of user interface schematic diagrams of the image display method provided by an embodiment of the present application is shown;

[0071] Figure 4 A schematic diagram showing a flow chart of an image display method provided in an embodiment of the present application is shown;

[0072] Figure 5A-5C A schematic diagram showing an exemplary binocular camera shooting scene provided in an embodiment of the present application is shown;

[0073] Figure 6 A schematic diagram of an exemplary shooting scene is shown;

[0074] Figure 7 A schematic diagram showing a reference coordinate system of a terminal device provided in an embodiment of the present application is shown;

[0075] Figure 8A-8B A schematic diagram showing the rotation of a terminal device provided in an embodiment of the present application

[0076] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;

[0077] Figure 10A-10B A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;

[0078] Fig.11 is a software structure block diagram of the electronic device of the embodiment of the present application;

[0079] Fig.12 A schematic diagram showing a distribution relationship of cameras of an exemplary terminal device provided in an embodiment of the present application is shown;

[0080] Fig.13 A posture schematic diagram of a terminal device provided in an embodiment of the present application is shown;

[0081] Fig.14 A schematic diagram showing a process flow of a stereoscopic photo generation process provided by an embodiment of the present application is shown;

[0082] Fig.15 A schematic diagram showing an exemplary image frame preprocessing process provided by an embodiment of the present application is shown;

[0083] Fig.16 A schematic diagram showing an exemplary foreground-background separation provided in an embodiment of the present application is shown;

[0084] Fig.17 An exemplary depth relationship diagram provided in an embodiment of the present application is shown;

[0085] Fig.18 A schematic diagram showing an exemplary captured image frame provided by an embodiment of the present application is shown;

[0086] Fig.19 Another exemplary depth relationship diagram provided in an embodiment of the present application is shown;

[0087] Fig. 20 A schematic diagram showing a process for generating a transitional photo provided in an embodiment of the present application is shown;

[0088] Fig.21 A schematic diagram showing an exemplary process of generating a transitional photo provided in an embodiment of the present application is shown;

[0089] Fig. 22 A schematic diagram showing a flow chart of an exemplary image registration process provided in an embodiment of the present application is shown;

[0090] Figure 23A-23B A schematic diagram of generating an exemplary transition background provided in an embodiment of the present application is shown;

[0091] Fig.24 A schematic diagram showing an exemplary blind spot supplementation process provided by an embodiment of the present application is shown;

[0092] Fig.25 A schematic diagram of a process of storing a stereoscopic photo provided by an embodiment of the present application is shown;

[0093] Fig.26 A schematic diagram of a video with a changing viewing angle provided by an embodiment of the present application is shown;

[0094] Fig. 27 A schematic diagram showing an exemplary combination file provided in an embodiment of the present application is shown;

[0095] Fig.28A schematic diagram showing a flow chart of a stereoscopic photo display process provided by an embodiment of the present application;

[0096] Figure 29A-29B A schematic diagram showing a set of exemplary viewing angle change video playback processes provided in an embodiment of the present application;

[0097] Fig.30 A schematic diagram exemplarily shows an exemplary stereoscopic photo display process provided by an embodiment of the present application;

[0098] Fig.31 A schematic diagram exemplarily shows another exemplary stereoscopic photo display process provided by an embodiment of the present application;

[0099] Fig.32 A schematic block diagram of a device according to an embodiment of the present application is shown. DETAILED DESCRIPTION

[0100] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0101] The term "and / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone.

[0102] The terms "first" and "second" in the description and claims of the embodiments of the present application are used to distinguish different objects rather than to describe a specific order of objects. For example, a first target object and a second target object are used to distinguish different target objects rather than to describe a specific order of target objects.

[0103] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

[0104] In the description of the embodiments of the present application, unless otherwise specified, the meaning of "multiple" refers to two or more than two. For example, multiple processing units refer to two or more processing units; multiple systems refer to two or more systems.

[0105] In daily life, terminal device users can record the beautiful moments in life by taking photos with mobile phones and tablet computers. However, the photos in existing terminal devices are almost all monocular 2D images, and the display effect is relatively simple.

[0106] Based on this, the embodiments of the present application provide an image display method, device and storage medium, which can generate multiple transition images corresponding to different shooting perspectives based on images captured by multiple cameras, and display multiple transition photos in sequence according to the angle tilt parameters of the terminal device, so that the user can experience the viewing effect of the same shooting scene from multiple continuous perspectives, realize the display effect of stereoscopic photos, enrich the image display effect, and improve the user experience.

[0107] It should be noted that the image display solution in the embodiment of the present application can be applied to terminal devices such as mobile phones and tablet computers that have image processing functions, image display functions, and video playback functions.

[0108] In some embodiments, the image display scheme of the embodiments of the present application can be applied to a terminal device with a multi-camera function. Specifically, the terminal device with a camera function can use the image display scheme to process a video being shot (i.e., being shot), a video that has been shot, a video downloaded from the network, or a video sent by an external device.

[0109] In other embodiments, the image processing method of the embodiment of the present application can be applied to a terminal device that does not have a camera function. Specifically, the terminal device that does not have a camera function can download or receive a captured video or image stream sent by an external device from the network, and use the image processing method to process the captured video or image stream. For ease of understanding, the technical solution of the embodiment of the present application is described below using a video stream as an example. However, it should be understood that the image processing method of the embodiment of the present application can also be applied to an image stream.

[0110] For ease of understanding, before introducing the image display solution provided by the embodiment of the present application, the technical terms involved in the embodiment of the present application are first explained.

[0111] (1) Monocular: using a single camera to acquire images of the target scene from a single angle.

[0112] (2) Multi-camera, that is, using two or more cameras to shoot the same target scene from multiple different angles at the same time.

[0113] (3) 2D images, i.e., planar images, are used to reflect the planar information of the target shooting scene. For example, photos taken by existing mobile phones are 2D images.

[0114] (4) 3D image, that is, spatial image, is used to reflect the spatial information of the target shooting scene. For example, the inventors found through research that when the target shooting scene includes multiple objects, the occlusion relationship between different objects is different under different viewing angles.

[0115] (5) Left-eye image, that is, the image captured from the perspective of the left eye (left eye).

[0116] (6) Right eye image, that is, the image captured from the perspective of the right eye (right eye).

[0117] After introducing the above terms, for ease of understanding, the user interface of the embodiment of the present application is described below.

[0118] In some embodiments, Figure 1A-1G A group of user interface schematic diagrams of the image display method provided by the embodiment of the present application are shown. It can be understood that Figure 1A The user interface described subsequently merely illustrates a possible user interface style of the terminal device 100 taking a mobile phone as an example, and should not constitute a limitation on the embodiments of the present application.

[0119] first, Figure 1A The main interface (homepage) of the terminal device 100 is shown as an example. Figure 1A As shown, the main interface may include a status bar 111 , a page indicator 112 , and a plurality of application icons 113 .

[0120] Among them, the status bar 111 may include one or more signal strength indicators of a mobile communication signal (also referred to as a cellular signal), a wireless fidelity (Wi-Fi) signal strength indicator, a battery status indicator, a time indicator, etc.

[0121] The page indicator 112 may be used to indicate the positional relationship between the currently displayed page and other pages. Specifically, the page indicator 112 may be used to indicate which page the user is currently browsing among the multiple pages carrying the multiple application icons 113. The user may swipe left and right to browse other pages.

[0122] For multiple application icons 113, each application icon 113 corresponds to an application. It should be noted that the application icons can be distributed on multiple pages, and the user can browse the application icons on other pages by sliding left and right. For the camera application icon 113A, it can be located in the bottom fixed bar 114 at the bottom of the main interface, or it can be directly located in the application icon display area 115 in the middle of the main interface, or in the application folder of the application icon display area 115, and its display position is not specifically limited.

[0123] When the terminal device 100 detects that the user acts as Figure 1A After an application trigger operation (such as a click operation) is performed on the camera application icon 113A on the user interface shown in FIG. 1 , the terminal device 100 may display a Figure 1B It should be noted that in this embodiment and subsequent embodiments, in addition to opening the camera application by clicking the camera application icon 113A on the main interface, the camera application can also be opened by clicking the camera control in a specific application when the terminal device 100 runs a specific application, such as opening the camera application by clicking the camera control in an instant messaging tool, and there is no specific limitation on this.

[0124] like Figure 1B As shown, the shooting interface may include a menu bar 121, a shooting control 122, a preview window 123, a review control 124, and a tool bar 125. The following will describe each of them.

[0125] The menu bar 121 may include multiple shooting mode options, such as "night scene", "portrait", "photo", "video", etc. Specifically, Figure 1B As shown, the terminal device 100 can detect the mode switching operation (such as swiping left, swiping right, clicking, etc.) performed by the user on the menu bar 121 to switch the shooting mode.

[0126] The shooting control 122 can trigger the shooting operation of the terminal device 100 when triggered by the shooting operation of the user.

[0127] The preview window 123 is used to display the preview image 1231 captured by the terminal device 100 .

[0128] The review control 124 can display the photos collected by the terminal device 100 under the trigger operation of the user.

[0129] The toolbar 125 is used to display functional controls of multiple shooting functions. For example, in an embodiment of the present application, a stereoscopic photo shooting control 1251 may be displayed in the toolbar 125. Accordingly, the terminal device 100 may detect a trigger operation of the user acting on the stereoscopic photo shooting control 1251 to enter a stereoscopic photo shooting mode, and the terminal device 100 may perform image acquisition after detecting a trigger operation of the user acting on the shooting control 122, and generate a stereoscopic photo based on the image display method provided in the embodiment of the present application. For another example, without the need for a trigger operation by the user, the terminal device 100 may detect a trigger operation of the user acting on the shooting control 122, and the terminal device 100 may automatically generate a stereoscopic photo.

[0130] When the terminal device 100 detects that the user acts on Figure 1BAfter the trigger operation on the user interface shown, the user interface can be as follows Figure 1C As shown, the review control 125 displays thumbnails of the photos taken. Figure 1C After a trigger operation is performed on the review control 125 of the user interface shown, the terminal device 100 can display the Figure 1D The user interface shown (i.e., the photo taking and display interface).

[0131] like Figure 1D As shown in FIG. 1 , the captured photo display interface may display a main photo 131, a stereo photo display control 126A, and a gallery control 126B. The main photo 131 is a 2D photo displayed in the normal photo mode. After the terminal device 100 detects a trigger operation (such as a click) by the user on the stereo photo display control 126A, the terminal device 100 may Figure 1E The user interface shown plays the perspective change video 132 provided in the embodiment of the present application to display a stereoscopic photo. Alternatively, a preset trigger operation can be performed on the main camera photo 131 to play the perspective change video 132 provided in the embodiment of the present application. Among them, the preset trigger operation can be a user operation such as long press, double click, etc. For example, it can be a user operation that is different from a dynamic photo. It should be noted that the style of the stereoscopic photo display control 126 in the embodiment of the present application can be set to other styles according to actual conditions and specific needs, and there is no specific limitation on this.

[0132] The perspective change video 132 may be composed of m frames of images with different perspectives, and the perspectives of the m frames of images are continuously changed. Figure 1F FIG. 1 shows multiple user interfaces during the playback of the perspective change video 132. For example, the first frame image of the perspective change video 132 may be Figure 1F The left eye image 1321 displayed in the user interface of (1) and the first frame video of the perspective change video 132 may be Figure 1F The right-eye image 132m is displayed in the user interface of (2).

[0133] In addition, when the user Figure 1D When the gallery control 126B is triggered on the interface shown, or when Figure 1A After a trigger operation (such as a click or other user operation) is performed on the gallery control 113B on the main interface shown, the Figure 1G The user interface shown (gallery display interface). Figure 1G In the gallery display interface shown, users can view stored videos and photos. Figure 1GIn the gallery display interface shown, thumbnails of the main photo 131 and thumbnails of the perspective change video 132 can be displayed. Among them, a stereoscopic photo logo 132A is displayed on the thumbnail of the perspective change video 132 to distinguish it from the thumbnail of the main photo 131. Alternatively, the gallery display interface can also only display thumbnails of ordinary photos, and the embodiment of the present application does not impose specific restrictions on this. It should be noted that in this embodiment and in subsequent embodiments, in addition to the above-mentioned opening of the gallery, the gallery can also be opened by clicking on the gallery control in a specific application when the terminal device 100 runs a specific application, such as by clicking on the gallery control of the camera application in the instant messaging tool, and there is no specific restriction on this.

[0134] exist Figure 1A-1G In the user interface shown, the stereoscopic photo shooting function can be automatically performed without additional settings. Optionally, the stereoscopic photo shooting function can also be turned on through settings. The following will be described through two embodiments.

[0135] In other embodiments, Figure 2A-2C Another group of user interface schematic diagrams of the image display method provided by the embodiment of the present application is shown. Figure 2A In the user interface shown, the terminal device 100 can detect the mode switching operation (such as swiping left, swiping right, clicking, etc.) performed by the user on the menu bar 121 and switch to the "more" mode.

[0136] After switching to the "more" mode, the terminal device 100 displays the following Figure 2B The user interface shown in Figure 1 is as follows. Figure 2B The interface shown in FIG. 1 shows a plurality of shooting function controls, such as a stereoscopic photo control 127 (i.e., a control for controlling the terminal device 100 to generate a stereoscopic photo). When the terminal device 100 detects that the user has performed a triggering operation (such as a click or other user operation) of the stereoscopic photo control 127, the terminal device 100 may display the following Figure 2C The shooting interface of the "stereoscopic photo" shown in the figure. And, after detecting the trigger operation of the user acting on the shooting control 122, the terminal device 100 performs image acquisition, and generates a stereoscopic photo based on the image display method provided in the embodiment of the present application. It should be noted that the display method of the stereoscopic photo can refer to the above-mentioned embodiment of the present application in combination with Figure 1A-1G The relevant instructions are not repeated here.

[0137] In some further embodiments, Figure 3A-3B Another set of user interface schematic diagrams of the image display method provided by the embodiment of the present application is shown. Figure 3A In the user interface shown in FIG. 1 , after the terminal device detects a trigger operation (such as a click or other user operation) performed by the user on the setting control 125A, the following may be displayed: Figure 3B The settings interface shown.

[0138] exist Figure 3B The setting interface shown shows a plurality of setting controls for camera functions, such as a switch control 128 for a stereoscopic photo. The switch control 128 is used to control the on and off of the stereoscopic photo shooting function. When the terminal device 100 detects that the user has turned on the stereoscopic photo shooting function through the switch control 128, the user turns on the stereoscopic photo shooting function. Figure 2B After clicking the shooting control 122 on the user interface shown, the terminal device can generate a stereoscopic photo. It should be noted that the display method of the stereoscopic photo can refer to the above-mentioned part of the embodiment of the present application in combination with Figure 1A-1G The relevant instructions are not repeated here.

[0139] Also, it should be noted that the above-mentioned user operations may include but are not limited to single-click, double-click, sliding and other operations, or the user may also perform operations through voice, gestures, etc., and there is no specific limitation on this.

[0140] After introducing the user interface of the embodiment of the present application through the above content, the inventive concept of the embodiment of the present application will be described in conjunction with the accompanying drawings.

[0141] Figure 4 FIG. 1 is a flow chart of an image display method provided by an embodiment of the present application. Figure 4 As shown, the terminal device may include multiple cameras, such as an ultra-wide-angle camera (UltalWide), a telephoto camera (Tele), a wide-angle lens (Wide), and a time of flight (TOF) device. In the prior art, taking a wide-angle camera as a main camera as an example, an image 1 (a plurality of frames of images 1 used to generate a preview image may be referred to as a preview stream) captured by the wide-angle lens is processed by the preview stream to obtain a preview image, and the preview image is displayed in a preview window 123.

[0142] And, after acquiring multiple frames of images 1 (the multiple frames of images 1 used to generate the main camera photo can be called a multi-frame sequence), the main camera photo (that is, the photo taken in the normal camera mode, which can also be referred to as a normal photo) is obtained through image processing.

[0143] In an embodiment of the present application, after the wide-angle camera, telephoto camera, ultra-wide-angle camera, and TOF device shoot the shooting scene and obtain image 1 (corresponding to the wide-angle camera), image 2 (corresponding to the telephoto camera), image 3 (corresponding to the ultra-wide-angle camera), and image 4 (corresponding to the TOF device), respectively, the terminal device can perform frame alignment and other frame processing on image 1-image 4 to obtain a multi-camera alignment frame, wherein one frame of the terminal device image 1-image 3 is used as the left-eye image, and the other frame is used as the right-eye image. Then, based on the multi-camera alignment frame, the terminal device constructs a 3D scene for the shooting scene, and then generates a transition image between the left-eye image and the right-eye image based on the constructed 3D scene. And, a perspective change video is generated based on the left-eye image, the transition image, and the right-eye image.

[0144] Furthermore, in an embodiment of the present application, a combined file can also be generated based on the perspective change video and the photo, with the photo serving as the cover of the file.

[0145] Figure 5A FIG. 1 is a schematic diagram showing an exemplary binocular camera shooting scene provided in an embodiment of the present application. Figure 5A As shown, taking the human eye as an example, the parallax of the left eye and the right eye is different, and accordingly, the occlusion relationship between the objects seen by the left eye and the right eye is also different.

[0146] When the positional relationship of multiple cameras of the terminal device is different, the parallax of the multiple cameras is also different. Taking the left camera and the right camera as an example, the left camera can simulate the perspective of the left eye of a person, and the right camera can simulate the perspective of the right eye of a person. Figure 5A As shown, the shooting angles of the left camera and the right camera are different, the field of view F1 of the left camera and the field of view F2 of the right camera are also different, and when observing the same shooting scene, the parallax of the left camera and the right camera is also different. The inventors have found that the difference in the parallax is mainly reflected in the occlusion relationship between different objects.

[0147] For example, Figure 5B A schematic diagram showing an exemplary left-eye image (i.e., an image captured by a left-eye camera) provided in an embodiment of the present application is shown. Figure 5C A schematic diagram of an exemplary right-eye image (i.e., an image captured by a right-eye camera) provided in an embodiment of the present application is shown. Figure 5B and Figure 5C It can be seen that the degree of occlusion of the moon cake B1 by the doll A1 in the left eye image and the right eye image is different. Specifically, in area 1 of the left eye image, the doll A1 partially occludes the moon cake B1, and in area 2 of the right eye image, the doll A1 does not occlude the moon cake B1. Accordingly, when the same shooting scene is shot from different perspectives, the occlusion relationship between the objects being shot is different.

[0148] Figure 6 FIG. 1 shows a schematic diagram of an exemplary shooting scene. Figure 6 As shown, when from Figure 6 When the same scene is photographed from different camera angles (or shooting positions) shown in FIG. 1 , images 1 to 6 can be obtained respectively. The occlusion relationship between objects in images 1 to 6 changes gradually. For example, if image 1 is Figure 5B The left eye image shown, image 6 is Figure 5C As shown in the right eye image, in images 1 to 6, the degree of occlusion of moon cake B1 by doll A1 gradually decreases until moon cake A1 no longer completely occludes moon cake B1.

[0149] Furthermore, since the image at each shooting angle represents the picture observed by the viewer at that shooting angle, the change process from image 1 to image 6 represents the picture seen by the observer during the movement from the left eye position to the right eye position, that is, a three-dimensional picture of the shooting scene can be seen.

[0150] After introducing the inventive concept of the embodiment of the present application, since the embodiment of the present application involves playing images according to the terminal posture of the terminal device, the reference coordinate system and the tilt posture of the terminal device are described in conjunction with the accompanying drawings.

[0151] Figure 7 FIG. 1 is a schematic diagram showing a reference coordinate system of a terminal device provided in an embodiment of the present application. Figure 7 As shown, the reference coordinate system of the terminal device may include an x-axis, a y-axis, and a z-axis, wherein the x-axis is parallel to the width direction of the terminal device (such as the short side of the mobile phone), the y-axis is parallel to the length direction of the terminal device (such as the long side of the mobile phone), and the z-axis is parallel to the height direction of the terminal device (such as the thickness direction of the mobile phone).

[0152] Fig. 8A and Figure 8B FIG. 1 shows a schematic diagram of a terminal device provided in an embodiment of the present application. Taking a mobile phone as an example, as shown in FIG. Fig. 8A and Figure 8B As shown, when the phone is in Fig. 8A In the vertical screen posture shown in (1) of FIG, if the user tilts the phone to the right (rotates the phone to the right), the phone will Figure 8B As shown in (1) in the figure, the mobile phone rotates clockwise along the y-axis. Fig. 8A The tilted posture shown in (2) in FIG.

[0153] Also, when the phone is in Fig. 8A (1) and Figure 8B In the vertical screen posture shown in (1) of FIG. 1 , if the user tilts the phone to the left (rotates the phone to the left), the phone will Figure 8BAs shown in (2) in the figure, the mobile phone rotates counterclockwise along the y-axis. Fig. 8A (3) and Figure 8B The tilted posture shown in (1) in FIG.

[0154] After introducing the reference coordinate system and tilt posture of the terminal device, the hardware structure of the terminal device of the embodiment of the present application will be described next.

[0155] Fig. 9 FIG. 1 shows a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. It should be understood that: Fig. 9 The structure of the electronic device shown can be applied to the terminal device 100 shown in the above embodiment. It should be understood that Fig. 9 The electronic device shown is merely one example of an electronic device, and the electronic device may have more or fewer components than shown in the drawings, may combine two or more components, or may have a different configuration of components. Fig. 9 The various components shown in the EMBODIMENTS 2000 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application specific integrated circuits.

[0156] The electronic device 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a Subscriber Identification Module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0157] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated in one or more processors.

[0158] The controller may be the nerve center and command center of the electronic device 100. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

[0159] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. The USB interface 130 is an interface that complies with USB standard specifications, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 may be used to connect a charger to charge the electronic device 100, or may be used to transfer data between the electronic device 100 and a peripheral device. It may also be used to connect headphones to play audio through the headphones. The interface may also be used to connect other electronic devices, such as AR devices, etc.

[0160] The charging management module 140 is used to receive charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger through the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive wireless charging input through a wireless charging coil of the electronic device 100. While the charging management module 140 is charging the battery 142, it may also power the electronic device through the power management module 141.

[0161] The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and supplies power to the processor 110, the internal memory 121, the external memory, the display screen 194, the camera 193, and the wireless communication module 160. The wireless communication function of the electronic device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.

[0162] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.

[0163] The mobile communication module 150 may provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (Low Noise Amplifier, LNA), etc.

[0164] The wireless communication module 160 can provide wireless communication solutions for application in the electronic device 100, including Wireless Local Area Networks (WLAN) (such as Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), Global Navigation Satellite System (GNSS), Frequency Modulation (FM), Near Field Communication (NFC), infrared technology (IR), etc.

[0165] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, so that electronic device 100 can communicate with the network and other devices through wireless communication technology.

[0166] The electronic device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or change display information.

[0167] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. In the embodiment of the present application, the electronic device 100 may include 1 or M display screens 194, where M is a positive integer greater than 1. In the embodiment of the present application, the electronic device 200 can display the display capability provided by the display screen 194. Figure 1A-1G , Figure 2A-2C , Figure 3A-3B The user interface shown includes image resources such as photos and videos displayed in the interface.

[0168] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.

[0169] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.

[0170] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal oxide semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 100 may include N cameras 193, where N is a positive integer greater than 1. Exemplarily, Fig. 10A(1) is a schematic diagram of the front structure of the electronic device. Fig. 10A (2) is a schematic diagram of the back structure of the electronic device. Fig. 10B This is a schematic diagram of the front structure of an electronic device when it is placed horizontally. Fig. 10A and Fig. 10B As shown, the camera 55 of the electronic device may include an ultra-wide-angle camera 551 , a telephoto camera 552 , a wide-angle lens 553 and a TOF device 554 .

[0171] Video codecs are used to compress or decompress digital videos. The electronic device 100 may support one or more video codecs. Thus, the electronic device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

[0172] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function, such as storing music, video and other files in the external memory card.

[0173] The internal memory 121 can be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (Universal Flash Storage, UFS), etc.

[0174] The electronic device 100 can implement audio functions such as music playing and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.

[0175] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be arranged in the processor 110, or some functional modules of the audio module 170 can be arranged in the processor 110.

[0176] The pressure sensor 180A is used to sense the pressure signal and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be set on the display screen 194. There are many types of pressure sensors 180A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor can be a parallel plate including at least two conductive materials. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 194, the electronic device 100 detects the touch operation intensity according to the pressure sensor 180A. The electronic device 100 can also calculate the touch position according to the detection signal of the pressure sensor 180A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than the first pressure threshold acts on the short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, an instruction to create a new short message is executed.

[0177] The gyro sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyro sensor 180B. The gyro sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyro sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyro sensor 180B can also be used for navigation and somatosensory game scenes.

[0178] In the embodiment of the present application, taking the terminal device in the portrait state as an example, the gyro sensor 180B can also determine the rotation angle of the electronic device 100 around the y-axis. When the counterclockwise rotation angle of the electronic device 100 around the y-axis (i.e., the electronic device tilts to the left) is greater than or equal to the preset parameter threshold, the perspective change video is played forward. And, when the clockwise rotation angle of the electronic device 100 around the y-axis (i.e., the tilt angle to the right) is greater than the preset parameter threshold, the perspective change video is played in reverse.

[0179] The acceleration sensor 180E can detect the magnitude of the acceleration of the electronic device 100 in all directions (generally three axes). When the electronic device 100 is stationary, the magnitude and direction of gravity can be detected. It can also be used to identify the posture of the electronic device, and is applied to applications such as horizontal and vertical screen switching and pedometers. In the embodiment of the present application, the acceleration sensor 180E can determine the rotational acceleration of the electronic device around the y-axis, and determine the playback speed of the video with a change in viewing angle based on the acceleration.

[0180] The touch sensor 180K is also called a "touch panel". The touch sensor 180K can be set on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen". The touch sensor 180K is used to detect touch operations acting on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be set on the surface of the electronic device 100, which is different from the position of the display screen 194.

[0181] The key 190 includes a power key, a volume key, etc. The key 190 may be a mechanical key or a touch key. The electronic device 100 may receive key input and generate key signal input related to user settings and function control of the electronic device 100.

[0182] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. Indicator 192 can be an indicator light, which can be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

[0183] In passing Figure 8A-8B , Fig. 9 , Figure 10A-10B After introducing the hardware structure of the terminal device, the software structure of the terminal device will be described next.

[0184] The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the present application takes the Android system of the layered architecture as an example to exemplify the software structure of the electronic device 100.

[0185] Fig.11 It is a software structure block diagram of the electronic device according to an embodiment of the present application.

[0186] The layered architecture of the electronic device 100 divides the software into several layers, each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom, namely, the application layer, the framework layer, the hardware abstraction layer (HAL) and the system library, and the kernel layer.

[0187] The application layer can include a series of application packages.

[0188] like Fig.11 As shown, the application package may include applications such as camera, gallery, etc.

[0189] The framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0190] like Fig.11 As shown, the application framework layer may include a window manager, a content provider, a view system, a resource manager, a notification manager, etc. In the embodiment of the present application, a camera access interface may also be included. The camera access interface is used to provide an application programming interface and a programming framework for camera applications.

[0191] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.

[0192] Content providers are used to store and retrieve data and make it accessible to applications. The data can include videos, images, etc.

[0193] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can be composed of one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0194] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0195] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0196] The hardware abstraction layer is an interface layer located between the application framework layer and the kernel layer, and is used to provide a virtual hardware platform for the operating system. The hardware abstraction layer may include a camera HAL, an audio HAL, a WiFi HAL, etc. In an embodiment of the present application, the camera HAL includes a frame processing module, a 3D scene construction module, a transition photo generation module, and a stereoscopic photo display module. It should be noted that the frame processing module, the 3D scene construction module, the transition photo generation module, and the stereoscopic photo display module can also be set in other HALs except the camera HAL, and this is not limited.

[0197] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver. Among them, the camera driver is used to drive the camera sensor to collect images and drive the image signal sensor to pre-process the image. The digital signal processor driver is used to drive the digital signal processor to process images. The image processor driver is used to drive the graphics processor to process images.

[0198] Understandably, Fig.11 The layers in the software structure shown and the components included in each layer do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer layers than shown, and each layer may include more or fewer components, which is not limited in the present application.

[0199] For example, continue with Figure 4Taking the camera shown as an example, the camera application calls the camera access interface in the application framework layer to start the camera service, and when the user inputs the camera control command (such as preview, zoom, take pictures, record, capture, etc.), the camera application can send the camera control command to the camera hardware abstraction layer (Camera HAL) in the hardware abstraction layer through the camera access interface. The camera hardware abstraction layer can call the camera device driver in the kernel layer according to the received camera control command, and the camera device driver drives the wide-angle camera, telephoto camera, ultra-wide-angle camera and TOF device to collect images, and drives the image sensor (Sensor) to convert the image light signal into an image electrical signal (Bayer image). In addition, the camera device driver drives the ISP to convert the image electrical signal into a raw image frame, and transmits the raw image frame to the camera HAL through the camera device driver.

[0200] The frame processing module of the camera HAL can determine the image frame to be processed based on the capabilities of the digital signal processor and the image processor and the original image frame. Exemplarily, taking the TOF device as an example, the frame processing module can parse the original image raw image to obtain an infrared (IR) image. Then, the image frames to be processed of each camera are subjected to frame alignment, color consistency processing, distortion correction, field of view (FOV) alignment, epipolar correction and other processing. Optionally, the frame processing module can also directly perform frame alignment and other processing on the original image frames of each camera, and there is no specific restriction on this. And, in order to simplify the expression, the processed image frame corresponding to the TOF device 1944 can be referred to as a depth image frame, the processed image frame corresponding to the wide-angle camera 1941 can be referred to as a first image frame, the processed image frame corresponding to the ultra-wide-angle camera 1943 can be referred to as a second image frame, and the processed image frame corresponding to the telephoto camera 1942 can be referred to as a third image frame. In some embodiments, the terminal device may not include a TOF device, and the embodiment of the present application may not involve a depth image frame. In other embodiments, the terminal device may include only two RGB cameras (two of the wide-angle camera 1941, the telephoto camera 1942, and the ultra-wide-angle camera 1943) or may include an RGB camera and a TOF device, then the embodiments of the present application may not involve the third image frame.

[0201] The 3D scene construction module can perform 3D construction on the captured scene based on the image frames (depth image frame, first image frame, second image frame and third image frame) processed by the frame processing module. Exemplarily, the 3D scene construction module can separate the foreground and background of the first image frame and the second image frame to achieve the construction of the 3D scene. Optionally, the 3D scene construction module can also extract the background of the auxiliary image frame.

[0202] The transition image generation module can generate at least one transition image frame based on the first image frame and the second image frame after the foreground and the background are separated, and use the third image frame to supplement the blind area of ​​the transition image.

[0203] The stereoscopic photo display module can display the first image frame, at least one transition image frame, and the second image frame in sequence according to the tilt angle parameter of the terminal device in the first direction.

[0204] Optionally, the camera HAL may further include a combination file generation module, which is used to generate a perspective change video based on the first image frame, the second image frame, and at least one transition image frame, and to generate a combination file based on the perspective change video and the ordinary photo.

[0205] Furthermore, after determining the perspective change video, the camera HAL can report the perspective change video to the camera application or the gallery application through the camera access interface. The camera application or the gallery application can display the perspective change video in the display interface or save the perspective change video in the mobile phone.

[0206] After introducing the software structure of the electronic device, the image display method provided in the embodiment of the present application is described next.

[0207] The methods in the following embodiments can all be implemented in a terminal device having the above hardware structure. Figure 12-Figure 31 , the specific implementation method of the embodiment of the present application is described in detail. Specifically, the stereoscopic photo display process in the embodiment of the present application can be divided into three parts. The first part is the stereoscopic photo generation scene, that is, the process of the terminal device generating a stereoscopic photo based on the photographed photo. The second part is the stereoscopic photo storage scene, that is, the scene in which the terminal device stores the stereoscopic photo. The third part is the stereoscopic photo display scene, that is, the scene in which the terminal device displays the stereoscopic photo.

[0208] Before introducing the stereoscopic photo generation scenario, the position relationship and posture of the camera of the terminal device are explained.

[0209] Fig.12 FIG. 1 is a schematic diagram showing an exemplary camera distribution relationship of a terminal device provided in an embodiment of the present application. Fig.12 As shown in (1) in FIG. 1 , multiple cameras (RGB cameras) may be located on the same straight line, for example, distributed on a straight line parallel to the y-axis. In another embodiment, as shown in FIG. Fig.12 As shown in (2), multiple cameras (RGB cameras) may not be on the same straight line. For example, three cameras may be distributed in a triangle.

[0210] Fig.13FIG. 1 shows a posture diagram of a terminal device provided in an embodiment of the present application. Fig.13 As shown in (1) in FIG. 1 , the terminal device can be in a vertical screen state during both the photo shooting stage and the display stage. In another embodiment, as Fig.13 As shown in (2) in FIG. 1 , during both the photo shooting stage and the photo display stage, the terminal device can be in a horizontal screen state. In another embodiment, as Fig.13 As shown in (3) in FIG. 1 , during the photo shooting phase, the terminal device may be in a vertical screen state, and during the display phase, the terminal device may be in a horizontal screen state. In another embodiment, as Fig.13 As shown in (4) in FIG. 1 , during the photo shooting phase, the terminal device may be in a horizontal screen state, and during the display phase, the terminal device may be in a vertical screen state. In another embodiment, as Fig.13 (5) and Fig.13 As shown in (6), during the photo shooting stage and / or the display stage, the terminal device may also be in a tilted state, and there is no specific limitation on this.

[0211] After introducing the posture of the terminal device, the process of generating a stereoscopic photo will be described next. Fig.14 FIG. 1 is a flow chart showing a process of generating a stereoscopic photo provided by an embodiment of the present application. Fig.14 As shown, the stereoscopic photo generation process may include steps S110 to S180.

[0212] S110, camera A captures a first image frame.

[0213] In S110, the user Figure 1B After the shooting operation is performed in the shooting interface shown, the terminal device can capture the image of the scene being shot through camera A to obtain an image light signal. Then, the image sensor can perform photoelectric conversion on the captured image light signal to obtain a Bayer image. Then, the ISP is used to process the Bayer image to obtain a first image frame. For example, the first image frame can be Figure 5B The image frame shown.

[0214] In some embodiments, camera A may be an RGB camera in the terminal device. For example, it may be a camera located at the farthest end in a certain direction. Fig.13 Taking the terminal device in (1) as an example, when determining the video of the view change between the left and right eyes, camera A can be the camera located on the leftmost or rightmost side among the multiple RGB cameras of the terminal device. That is, the RGB camera with the smallest or largest coordinate value in the x-axis direction. For example, it can be Fig.12In (2), the wide-angle camera 1941 (with the smallest coordinate value) or the ultra-wide-angle camera 1943 (with the largest x-axis coordinate value) is selected. Alternatively, continue with Fig.13 Taking the terminal device in (2) as an example, when determining the video of the view change between the left and right eyes, camera A can be the camera located at the far left or the far right. That is, the RGB camera with the smallest or largest coordinate value on the y-axis. For example, it can be Fig.12 (1) and Fig.12 The wide-angle camera 1941 or the ultra-wide-angle camera 1943 in (2) of FIG. 10 is further exemplified by Fig.13 For example, in determining the perspective change video of the upper and lower perspectives, camera A can be the camera located at the top or bottom of multiple RGB cameras. That is, the RGB camera with the smallest or largest coordinate value in the y-axis direction. For example, it can be Fig.12 The wide-angle camera 1941 (uppermost) or the ultra-wide-angle camera 1943 (lowermost) in (1) of FIG. 1 . For example, it can be Fig.12 The telephoto camera 1942 (uppermost) in (2) may be, or one of the wide-angle camera 1941 and the ultra-wide-angle camera 1943 (lowermost). It should be noted that the terminal device in the horizontal screen state is similar and will not be described in detail.

[0215] In other embodiments, the main camera of multiple cameras may be selected as camera A. It should be noted that in the embodiment of the present application, one of the multiple cameras may be selected as camera A according to actual conditions and specific scenarios, and there is no specific limitation on this.

[0216] It should be noted that camera A can be an ultra-wide-angle camera, a telephoto camera, a wide-angle camera, etc., and there is no specific limitation on this.

[0217] S120, camera B captures a second image frame.

[0218] In S120, the user Figure 1B After the shooting operation is performed in the shooting interface shown, the terminal device can obtain the second image frame through the camera B. It should be noted that the specific method of obtaining the second image frame can refer to the relevant description of obtaining the first image frame in S110, which will not be repeated here. Figure 5C The image frame shown.

[0219] In some embodiments, among the multiple cameras of the terminal device, camera B can be selected from the remaining cameras except camera A. For example, in order to increase the viewing angle variation range of the stereoscopic photo, when the farthest camera in a certain direction is selected as camera A, the farthest camera in the opposite direction of the direction can be selected as camera B. Fig.13 Taking (1) in FIG. 1 as an example, if the wide-angle camera 1941 is selected as the camera A, the ultra-wide-angle camera 1943 can be selected as the camera B. It should be noted that other methods can be used to select the second camera according to specific circumstances and actual scenarios, which will not be described in detail.

[0220] Optionally, when the terminal device includes one RGB camera and one TOF device, the RGB camera can be selected as camera A, and the TOF device can be selected as camera B.

[0221] S130, camera C captures a third image frame. The first to third image frames may be image frames captured by different cameras at the same time.

[0222] In S130, the user Figure 1B After the shooting operation is performed in the shooting interface shown, the terminal device can obtain the third image frame through the camera C. It should be noted that the specific method of obtaining the second image frame can refer to the relevant description of obtaining the first image frame in S110, which will not be repeated here.

[0223] In some embodiments, among the multiple cameras of the terminal device, the terminal device can select other cameras except camera A and camera B as camera C. For example, Fig.13 Taking (1) in the figure as an example, if the wide-angle camera 1941 is selected as camera A and the ultra-wide-angle camera 1943 is selected as camera B, the telephoto camera 1942 can be selected as camera C.

[0224] Optionally, in the case where the terminal device includes only two cameras, one of them may be used as camera A, and the other camera may be used as camera B. Accordingly, the terminal device may not include camera C.

[0225] S140, the TOF device collects a depth image frame.

[0226] In S140, the user Figure 1B After the shooting operation is performed in the shooting interface shown, the TOF device can collect the original image raw image, and the terminal device can parse the raw image to obtain the IR image (ie, the depth image frame).

[0227] In some embodiments, the TOF device may also be implemented as other depth sensing lenses, wherein the depth sensing lens may be a device capable of recording the depth value of a scene or an object, such as a structured light device, a binocular device, etc., without specific limitation.

[0228] It should be noted that in the embodiment of the present application, the terminal device may not include a TOF device, and accordingly, the subsequent steps may not include relevant content for processing the depth image frame.

[0229] S150: The frame processing module pre-processes each image frame.

[0230] In some embodiments, the pre-processing of the frame processing module may include time synchronization, color consistency correction, distortion correction, field of view angle alignment, epipolar correction and other processing.

[0231] In some embodiments, Fig.15 FIG. 1 is a schematic diagram showing an exemplary image frame preprocessing process provided by an embodiment of the present application. Fig.15 As shown, the frame processing module may include a time synchronization unit, a color correction unit, a field of view alignment unit, an epipolar correction unit, and the like.

[0232] Accordingly, S150 may include one or more of the following steps S151 - S154 .

[0233] S151, a time synchronization unit performs time synchronization (also referred to as frame alignment) on each image frame. Exemplarily, the time synchronized image frames may include depth image frames.

[0234] In one embodiment, in step S151, the time synchronization unit can connect multiple cameras to a trigger source of the same synchronization source through an external synchronization signal input interface (synchronous lock / synchronous phase lock (Genlock)), so as to use the trigger source to simultaneously trigger multiple cameras to start shooting.

[0235] In another embodiment, the time synchronization unit may synchronize the time of each camera using the Simple Network Time Protocol (NTP) protocol. Through this implementation, it is possible to ensure that different cameras use the same timestamp to record the shooting time of each image.

[0236] In another embodiment, the time synchronization unit may synchronize the image frames captured by each camera according to the overlapping parts and sounds of the images captured by multiple cameras, for example, using an adaptive synchronization algorithm to automatically adjust the frame rate alignment.

[0237] It should be noted that in the embodiment of the present application, the time synchronization unit can also perform time synchronization of each image frame in other ways, which is not specifically limited. Through time synchronization, the consistency of the content and picture captured by each image frame can be guaranteed, thereby improving the precision of subsequent stereoscopic photo generation.

[0238] S152, the color correction unit performs color consistency correction on each image frame. Exemplarily, the color-corrected image frames may not include depth image frames.

[0239] In one embodiment, the color correction unit may use a color correction matrix to perform color correction on each image frame. Exemplarily, the color correction matrix may be pre-set, for example, the color correction matrix may be determined before leaving the factory based on the color deviation of the camera in different scenes (such as indoor, outdoor, and other light-changing scenes).

[0240] In another embodiment, the color correction unit may also perform content recognition on each image frame, and perform color correction on the image frame according to the color deviation of the recognized content. For example, if a blue sky is recognized in the image frame, the color correction unit may correct the entire image frame in the direction of correcting the recognized blue sky to blue. By performing color correction based on the image content, the correction accuracy of the image color in different scenes can be guaranteed.

[0241] It should be noted that in the embodiment of the present application, the color correction unit can also perform color correction on each image frame in other ways, so that the same camera scene can ensure color consistency in image frames taken by different cameras, and there is no restriction on the specific correction method. Through color consistency correction, the color coordination in the transition photo can be guaranteed, and the occurrence of color mutation and color unevenness in the transition photo caused by inconsistent colors of each image frame can be avoided, thereby improving the generation accuracy of the stereo photo.

[0242] S153, the field of view alignment unit performs field of view (FOV) (or distortion correction) on each image frame. For example,

[0243] In one embodiment, the field of view alignment unit can correct each image frame through a distortion correction parameter or a distortion correction matrix to ensure the field of view consistency of each image frame. Exemplarily, the distortion correction parameter and the distortion correction matrix can be pre-calibrated. For example, the field of view alignment unit can be based on the internal parameters of the camera (including focal length, image center coordinates), rotation matrix and translation matrix, etc. Then, the image frame captured by the camera is corrected according to the internal parameters, and the corrected image is obtained according to the bilinear difference. Finally, the corrected image is scaled, and a bilinear difference is performed again to obtain the target image frame.

[0244] It should be noted that in the embodiment of the present application, the field of view alignment unit can also perform distortion elimination and line alignment of each image frame in other ways, so that the same camera scene can ensure the consistency of the field of view angle in the image frames taken by different cameras, for example, by correcting the image content, etc., and there is no restriction on the specific correction method. The viewing angles of the cameras in the terminal device are often different, such as a telephoto camera and a wide-angle camera. Through distortion correction, the viewing angle consistency of each image frame can be guaranteed, which is convenient for the generation of subsequent transition photos, reduces the pressure of subsequent image processing, and improves the generation accuracy of stereo photos.

[0245] S154: The epipolar line correction unit performs epipolar line correction on each image frame.

[0246] In one embodiment, epipolar correction can be performed on each image frame using an epipolar correction algorithm. For example, the epipolar correction unit can first determine a rotation matrix to correct the camera coordinate systems of different cameras to be parallel to each other. Then, new intrinsic parameters can be set for different cameras to make the intrinsic parameters of each camera the same. Then, the center point of the camera coordinate system can be offset.

[0247] It should be noted that in the embodiments of the present application, other epipolar correction methods can also be used to correct the epipolar lines of different cameras, such as binocular epipolar correction methods, trinocular epipolar correction methods, etc., without specific restrictions. Through epipolar correction, it can be ensured that the imaging surfaces of the multi-eye cameras are parallel and the rows are aligned, so that the same feature point is on the same row in different image frames. In this way, when the feature points are matched later, only row search is required, which saves calculation time and computing power, avoids false matching feature points, and improves matching accuracy.

[0248] It should be noted that in the embodiment of the present application, other preprocessing operations may also be performed on each image frame to improve the consistency of each image frame in terms of time, color, field of view, etc., and there is no specific limitation on this.

[0249] S160, the 3D scene construction module separates the foreground and background of each image frame (or may be referred to as foreground / background segmentation).

[0250] In some embodiments, Fig.16 FIG. 2 shows a schematic diagram of an exemplary foreground-background separation provided by an embodiment of the present application. Fig.16As shown, after the foreground and background of the original image frame are separated, a background image frame and a foreground image frame can be obtained. The background image frame may include background content in the shooting scene, and the foreground image frame may include foreground content of the shooting scene. Exemplarily, in S160, the 3D scene construction module may divide the first image frame into a first background image and a first foreground image, divide the second image frame into a second background image and a second foreground image, and divide the third image frame into a third background image.

[0251] It should be noted that, in the embodiment of the present application, the foreground content may include a foreground object, such as Fig.17 Optionally, the foreground content may also include multiple foreground objects, such as Fig.17 Accordingly, multiple foreground objects can be in one foreground image frame or in different foreground image frames, and there is no specific limitation on this.

[0252] In one embodiment, the 3D scene construction module may segment the foreground and background of each image frame according to the depth information of each pixel in the image frame.

[0253] Exemplarily, the 3D scene construction module can use a threshold segmentation method to separate the foreground and background according to the depth threshold H0 and the depth image frame. Fig.17 An exemplary depth relationship diagram provided by an embodiment of the present application is shown, wherein the direction of the arrow points to the increasing direction of the depth value.

[0254] Figure 5B The depth relationship of the doll A1, moon cake B1, water cup B2 and table block B3 in the depth image frame is as follows: Fig.17 As shown, the depth value of doll A1 is less than the depth threshold H0, so it can be identified as foreground content, and the depth values ​​of moon cake B1, water cup B2 and table block B3 are all greater than the depth threshold H0, so they can be identified as background content.

[0255] It should be noted that the 3D scene construction module may also use other threshold segmentation algorithms to segment the foreground and background, such as clustering method, binarization method, etc., and there is no specific limitation on this.

[0256] In another embodiment, the 3D scene construction module can separate the foreground and the background by identifying the subject of the shooting. For example, the 3D scene construction module can identify people, animals, buildings, etc. in the image frame as the foreground, and other content as the background.

[0257] For example, Fig.18 FIG. 1 is a schematic diagram of an exemplary captured image frame provided in an embodiment of the present application. Fig.18The depth relationship of each object can be seen in Fig.19 shown. Fig.19 Another exemplary depth relationship diagram provided in an embodiment of the present application is shown, wherein the depth values ​​are, from small to large, tree D1, deer D2, tree D2, tree D3, cloud D4, sun D6, and cloud D5.

[0258] After the 3D scene construction module recognizes the animal fawn C1 as the shooting subject in the captured image frame, the fawn C1 may be recognized as the foreground content and the remaining captured objects may be recognized as the background content.

[0259] It should be noted that in the embodiments of the present application, the 3D scene construction module can also use other foreground and background separation algorithms, such as a mixed Gaussian algorithm, an edge segmentation algorithm, a region segmentation algorithm or a morphological segmentation method, or the 3D scene construction module can also use a pre-selected trained neural network model to separate the foreground and background, without specific restrictions.

[0260] And, in some other embodiments, the 3D scene construction module inputs the first image frame and the second image frame into the neural network model to obtain a 3D model of the shooting scene. Optionally, the neural network model can also construct a 3D model of the shooting scene based on the third image frame and / or the depth image frame input into the neural network model.

[0261] Exemplarily, the neural network model can be Neural Radiance Fields (NeRF), which is a 3D scene representation method. In an embodiment of the present application, NeRF can use a neural network to learn the radiation properties of light in a scene by taking multiple image frames (such as a first image frame and a second image frame) of a scene at different viewing angles, and use a neural network to implicitly encode the density and color of a spatial point. That is, NeRF can predict color values ​​and density values ​​based on the three-dimensional coordinates of a spatial point.

[0262] It should be noted that in the embodiments of the present application, a 3D scene can be constructed for the captured scene based on multiple image frames in other ways, and there is no specific limitation on this.

[0263] S170, the transition photo generation module generates m transition photos based on the separated first image frame, the second image frame, and the third image frame. Among them, m can be an integer greater than or equal to 2. In some embodiments, m can be set according to actual needs or specific scenarios, for example, it can be set to 10 photos, etc. In one example, the terminal device can perform content recognition on the taken photos to determine the content complexity of the taken photos. When the content complexity is small, m is set to a smaller value, and when the content complexity is large, m is set to a larger value. In another example, the terminal device can determine the value of m based on its own remaining storage space and computing power. In another example, the user can set the value of m in the setting interface of the terminal device.

[0264] Transition photos, i.e., photos used to describe the shooting scene under multiple viewing angles, each transition photo corresponds to a shooting viewing angle, and the m transition photos are sorted in order according to the viewing angle, such as arranged in order from small to large. In some embodiments, the m transition photos may include a first image frame, at least one intermediate transition image frame, and a second image frame. In some embodiments, the intermediate transition image frame may be synthesized based on the first image frame and the second image frame. The shooting viewing angle of the intermediate transition image frame is between the shooting viewing angle of the first image frame and the shooting viewing angle of the second image frame. Exemplarily, the shooting viewing angle of the intermediate transition image frame is greater than the shooting viewing angle of the first image frame and less than the shooting viewing angle of the second image frame. Alternatively, the viewing angle of the intermediate transition image frame is less than the shooting viewing angle of the first image frame and greater than the shooting viewing angle of the second image frame. Exemplarily, the shooting viewing angles of the m transition photos may be E1, E1+△E0, E1+2△E0, ..., E2 in sequence. Among them, E1 may be the shooting viewing angle of the first image frame, and E2 may be the shooting viewing angle of the second image frame.

[0265] For example, continue with Figure 6 For example, image 1 to image 6 may be transitional photos, where image 1 is the first image frame and image 6 is the second image frame, and image 2 to image 5 may be intermediate transitional image frames. Optionally, the m transitional photos may further include a third image frame. It should be noted that, depending on the actual situation and specific scenario, the m transitional photos may also not include the first image frame or the second image frame, and there is no specific limitation on this.

[0266] After introducing the specific content of the transition photo, the specific implementation of S170 will be described next.

[0267] In some embodiments, Fig. 20 FIG. 1 is a schematic diagram showing a process for generating a transitional photo provided by an embodiment of the present application. Fig. 20As shown, the transition photo generation module may include an image registration unit, a transition area generation unit, a blind area supplement unit and an image fusion unit. Specifically, S170 may include the following steps S171 to S176.

[0268] S171, an image registration unit registers the first background image (the background image of the first image frame) and the second background image (the background image of the second image frame). Fig.21 FIG. 1 is a schematic diagram showing an exemplary process of generating a transitional photo provided in an embodiment of the present application. Fig.21 As shown, after image segmentation, the image registration unit may register the first background image E11 (the background image of the first image frame E01 ) and the second background image E21 (the background image of the second image frame E02 ).

[0269] In one embodiment, S171 may include the following steps 1 and 2.

[0270] Step 1: The image registration unit may perform feature point detection on the first background image to obtain a plurality of first feature points. Also, the image registration unit may perform feature point detection on the second background image to obtain a plurality of second feature points. Exemplarily, the image registration unit may use feature point extraction algorithms such as Scale-Invariant Feature Transform (SIFT), accelerated version of robust features (SURF), an algorithm for fast feature point extraction and description (Oriented Fast and Rotated Brief, ORB), or may be a neural network model for feature point extraction, without specific limitation.

[0271] For example, Fig. 22 FIG. 1 is a flow chart showing an exemplary image registration process provided by an embodiment of the present application. Fig. 22 As shown, the image registration unit can perform feature point detection on the first background image E11 to obtain the detected first background image E12, and perform feature point detection on the second background image E21 to obtain the detected second background image E22. The first background image E12 and the second background image E22 include multiple feature points (shown as black dots).

[0272] Step 2: The image registration unit performs feature point matching on the first feature point and the second feature point. Alternatively, it can also be called key point matching. Exemplarily, the image registration unit can calculate the similarity measurement method of the distance between feature points, an exhaustive method such as a kd tree, or a neural network model with a feature point matching function, etc., without specific limitation.

[0273] For example. Fig. 22 After matching the feature points in the first background image E12 and the second background image E22 after detection, a plurality of matching first feature point pairs can be obtained ( Fig.21 The feature points connected by dotted lines are represented as matching feature point pairs).

[0274] S172, the image registration unit registers the first foreground image (the foreground image of the first image frame) and the second foreground image (the foreground image of the second image frame). Fig.21 The image registration unit can also register the first foreground image E13 and the second foreground image E23.

[0275] It should be noted that the registration method of the foreground image is similar to that of the background image. For example, feature point detection and feature point matching can be used to obtain multiple matching second feature point pairs. The specific calculation method can be found in the relevant description of the above part of the embodiment of the present application, and will not be repeated here.

[0276] S173, the transition region generating unit generates m transition backgrounds based on the registered first background image and the second background image. Fig.21 The transition area generating unit may generate m transition backgrounds F1 to Fm based on the first background image E11 and the second background image E21.

[0277] In some embodiments, S173 may include the step of determining the positions of pixel points in m transition backgrounds, namely, the following steps three and four.

[0278] Step 3: The transition region generation unit may construct a background transition matrix based on the registered first background image and the second background image. Specifically, the transition region generation unit may construct a background transition matrix based on a plurality of first feature point pairs. Exemplarily, the background transition matrix may be implemented as a homography matrix.

[0279] For example, if the pixel point F1 on the first background image, the pixel point F2 on the second background image, and the background transition matrix H1 can satisfy the following formula (1):

[0280] F2 = H1F1 (1)

[0281] For example, formula (1) can also be expressed as the following formula (2):

[0282] (2)

[0283] The coordinates of the pixel point F1 are expressed as (x1, x2), the coordinates of the pixel point F2 are expressed as (x1, x2), and the homography matrix H1 is expressed as the 3*3 matrix in formula (2).

[0284] Step 4: The transition area generation unit may multiply the background transition matrix H1 by a preset proportional coefficient to obtain the moving distance of each pixel from the first background image to the transition background. Then, based on the moving distance of each pixel, the position of each pixel in the transition background is determined. Each transition background corresponds to a preset proportional coefficient, and the preset proportional coefficient is less than or equal to 1.

[0285] For example, the pixel points of the i-th transition background can be expressed as the following formula (3):

[0286] (3)

[0287] in, is the preset proportional coefficient corresponding to the i-th transition background.

[0288] In a specific example, Figure 23A-23B FIG. 2 shows a schematic diagram of generating an exemplary transition background provided by an embodiment of the present application. Fig.23A As shown, if the pixel point P1 in the first background image F1 corresponds to the pixel point P10 in the second background image F10, then in the generated transition backgrounds F2 to F9, the pixel points P2 to P9 may correspond.

[0289] In some embodiments, S173 may also include a step of determining the colors of pixels in m transition backgrounds, namely, the following step five.

[0290] In step 5, the transition area generating unit may determine the color value of the corresponding pixel point in each transition background based on each group of first feature point pairs.

[0291] In one embodiment, for each group of first feature points, the transition region generation unit may average or weight the color values ​​(such as RGB values) of the corresponding pixel points in the first background image and the color values ​​of the corresponding pixel points in the second background image to obtain the color values ​​of the corresponding pixel points in each transition image. Fig.23A For example, the transition area generation unit may average the color value of pixel point P1 and the color value of pixel point P10 to obtain the color values ​​of pixel points P2 to P9. Alternatively, in order to further improve the color accuracy, the transition area generation unit may also average the color value of pixel point P1, the color value of pixel point P10, and the color value of the pixel point corresponding to pixel point P1 in the third background image.

[0292] In other embodiments, for each group of first feature points, the transition area generation unit may determine the color value of the pixel in the transition background in order of priority. Exemplarily, the color value of the pixel of the first background image (taking the first image frame as the main shot as an example) is preferably selected as the color value of the corresponding pixel in the transition background. In the case where the corresponding pixel does not exist in the first background image, the transition area generation unit preferentially selects the color value of the pixel of the second background image as the color value of the corresponding pixel in the transition background.

[0293] In some other embodiments, for each group of first feature points, the transition region generation unit may also determine the color value of the corresponding pixel in the transition background according to the difference between the color value of the corresponding pixel in the first background image and the color value of the corresponding pixel in the second background image, so as to form a color transition. Fig.23A As shown, the color values ​​of pixel point P1 to pixel point P10 change gradually.

[0294] It should be noted that in S173, other methods may be used to determine the positions and colors of the pixels in each transition image, such as interpolation method, etc., and no specific limitation is imposed on this.

[0295] S174, the transition foreground generation unit generates m transition foreground images based on the registered first foreground image and the second foreground image. The i-th transition foreground image and the i-th transition background image correspond to the same viewing angle. Fig.21 The transition foreground generation unit can generate m transition foregrounds H1 to Hm based on the first foreground image E13 and the second foreground image E23. The generation process of the m transition foregrounds H1 to Hm can refer to the relevant description of the above part of the embodiment of the present application combined with S173, which will not be repeated here.

[0296] S175, the blind area supplement unit uses the second background image and the third background image to supplement the blind area of ​​the transition background. Fig.21 , the blind spot supplement unit can use the second background image E21 and the third background image E31 to supplement the blind spots of the transition backgrounds F1 to Fm, and obtain supplemented transition backgrounds G1 to Gm. It should be noted that when the terminal device also captures other image frames such as the fourth image frame, other image frames can also be used to continue to supplement the blind spots of the transition images, and there is no specific limitation on this. And, when the terminal device does not capture the third image frame, only the second background image can be used to supplement the blind spots.

[0297] In one embodiment, the blind spot supplement unit can determine the blind spot (such as a black area) in the transition background. Then, determine the corresponding area of ​​the blind spot in the second background image and the third background image. When there is image content in the corresponding area, the blind spot is filled with the image using the corresponding area. Optionally, the supplement priority of the second background image and the third background image can be determined. For example, the blind spot is supplemented using the second background image first, and the area that is not supplemented in the second background image is continued to be supplemented using the third background image. Optionally, for any pixel in the blind spot, the color value of the corresponding pixel in the second background image and the color value of the corresponding pixel in the third background image can be determined according to a certain weight, and then supplemented. It should be noted that the blind spot can also be supplemented in other ways, and there is no specific limitation on this.

[0298] In one example, Fig.24 FIG. 1 is a schematic diagram showing an exemplary blind spot supplementation process provided by an embodiment of the present application. Fig.24 As shown, there is a blind area L1 in the partial enlarged image of the local area of ​​the transition background, and there is a supplementary area L2 in the partial enlarged image of the local area of ​​the second background image. The blind area L1 and the supplementary area L2 are photographed at the same position of the same object, but the transition background does not generate this area, while the second background image captures the image content of this position. At this time, the supplementary area L2 can be used to supplement the blind area L1, further improving the integrity of the transition background.

[0299] Furthermore, it should be noted that, since the third background image is required to supplement the blind area, the third image and the first image may be pre-registered. The specific registration method may refer to the relevant description in the above part, and no specific limitation is made thereto.

[0300] Optionally, in some embodiments, the blind spot supplement unit may also supplement the blind spot of the transition foreground. The specific supplement method is similar to the blind spot supplement of the transition background, which will not be described in detail.

[0301] S176, the image fusion unit generates m transition photos based on the m transition foregrounds and the supplemented m transition backgrounds. Fig.21 , the image fusion unit can use m transition foregrounds H1 to Hm and supplemented transition backgrounds G1 to Gm to synthesize transition photos J1 to Jm. Specifically, the transition foreground H1 and the supplemented transition background G1 generate transition photo J1; the transition foreground H2 and the supplemented transition background G2 generate transition photo J2; ...; the transition foreground Hm and the supplemented transition background Gm generate transition photo Jm.

[0302] For example, in S176, the image fusion unit may perform image fusion on a transition foreground and a supplemented transition background to obtain a transition photo. The image fusion algorithm may be an average fusion method, a pyramid fusion method, a gradient domain fusion method, a wavelet transform method, a structural deformation method, etc., or a pre-selected trained neural network model may be used for image fusion, which is not specifically limited.

[0303] Optionally, the image fusion unit may also fill the blind area in other ways, such as morphological dilation method, Gaussian smoothing method, etc., which is not specifically limited.

[0304] Optionally, the terminal device may not supplement the transition background, and directly use the unsupplemented transition background to generate the transition photo, so as to save computing power or improve image generation efficiency.

[0305] Optionally, the terminal device may also perform image optimization and other processing on the transitional photo to improve image resolution, clarity, noise removal, color and other image qualities.

[0306] Since the change of the occlusion relationship between the foreground content and the background content is more obvious when the shooting perspective changes, through the above S171 to S176, the change of the occlusion relationship between the foreground content and the background content in different transition photos can be used to represent the views of different shooting perspectives, the image processing difficulty is low and the perspective change in the stereoscopic photo can be accurately expressed, thereby improving the image processing effect.

[0307] In addition to introducing a feasible method for generating transition photos based on foreground and background segmentation algorithms through S171 to S176, the terminal device can also determine the views of the constructed 3D model in m connected perspectives through the NeRF model, and each view is a transition photo.

[0308] It should be noted that the terminal device can also generate transition photos in other ways, and there is no specific limitation on this.

[0309] S180, the ordinary photo generation module processes the first image frame to obtain a main camera photo (also referred to as an ordinary photo). The ordinary photo is a photo captured and displayed by the terminal device in a normal shooting mode.

[0310] Exemplarily, the image processing may be image optimization processing such as improving image resolution, improving clarity, removing noise, improving color, converting image format, etc., and there is no specific limitation on this.

[0311] It should be noted that S180 in the embodiment of the present application can be executed after S110, and there is no specific limitation on the sequence between S180 and other steps.

[0312] Optionally, the terminal device may further include a preview photo generation module, which performs preview processing on the first image frame to obtain a preview photo. The preview photo is a photo displayed in the preview window. Exemplarily, the preview processing may be image processing such as reducing resolution or converting image format, which is not specifically limited.

[0313] Through the above Figures 14 to 24 After introducing the generation process of stereoscopic photos, the storage process of stereoscopic photos will be explained next.

[0314] Fig.25 FIG. 1 is a flow chart showing a stereoscopic photo storage process provided by an embodiment of the present application. Fig.25 As shown, the terminal device may further include a video generation module, a file generation module and a target storage area. Specifically, the stereoscopic photo storage process may include the following steps S210 to S230.

[0315] S210, the video generation module generates a perspective change video based on the m transition photos. In the perspective change video, the m transition photos are arranged in sequence according to the perspective size, so that each transition photo can be displayed in sequence according to the arrangement order when the video is played. For example, Fig.26 FIG. 2 shows a schematic diagram of a video of a perspective change provided by an embodiment of the present application. Fig.26 As shown, each transition photo can be used as a video frame of the perspective change video, and the m transition photos can be arranged in the order of transition photo J1 to image Jm. Accordingly, when the video is played sequentially, transition photos J1 to Jm can be displayed in sequence, for example, after transition photo J1 is displayed for a certain time, transition photo J2 is switched to be displayed, after transition photo J2 is displayed for a certain time, transition photo J3 is switched to be displayed, and the video ends after transition photo Jm is displayed for a certain time. And, when the video is played in reverse order, transition photos Jm to J1 can be displayed in sequence. Or. It can be arranged in the order of image 6 to image 1, so that when the video is played, the display effect of perspective conversion can be formed by displaying m arranged photos in sequence.

[0316] In one example, the perspective change video may be in mp4 format, or may be set to other video formats according to other requirements, without specific limitation.

[0317] S220, the file generation module generates a combined file based on the perspective change video and the main camera photo. The perspective change video and the main camera photo may correspond to the same acquisition time. For example, the perspective change video may be generated based on the first image frame, the second image frame, and the third image frame at a certain moment, and the main camera photo may be generated based on the first image frame at the same moment. In one example, Fig. 27 A schematic diagram of an exemplary combination file provided in an embodiment of the present application is shown. Fig. 27 As shown, the combined file may be a JPEG file, and a JPEG file may include a main camera photo and a perspective change video. Optionally, when the terminal device can generate perspective change videos of left and right perspectives and perspective change videos of upper and lower perspectives based on image frames captured at the same time, a JPEG file may include a main camera photo and two perspective change videos (perspective change videos of left and right perspectives and perspective change videos of upper and lower perspectives). It should be noted that when the terminal device can also generate perspective change videos in more directions based on image frames captured at the same time, more perspective change videos may be included in a JPEG file, and there is no specific limitation on this.

[0318] Exemplarily, the combined file may use the main photo as the cover.

[0319] Exemplarily, the combined file may be a JPEG file. Accordingly, the file generation module may place the main camera photo and the perspective change video according to the JPEG format standard. In this embodiment, the expansion space of the JPEG file may be used to achieve the corresponding placement of the main camera photo and the perspective change video.

[0320] It should be noted that by generating a combined file, the perspective change video and the main camera photo can be made to correspond one to one, so that when the preset trigger operation is performed on the main camera photo subsequently, the perspective change video of the shooting scene taken by the main camera photo can be played accordingly, avoiding the problem of inconsistency between the main camera photo and the perspective change video.

[0321] It should be noted that in the embodiment of the present application, other methods can be used to make the perspective change video and the main camera photo correspond one-to-one, such as setting the same file name or other file identifier, etc., and there is no specific limitation on this.

[0322] S230, the target storage area receives and stores the combined file. Exemplarily, the target storage area may be a storage area inside the terminal device for storing the video with the change of viewing angle. For example, it may be an internal memory or a buffer of the terminal device, etc., which is not limited.

[0323] For example, see Fig. 27, the target storage area can store multiple JPEG files, such as JPEG file 1, JPEG file 2, etc.

[0324] Furthermore, when the perspective change video does not need to be displayed corresponding to the main camera video and the terminal device does not need to generate a combined file, the target storage area can also directly store the perspective change video, and the embodiment of the present application does not impose any specific restrictions on this.

[0325] Through the above Figure 25 to Figure 27 After introducing the storage process of stereoscopic photos, the display process of stereoscopic photos will be explained next.

[0326] Fig.28 FIG. 1 is a flow chart showing a stereoscopic photo display process provided by an embodiment of the present application. Fig.28 As shown, the terminal device may further include a video generation module, a file generation module and a target storage area. Specifically, the stereoscopic photo storage process may include the following steps S310 to S230.

[0327] S310: In response to a user's stereoscopic photo display operation, a tilt detection module detects an angle tilt parameter of a terminal device.

[0328] The stereoscopic photo display operation may be an operation by a user to trigger the stereoscopic photo display. In one example, the stereoscopic photo display operation may be a trigger operation for a stereoscopic photo display control on a user interface, such as a click, double-click, drag, etc. For example, the stereoscopic photo display operation may be an operation by a user to trigger the stereoscopic photo display control. Figure 1D In another example, the stereoscopic photo display operation can be a preset trigger operation performed by the user on the main photo. Figure 1D The operations shown in the picture display interface are long press, double click, knuckle tapping, etc. in the main picture display area. In another example, the stereoscopic picture display operation can also be a user's voice trigger command, etc.

[0329] For the angle tilt parameter, it can be a parameter that can measure the tilt degree and tilt direction of the terminal device. For example, it can be the tilt angle and tilt acceleration of the terminal device along a certain direction, or it can be the rotation angle and rotation acceleration of the terminal device along a certain axis, and there is no specific limitation on this. In one example, taking the angle tilt parameter as the rotation angle of the terminal device along the y-axis as an example, the tilt detection module can be a gyroscope sensor, which can detect the clockwise rotation angle or counterclockwise rotation angle of the terminal device around the y-axis.

[0330] In some embodiments, in order to simulate the effect of the change in viewing angle of the terminal device during movement, the tilt detection module can detect the angle tilt parameter of the terminal device in a first direction. The first direction can be a horizontal direction or a vertical direction. Fig.13 , if the terminal device is in a portrait state, the horizontal direction may be the direction of the x-axis, and the vertical direction may be the direction of the y-axis. In another exemplary embodiment, if the terminal device is in a landscape state, the horizontal direction may be the direction of the y-axis, and the vertical direction may be the direction of the x-axis.

[0331] In an embodiment of the present application, the viewing angle of the m transitional photos may gradually change along the first direction. For example, continuing the first direction may be the same as the direction of the viewing angle change in the transitional photos. Also, in an embodiment of the present application, in order to ensure that the viewing angle of the m transitional photos gradually changes in the first direction, during the shooting phase, there is a position difference between the first camera and the second camera in the first direction, such as a first distance between the first camera and the second camera in the first direction. Also, for the third camera, it may be flush with the first camera in the first direction, have a first distance, or have a second distance (the second distance and the first distance have different distance values). Optionally, in order to improve the accuracy of the stereoscopic photo, there is a second distance between the third camera and the first camera in the first direction.

[0332] For example, continue with Fig.26 For example, taking the first direction as the horizontal direction, the perspective of the transition photos J1 to JM changes from left to right. Fig.13 In (1), if the terminal device is in the portrait mode during the shooting phase, the first camera and the second camera of the terminal device need to have a position difference in the x-axis direction, and the viewing angles of the generated m transition photos gradually change in the horizontal direction. If the terminal device is in the portrait mode during the shooting phase, the tilt detection module needs to detect the tilt angle of the terminal device in the x-axis direction (the x-axis direction is the first direction in this case). Fig.13 In (2), if the terminal device is in landscape mode during both the shooting and displaying phases, the first camera and the second camera need to have a position difference in the y-axis direction, and the tilt detection module needs to detect the tilt angle of the terminal device in the y-axis direction (the y-axis direction is the first direction in this case). Fig.13 The camera position difference and tilt angle in the postures shown in (3)-(6) can be found in Fig.13 The relevant explanations of (1) and (2) in are not repeated here. Fig.13 In (3), the first camera and the second camera need to have a position difference on the x-axis, and the tilt detection module needs to detect the tilt angle of the terminal device on the y-axis.

[0333] S320, the stereoscopic photo display module plays the perspective change video when the angle tilt parameter is greater than or equal to the preset parameter threshold. The preset parameter threshold can be set according to actual conditions and specific scenes, such as 5 degrees, and its specific value is not limited.

[0334] In some embodiments, the stereoscopic photo display module plays the perspective change video in sequence when the counterclockwise rotation angle of the terminal device along a certain axis is greater than or equal to a preset parameter threshold. Fig.29A FIG. 1 is a schematic diagram showing an exemplary viewing angle change video playback process provided by an embodiment of the present application. Fig.29A As shown, when the counterclockwise rotation angle of the terminal device is greater than or equal to the preset parameter threshold, transition photos J1 to transition photos Jm can be played in sequence. For example, if the terminal device is in landscape mode, the terminal device is tilted to the left (i.e., rotated counterclockwise along the y-axis), then transition photos J1 to transition photos Jm can be played in sequence to achieve a viewing effect of a person viewing the captured scene from left to right.

[0335] In another embodiment, the stereoscopic photo display module plays the video with the change of viewing angle in reverse order when the clockwise rotation angle of the terminal device along a certain axis is greater than or equal to a preset parameter threshold. Fig.29B FIG. 1 is a schematic diagram showing an exemplary viewing angle change video playback process provided by an embodiment of the present application. Fig.29B As shown, when the clockwise rotation angle of the terminal device is greater than or equal to the preset parameter threshold, the transition photos Jm to J1 can be played in sequence. For example, if the terminal device is in landscape mode, the terminal device is tilted to the right (i.e., rotated counterclockwise along the y-axis), then the perspective change video can be played in reverse order, that is, the transition photos Jm to J1 are displayed in sequence, so as to achieve the effect of people viewing the captured scene from right to left.

[0336] In some embodiments, the perspective change video may include a first perspective change video and a second perspective change video. Wherein, the first perspective change video includes multiple first transition photos, and the perspectives of the multiple first transition photos gradually change along the first direction, and the second perspective change video includes multiple second transition photos, and the perspectives of the multiple second transition photos gradually change along the second direction. The terminal device can also detect the angle tilt parameter of the terminal device in the second direction. When the angle tilt parameter is greater than or equal to the preset parameter threshold, the second perspective change video can also be played according to the playback method of the above-mentioned perspective change video. For example, when the terminal device is in a horizontal screen state, if the terminal device is tilted left and right, the perspective change video of the left and right perspective change is played; if the terminal device is tilted up and down, the perspective change video of the up and down perspective change is played.

[0337] In some embodiments, the stereoscopic photo display module can also play the video of the change of viewing angle at a certain rate according to the tilt rate / tilt acceleration of the terminal device. For example, the faster the tilt rate / tilt acceleration of the terminal device, the faster the viewing angle change video is played. In one example, the tilt rate of the terminal device can be the rotation speed of the terminal device along a certain axis. Through this embodiment, the real scene seen by a person moving at different speeds can be simulated by adjusting the playback speed, thereby further improving the playback authenticity of the stereoscopic photo.

[0338] In some embodiments, the terminal device can display transition photos according to its real-time tilt angle. Fig.30 The following is a schematic diagram showing an exemplary stereoscopic photo display process provided by an embodiment of the present application. Fig.30 As shown, each transition photo may correspond to an angle (i.e., the viewing angle corresponding to the transition photo), for example, transition photo 1 corresponds to angle 1, transition photo 2 corresponds to angle 2, ... If the real-time tilt angle of the terminal device is angle 3, the display judgment module may determine that the photo to be displayed is transition photo 3 according to the corresponding relationship between the transition photo and the angle, and accordingly, the stereoscopic photo display module may display transition photo 3.

[0339] In some embodiments, the terminal device may also change the playback order of the video with the perspective change when a reverse tilt occurs during the video playback. Fig.31 FIG. 1 is a schematic diagram showing another exemplary stereoscopic photo display process provided by an embodiment of the present application. Fig.31 As shown, when the terminal device plays transition photo 3 in sequence, if a sudden change in the tilt direction of the terminal device is detected, such as a change from left to right, the terminal device can start playing in reverse order from transition photo 3, that is, display transition photo 3 to transition photo 1 in sequence.

[0340] It should be noted that in the embodiment of the present application, the terminal device can also display the m transition photos in order in other ways. For example, the m transition photos are sorted in order according to the viewing angle, and the sorting results are displayed in order.

[0341] It is understandable that, in order to realize the above functions, the electronic device includes hardware and / or software modules corresponding to the execution of each function. In combination with the algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in combination with the embodiments, but such implementation should not be considered to be beyond the scope of the present application.

[0342] In one example, Fig.32 A schematic block diagram of a device 300 according to an embodiment of the present application is shown. The device 300 may include: a processor 301 and a transceiver / transceiver pin 302 , and optionally, a memory 303 .

[0343] The components of the device 300 are coupled together via a bus 304, wherein the bus 304 includes a power bus, a control bus, and a status signal bus in addition to a data bus. However, for the sake of clarity, all buses are referred to as bus 304 in the figure.

[0344] Optionally, the memory 303 may be used for instructions in the aforementioned method embodiment. The processor 301 may be used to execute instructions in the memory 303, and control the receiving pin to receive a signal, and control the sending pin to send a signal.

[0345] The apparatus 300 may be the electronic device or a chip of the electronic device in the above method embodiment.

[0346] Among them, all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module, and will not be repeated here.

[0347] The steps performed by the terminal 100 in the control method of a display device provided in the above embodiment of the present application may also be performed by a chip system included in the terminal 100, wherein the chip system may include a processor and a Bluetooth chip. The chip system may be coupled to a memory so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above terminal 100. The processor in the chip system may be an application processor or a processor other than an application processor.

[0348] Similarly, in the above embodiment, the steps performed by the display device 200 may also be performed by a chip system included in the display device 200, wherein the chip system may include a processor and a Bluetooth chip. The chip system may be coupled to a memory, so that when the chip system is running, the computer program stored in the memory is called to implement the steps performed by the above display device 200. The processor in the chip system may be an application processor or a processor other than an application processor.

[0349] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. An image display method, It is characterized in that The method is applied to a terminal device, and the method comprises: In response to a first operation of a user, a first image of a shooting scene captured by a first camera is acquired, and a second image of the shooting scene is acquired by a second camera, wherein a first distance between the first camera and the second camera in a first direction is the same, and a time of acquisition of the first image is the same as a time of acquisition of the second image; Detecting posture information of the terminal device; When the posture information meets the preset posture condition, displaying a plurality of third images in sequence, the third images being generated based on the first image and the second image, Wherein, in the first direction, each of the third images corresponds to a viewing angle, the plurality of third images are arranged in sequence according to the viewing angles, and each of the third images corresponds to a different viewing angle; The posture information includes an angle tilt parameter of the terminal device, and the preset posture condition includes that the angle tilt parameter is greater than or equal to a preset parameter threshold.

2. The method according to claim 1, It is characterized in that The first direction is an extension direction of the first axis, and the detecting the posture information of the terminal device includes: detecting a rotation angle of the terminal device around a second axis, The first axis and the second axis are the same axis or different axes.

3. The method according to claim 2, It is characterized in that The rotation angle includes a clockwise rotation angle or a counterclockwise rotation angle around the second axis, The sequentially displaying a plurality of third images comprises: When the counterclockwise rotation angle of the terminal device around the second axis is greater than or equal to a preset parameter threshold, displaying the plurality of third images in sequence according to the positive order of the plurality of third images; When the clockwise rotation angle of the terminal device around the second axis is greater than or equal to the preset parameter threshold, the multiple third images are displayed in sequence according to the results of the reverse order of the multiple third images.

4. The method according to claim 1, It is characterized in that The sequentially displaying a plurality of third images comprises: A target video file is played, wherein the target video file includes the plurality of third images arranged in sequence, and each third image is a video frame of the target video file.

5. The method according to claim 1, It is characterized in that The method further comprises: In response to the first operation, acquiring a fourth image captured by a third camera, where a capture time of the fourth image is the same as a capture time of the first image; The third image is obtained by filling the blind area with the fourth image, and the fourth image is used to fill the blind area of ​​the third image.

6. The method according to any one of claims 1 or 5, It is characterized in that The method further comprises: In response to the first operation, acquiring a fifth image captured by a depth sensor, where a capture time of the fifth image is the same as a capture time of the first image; The third image is generated based on the first image, the second image and the fifth image.

7. The method according to claim 1, It is characterized in that After acquiring the first image captured by the first camera and acquiring the second image captured by the second camera, and before detecting the posture information of the terminal device, the method further includes: Performing image segmentation on the first image to obtain a first foreground image and a first background image; Performing image segmentation on the second image to obtain a second foreground image and a second background image; Based on the first background image and the second background image, generating a plurality of third background images; Based on the first foreground image and the second foreground image, a plurality of third foreground images are generated, wherein the plurality of third background images correspond to the plurality of third foreground images one by one, and each group of corresponding third background images and third foreground images corresponds to the same viewing angle; Based on each group of corresponding third foreground images and third background images, one third image is generated.

8. The method according to claim 7, It is characterized in that The step of generating a third image based on each group of corresponding third foreground images and third background images comprises: In response to the first operation, acquiring a fourth image captured by a third camera, where a capture time of the fourth image is the same as a capture time of the first image; Performing image segmentation on the fourth image to obtain a fourth background image; For each group of the third foreground image and the third background image, using the fourth background image, supplement the third background image in each group in a blind area to obtain a fifth background image; The fifth background image and the third foreground image in each group are subjected to image fusion to obtain the third image corresponding to each group.

9. The method according to claim 7, It is characterized in that The performing image segmentation on the first image to obtain a first foreground image and a first background image includes: In response to the first operation, acquiring a fifth image captured by a depth sensor, where a capture time of the fifth image is the same as a capture time of the first image; The first image is segmented by using the fifth image to obtain the first foreground image and the first background image.

10. The method according to claim 7, It is characterized in that Each third image corresponds to a preset scale factor, and the generating of a plurality of third background images based on the first background image and the second background image includes: Determine a plurality of first feature point pairs, each of the first feature point pairs comprising a first feature point in the first background image and a second feature point in the second background image, the first feature point and the second feature point matching each other; Based on the plurality of first feature point pairs, determining a background transition matrix; Based on the background transition matrix and each of the preset scale coefficients, determining a third background image corresponding to each of the preset scale coefficients, Wherein, based on the background transition matrix and each of the preset scale coefficients, determining the third background image corresponding to each of the preset scale coefficients comprises: For each of the preset scale coefficients, based on the product of each of the preset scale coefficients and the background transition matrix, a moving distance of each pixel is obtained, wherein the moving distance is a moving distance of the pixel from the first background image to the third background image corresponding to each of the preset scale coefficients; Based on the moving distance of each pixel point and the position of each pixel point in the first background image, the position of each pixel point in the third background image corresponding to each of the preset scale coefficients is determined.

11. The method according to claim 7, It is characterized in that Each third image corresponds to a preset scale factor, and the generating of a plurality of third foreground images based on the first foreground image and the second foreground image includes: Determine a plurality of second feature point pairs, each of the second feature point pairs comprising a third feature point in the first foreground image and a fourth feature point in the second foreground image, the third feature point and the fourth feature point matching; Determining a foreground transition matrix based on the plurality of second feature point pairs; Based on the foreground transition matrix and each of the preset scale coefficients, a third foreground image corresponding to each of the preset scale coefficients is determined.

12. The method according to claim 4, It is characterized in that Before playing the target video file, the method further includes: Based on the plurality of third images, generating the target video file; Based on the target video file and the first image, generate a target display file; The target display file is stored in the target storage area, and the target display file is used to store the target video file and the first image correspondingly.

13. An electronic device, It is characterized in that include: one or more processors; Memory; and one or more computer programs, wherein the one or more computer programs are stored in the memory, and when the computer programs are executed by the one or more processors, the electronic device performs the following steps: In response to a first operation of a user, a first image of a shooting scene captured by a first camera is acquired, and a second image of the shooting scene is acquired by a second camera, wherein a first distance between the first camera and the second camera in a first direction is the same, and a time of acquisition of the first image is the same as a time of acquisition of the second image; Detecting the posture information of the terminal device; When the posture information satisfies a preset posture condition, a plurality of third images are displayed in sequence, wherein the third images are generated based on the first image and the second image. Wherein, in the first direction, each of the third images corresponds to a viewing angle, the plurality of third images are arranged in sequence according to the viewing angles, and each of the third images corresponds to a different viewing angle; The posture information includes an angle tilt parameter of the terminal device, and the preset posture condition includes that the angle tilt parameter is greater than or equal to a preset parameter threshold.

14. The electronic device according to claim 13, It is characterized in that When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to the first operation, acquiring a fourth image captured by a third camera, where a capture time of the fourth image is the same as a capture time of the first image; The third image is obtained by filling the blind area with the fourth image, and the fourth image is used to fill the blind area of ​​the third image.

15. The electronic device according to claim 13, It is characterized in that When the computer program is executed by the one or more processors, the electronic device performs the following steps: In response to the first operation, acquiring a fifth image captured by a depth sensor, where a capture time of the fifth image is the same as a capture time of the first image; The third image is synthesized based on the first image, the second image and the fifth image.

16. A chip, It is characterized in that including one or more interface circuits and one or more processors; Wherein, the interface circuit is used to receive a signal from a memory of an electronic device and send the signal to the processor, wherein the signal includes computer instructions stored in the memory; when the processor executes the computer instructions, the electronic device executes the image display method described in any one of claims 1 to 12.

17. A computer-readable storage medium, It is characterized in that The invention comprises a computer program, which, when being executed on an electronic device, enables the electronic device to execute the image display method according to any one of claims 1 to 12.