Screen switching method and device in shooting process
By cached images and detected flip events in shooting mode, and automatically switched the camera to apply to the second screen, solving the problem of cumbersome manual screen cutting operation after flip of the external folding state electronic device, achieving the continuity of the shooting process and the improvement of user experience.
Patent Information
- Application Number
- CN202411158223.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-18
AI Technical Summary
During the shooting process, after the electronic device in the folded state is flipped, the user needs to manually switch the screen, which leads to cumbersome operation and is unable to continue shooting in time.
When the shooting mode is self-portrait or dual-view, the multi-frame image captured by the first camera is cached, and after a flip event is detected, the image is read from the cache to determine whether it contains a face that meets the preset conditions. If it is satisfied, the camera is switched to run on the second screen and the image is captured using the second camera.
It realizes that the screen can be automatically switched without manual operation after the electronic device is flipped, and continues shooting, improving the user experience.
Smart Images

Figure CN119653226A_ABST
Abstract
Description
[0001] This application is a divisional application of the Chinese patent application submitted to the State Intellectual Property Office on September 11, 2023, with application number 202311172043.3 and application name "Method and device for cutting screen during shooting". Technical Field
[0002] The present application relates to the technical field of electronic equipment, and in particular to a method and device for switching screens during shooting. Background Art
[0003] With the development of technology, electronic devices with foldable screens have emerged, making the working state of the screen more diverse. For example, an electronic device can be in a folded state or in a full-screen state. The folding is divided into external folding and internal folding. After external folding, the two screens are back-to-back, while after internal folding, the two screens are face-to-face. But after internal folding, the user can no longer see the two screens. For external folding, the user can see one of the two back-to-back screens, so for electronic devices in the external folding state, there will be a unique operating behavior, that is, flipping behavior. When the user flips the electronic device, the screen facing the user's face will change, that is, the screen the user sees changes from one of the two back-to-back screens to the other.
[0004] For shooting scenes such as taking photos or recording videos on an electronic device in an outward folding state, users hope to be able to switch to another screen more quickly after the flipping behavior occurs. For example, when a user takes a selfie on the main screen, he feels that the front camera is not clear enough and wants to use the rear camera to see his face clearly, so he flips the electronic device so that the secondary screen faces the user's face. At this time, the user hopes that the shooting process can continue, but because the camera application is still running on the main screen instead of the secondary screen, the user is facing the secondary screen, but cannot perform interactive operations such as clicking the shooting controls on the secondary screen, resulting in interruption of shooting. If the user wants to switch to the secondary screen to continue shooting, he needs to manually switch according to the steps of manually switching screens (cutting screens) preset by the electronic device, and manually select which camera to use after switching the screen, which makes the operation too cumbersome. In addition, if it is a video recording, the operation time is too long and many unwanted images will be recorded in the middle, and the video recording may even be interrupted.
[0005] Therefore, how to solve the cumbersome problem of manual screen switching during shooting so that the shooting process can be better continued after the screen is flipped is a technical problem that needs to be solved urgently. Summary of the invention
[0006] The present application provides a method and device for switching screens during shooting, which can solve the problem of cumbersome manual screen switching operations during shooting, so that after the screen is flipped, the shooting process can be better continued, thereby improving the user experience.
[0007] In a first aspect, a method for switching screens during shooting is provided, the method comprising: running a camera application on a first screen of an electronic device in an outwardly folded state; when the shooting mode of the camera application is a selfie mode or a dual-view mode, caching multiple frames of images captured by a first camera according to a preset caching mechanism; when a flip event is detected, reading at least one frame of image from the multiple frames of image cached before the flip event; when at least one frame of image contains a face that meets preset conditions, switching the camera application to run on a second screen, and capturing images using the second camera.
[0008] In this scheme, the orientation of the first camera is the same as that of the first screen; the flip event is used to indicate an interactive event in which the orientation of the first screen is interchanged with the orientation of the second screen by flipping the electronic device; the second screen is a screen in an electronic device in an outward folded state that is opposite to the first screen; the orientation of the second camera is the same as that of the second screen.
[0009] In the technical solution of the present application, during the shooting process, the image is cached before flipping, and after flipping, the screen is switched according to the shooting mode and the face situation in the image cached before flipping. No manual operation is required, which is more intelligent and improves the user experience.
[0010] In combination with the first aspect, in some implementations of the first aspect, the preset cache mechanism may include: when the number of images stored in the first storage unit is less than the preset number of the first storage unit, each time a frame of image to be cached is acquired, storing the frame of image in the first storage unit; or,
[0011] When the number of images stored in the first storage unit is equal to the preset number of the first storage unit, each time a frame of image to be cached is acquired, the frame of image replaces the frame of image with the earliest timestamp in the first storage unit.
[0012] In this caching mechanism, quantitative caching and real-time updating of cached images are achieved, which can facilitate subsequent reading and reduce the required storage space while meeting the needs.
[0013] When the cache mechanism is combined with the cache step, that is, the step of "caching multiple frames of images captured by the first camera according to the preset cache mechanism when the shooting mode of the camera application is the selfie mode or the dual-view mode" may include: when the number of images stored in the first storage unit is less than the preset number, each time a frame of image is captured by the first camera, storing the captured frame of image in the first storage unit; or,
[0014] When the number of images stored in the first storage unit is equal to the preset number, each time a frame of image is captured by the first camera, the captured frame of image replaces the frame of image with the earliest timestamp in the first storage unit.
[0015] In combination with the first aspect, in some implementations of the first aspect, when the shooting mode of the camera application is the selfie mode or the dual-view mode, caching the multiple frames of images captured by the first camera according to the preset cache mechanism may include:
[0016] In the selfie mode or the dual view mode, each time a frame of image is captured by the first camera, face information in the captured frame of image is identified by using a face recognition algorithm, where the face information includes the number and size of faces in the image;
[0017] The frame image and the facial information of the frame image are cached according to a preset cache mechanism.
[0018] In this implementation, the facial information of each frame will be identified and stored together with the frame, and judgment can be made based on the facial information later. Caching these images and facial information does not depend on the triggering of the flip event, so the detection of the flip event and the cached image can be performed synchronously. When the flip event occurs, the stored data can be directly read without the need for re-identification, which shortens the response time to the flip event.
[0019] In one example, 0 is used to indicate that there is no face, and then it is cached together with images where the number of faces is greater than or equal to 1. When the number of faces is 0, it means that there is no face in the image. In another example, images without faces are not cached.
[0020] In one example, after recognizing the face information, only images containing the face are stored during caching, so that the cached images will inevitably contain the face. In this way, blurred images, images that the first camera continues to capture when a flip event occurs, and images captured by other cameras will not be cached, thereby ensuring that the cached images are all images containing the face. Then, even if only one frame of the image is read from the cached image later, it is still sufficient to give a judgment result that meets the accuracy requirements.
[0021] In combination with the first aspect, in some implementations of the first aspect, after a flipping event is detected, reading at least one frame of image from multiple frames of images buffered before the flipping event may include:
[0022] One or more frames of images with the shortest time interval between reading and flipping events from the multiple frames of images, the read one or more frames of images are at least one frame of image.
[0023] That is, when reading, the latest cached image is read, or in other words, no image is cached since the flip event occurs, so a certain amount of images are read forward from that moment as the at least one frame of image read. The closer the image is to the flip event, the more it can reflect the user's screen switching needs.
[0024] It should be understood that if only one frame of image is read, the solution of the present application can also be implemented. In order to prevent the occurrence of instability, such as screen jitter causing one or more frames of cached image to be blurred, which may lead to inaccurate subsequent judgments, so the number of frames is best. However, images that are read too early in the time interval may no longer meet user needs. Reading and making judgments not only increases the cumbersomeness of the processing process, but may also lead to misjudgments. However, when a face recognition algorithm is used to identify facial information when caching images, only images containing faces can be stored at this time, and blurred images or images collected by other cameras will not be cached, and will not be read out here, so even if only one frame of image is read, it is still sufficient for subsequent judgments.
[0025] It should also be understood that in the embodiment of the present application, since the first camera is still collecting images from the time the flip event occurs until the first camera is turned off or the shooting mode changes, and the mode also satisfies one of the two conditions, the images collected by the first camera during this period may be cached. Here, only considering the images cached before the flip event can eliminate the interference caused by these images and improve the accuracy of subsequent judgments.
[0026] In one example, among at least one frame of images read from the multiple frames of images cached before the flipping event, the timestamp of the at least one frame of images is later than the timestamps of other images except the at least one frame of images in the multiple frames of images cached before the flipping event. In this example, the timestamp is used to assist in screening the images to be read, and the images with a closer time are used for judgment to see whether there is a face, and the result is more accurate.
[0027] In combination with the first aspect, in certain implementations of the first aspect, when at least one frame of image includes a face that meets a preset condition, switching the camera application to run on the second screen and using the second camera to capture an image may include:
[0028] When it is determined that the shooting mode of the camera application before flipping is the selfie mode or the dual-view mode, determining whether at least one frame of the image contains a face that meets a preset condition, the preset condition including that the number of faces in at least one frame of the image is greater than or equal to a preset value, and / or that the face size of at least one face in at least one frame of the image is within a preset threshold range;
[0029] When it is determined that at least one frame of image contains a human face that meets the preset condition, the camera application is switched to run on the second screen, and the second camera is used to capture images.
[0030] This implementation includes two judgments: the first is the judgment on the shooting mode, and the second is the judgment on the face. This can ensure that the final screen switching trigger is more accurate and better meets user expectations.
[0031] The preset threshold range can be a fixed value setting. For example, based on the statistical interval of the size of the face and the arm span length interval (if the arm span is exceeded, it is impossible to flip, so there is no need to consider the flipping action, and it is no longer the scene described in this application), the relative proportion interval of the size of the face on the screen when taking a selfie can be calculated. For example, the size of a certain number of faces on the screen when taking selfies with the arms stretched out can be counted, that is, the size of the faces on the screen of different people in the above situation, and the average value is taken as the minimum value of the preset threshold range; the size of a certain number of faces on the screen when taking selfies as close to the screen as possible while ensuring the integrity of the face can be counted, that is, the size of the faces on the screen of different people in the above situation, and the average value is taken as the maximum value of the preset threshold range, so as to determine the preset threshold of the above face size. For another example, the preset threshold range is greater than or equal to the first size, then the face size within the preset threshold range is equivalent to the face size being greater than or equal to the first size. Although the face may not be fully displayed on the screen when the subject is very close, as long as the face can be recognized, it will not affect the judgment. In addition, when using a mobile phone, the user will not get too close to the screen in order to see the screen clearly. Therefore, there is no need for a maximum value in the preset threshold range.
[0032] In combination with the first aspect, in certain implementations of the first aspect, when at least one frame of image includes a face that meets a preset condition, switching the camera application to run on the second screen and using the second camera to capture an image may include:
[0033] When it is determined that the shooting mode of the camera application before flipping is the selfie mode, and at least one frame of the image contains a face that meets the preset conditions, the camera application is switched to run in the selfie mode on the second screen, and the second camera is used to capture images.
[0034] In this implementation, when in selfie mode, the camera used for shooting is switched from the first camera to the second camera.
[0035] In combination with the first aspect, in certain implementations of the first aspect, when at least one frame of image includes a face that meets a preset condition, switching the camera application to run on the second screen and using the second camera to capture an image may include:
[0036] When it is determined that the shooting mode of the camera application before flipping is the selfie mode or the dual-view mode, and at least one frame of the image contains a face that meets the preset conditions, the camera application is switched to run in the selfie mode on the second screen, and the second camera is used to capture images.
[0037] In this implementation, whether it is selfie mode or dual-view mode, the second camera is directly used to take selfies.
[0038] In combination with the first aspect, in certain implementations of the first aspect, when at least one frame of image includes a face that meets a preset condition, switching the camera application to run on the second screen and using the second camera to capture an image may include:
[0039] When it is determined that the shooting mode of the camera application before flipping is the dual-view mode, and the first camera is used to capture the foreground image, the second camera is used to capture the background image, and at least one frame of the image contains a face that meets the preset conditions, the camera application is switched to run in the dual-view mode on the second screen;
[0040] The second camera is used to capture the foreground image, and the first camera is used to capture the background image.
[0041] In combination with the first aspect, in some implementations of the first aspect, after detecting the flip event, the method further includes:
[0042] When it is determined that the shooting mode of the camera application before flipping is neither the selfie mode nor the dual-view mode, the camera application is switched to run in the selfie mode on the second screen, and the second camera is used to capture images.
[0043] If it is not one of these two modes, the first camera cannot capture the face, so there is no need to judge whether there is a face or not. Just skip these steps and switch the screen directly.
[0044] In combination with the first aspect, in certain implementations of the first aspect, when the camera application running on the first screen only supports the selfie mode, when at least one frame of the image contains a face that meets a preset condition, switching the camera application to run on the second screen and using the second camera to capture an image may include:
[0045] Determining whether at least one frame of image contains a face that meets a preset condition, where the preset condition includes the number of faces and / or the size of the faces;
[0046] When it is determined that at least one frame of image contains a human face that meets the preset condition, the camera application is switched to run in selfie mode on the second screen, and the second camera is used to capture images.
[0047] In this implementation, for the case where there is only selfie mode, since it is all selfies, there is no need to determine which mode it is. You can directly determine the face situation, and continue to run in selfie mode after switching the screen. In practice, this situation mainly occurs when you flip to the secondary screen and then flip back to the main screen, and the secondary screen only supports selfie mode. In the process of flipping back to the main screen, the first screen becomes the secondary screen and the second screen becomes the main screen.
[0048] After detecting a flipping event, the method further includes: when it is determined that the shooting mode of the camera application before the flipping is neither the selfie mode nor the dual-view mode, switching the camera application to run in the selfie mode on the second screen and capturing images using the second camera.
[0049] If it is not one of these two modes, the first camera cannot capture the face, so there is no need to judge whether there is a face or not. Just skip these steps and switch the screen directly.
[0050] In conjunction with the first aspect, in certain implementations of the first aspect, when the first screen is a main screen, running a camera application on the first screen of the electronic device in the external folded state may include:
[0051] In response to a user clicking operation on a launch control of a camera application on the main screen, the camera application is launched and executed on the main screen.
[0052] In this implementation, since the first screen is the main screen, the camera application is started and then run. For example, the camera application can be started by clicking the desktop icon of the camera application. It is also possible that the camera application suspended in the background is hot-started by clicking a snapshot. In other words, the startup control can be a desktop icon or a snapshot.
[0053] It should be understood that for an electronic device that can directly launch a camera application on a secondary screen, when the first screen is the secondary screen, the camera application can also be launched and run on the secondary screen in response to a user clicking on the launch control of the camera application on the secondary screen.
[0054] However, for electronic devices that cannot start the camera application on the secondary screen and can only start the camera application on the main screen, that is to say, when the electronic device starts the camera application, the camera application will start and run on the main screen by default. In this case, the first screen can also be the secondary screen, but at this time, running on the secondary screen requires the triggering of a screen switching operation. This screen switching operation may be manual screen switching or screen switching in the embodiment of the present application.
[0055] In combination with the first aspect, in certain implementations of the first aspect, when the first screen is a secondary screen and the second screen is a primary screen, the camera application is started on the primary screen and then switched to running on the secondary screen in response to a flip event that swaps the orientations of the primary and secondary screens.
[0056] In a second aspect, a device for executing a transition effect of switching screens during shooting is provided, the device comprising a unit composed of software and / or hardware for executing any one of the methods of the first aspect.
[0057] In a third aspect, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic device is enabled to implement any one of the methods of the first aspect.
[0058] In a fourth aspect, a chip is provided, comprising a processor, wherein the processor is used to read and execute a computer program stored in a memory, and when the computer program is executed by the processor, the electronic device in which the chip is located can implement any one of the methods of the first aspect.
[0059] Optionally, the chip also includes a memory, and the memory is electrically connected to the processor.
[0060] Optionally, the chip may also include a communication interface.
[0061] According to a fifth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by an electronic device, any one of the methods according to the first aspect can be implemented.
[0062] In a sixth aspect, a computer program product is provided, which includes a computer program, and when the computer program is executed by an electronic device, it can implement any one of the methods of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] Figure 1 It is a schematic diagram of the working form of a foldable electronic device applicable to the present application.
[0064] Figure 2 It is a schematic diagram of the interface after turning over the electronic device during shooting.
[0065] Figure 3 It is a schematic diagram of the result of screen switching during shooting in an embodiment of the present application.
[0066] Figure 4 It is a schematic flowchart of a method for switching screens during shooting in an embodiment of the present application.
[0067] Figure 5It is a schematic diagram of an execution process of screen switching during shooting in an embodiment of the present application.
[0068] Figure 6 It is a schematic diagram of an execution process of screen switching during shooting in an embodiment of the present application.
[0069] Figure 7 It is a schematic flowchart of a method for switching screens during shooting in an embodiment of the present application.
[0070] Figure 8 It is a schematic diagram of the process of turning over the electronic device after cutting the screen during the selfie process.
[0071] Fig. 9 It is a schematic diagram of the process of turning over the electronic device after cutting the screen during dual-view shooting.
[0072] Fig.10 It is a schematic diagram of a device for executing a transition effect of switching screens during shooting in an embodiment of the present application.
[0073] Fig.11 It is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.
[0074] Fig.12 It is a schematic diagram of the hardware structure of another electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0075] The scheme of the embodiment of the present application is introduced below with reference to the accompanying drawings.
[0076] This application is aimed at an electronic device in an outward folding state. In the scenario where a flipping action occurs during shooting, it is hoped that the screen can be automatically switched after the flipping without user interaction, solving the problem of cumbersome manual screen switching during shooting. After the screen is flipped, the shooting process can be automatically continued relatively intelligently, thereby improving the user experience. Figure 1-Figure 5 The influence of the external folding state and manual screen switching operation on the shooting process is introduced.
[0077] Figure 1 Schematic diagram of a working form of a foldable electronic device applicable to the present application. Figure 1 As shown, the screen of electronic device A is foldable, and the electronic device A can be a mobile phone or a tablet computer, etc.
[0078] Figure 1 (a) shows the full screen state. When the user presses Figure 1 If you fold in the folding direction shown in (b), you will see Figure 1It should be noted that, since the present application is mainly aimed at the outward folding state, the folding direction is only exemplified by the outward folding, but it should be understood that in practice, it can also have the inward folding function at the same time.
[0079] When the main screen and the secondary screen are completely back-to-back and facing opposite directions, that is, when the angle between the two screens is zero, an outward folding state is formed. Figure 1 The example shown in (c) is the main screen in the external folded state. Figure 1 The example shown in (d) is the secondary screen in the outward folded state.
[0080] In the outer folded state, suppose the user presses Figure 1 When the electronic device A is flipped in the flipping direction shown in (c), the orientations of the main screen and the secondary screen will be swapped. This application is aimed at how to switch the screen more intelligently after the flipping behavior occurs, so that the user's shooting process is more comfortable.
[0081] The electronic device A needs to include two screens that can face opposite directions after being folded, for example Figure 1 If it is folded inwards, although the two screens face opposite directions, the user cannot see the screen and cannot see the shooting interface, so the inward folding is not applicable to the scenario of the present application.
[0082] The shooting function may include taking photos and recording videos. The shooting modes may include selfie mode, dual-view mode and single-view mode, and may also include multiple-view modes with a number greater than 2. The dual-view mode may be a combination of foreground and background, or a combination of distant view and near view, with foreground and background being more common.
[0083] However, it should be understood that it does not mean that the dual-view mode cannot be used in the camera function, or that the video cannot be used in the selfie mode. In other words, the camera function and the camera mode are not mutually exclusive. The specific combination in actual application depends on the initial design setting of the electronic device A. However, no matter what the combination is, it will not affect the application of the embodiment of the present application.
[0084] It should also be understood that Figure 1 Although two rear cameras are shown in the figure, in reality there may be only one rear camera, or there may be three or more rear cameras. In practice, there may be multiple front cameras. For the solution of the embodiment of the present application, it is sufficient to include at least one front camera and at least one rear camera. In other words, it is sufficient that both the main screen and the secondary screen have at least one camera facing the same direction.
[0085] also, Figure 1In the example, the front camera is on the main screen, but it is also possible that the front camera does not occupy the main screen area. For example, it may be a retractable camera, which is embedded in the electronic device A when not in use, and protrudes (extends) from the main screen when in use.
[0086] The example function is just that, in practice there may be other manual screen switching situations, and as long as the problem that the shooting process is not user-friendly due to the fact that the screen can only be switched manually after flipping, the solution of the embodiment of the present application can be used to overcome it. After executing the solution of the embodiment of the present application, there is no need to manually switch the screen after flipping.
[0087] Figure 2 This is a schematic diagram of the interface after the electronic device is turned over during shooting. Figure 2 As shown, in Figure 2 In the interface shown in (a), a camera application is running on the main screen of the electronic device. The user is facing the main screen, and the user's portrait is shown in the preview window of the camera application on the main screen. The image is collected using camera #1, which can be called the front camera, and this is the photo function. In the photo function, the front camera is used to collect the user's portrait, and there is only one preview window showing the user's portrait, which is the so-called selfie mode. In the selfie mode, the electronic device will inevitably be close to the user, and the user will subsequently flip the electronic device, so the distance between the electronic device and the user's face must be within the user's arm span. In other words, the distance between the electronic device and the user's face will not exceed the distance between the electronic device and the user's face when the user holds the electronic device with his arms straight. The user can click Figure 2 The shooting touch control shown in (a) is used to trigger the photo. Assuming that the user flips the electronic device at this time, the secondary screen will face the user, as shown in FIG. Figure 2 As shown in (b), after the flip is completed, the secondary screen is still off.
[0088] In the traditional solution, it is necessary to unlock the screen by touching it, or wake up the screen based on the automatic wake-up function of the electronic device, and then provide the user with prompts about related operations of screen switching, so that the user can perform a series of manually selected operations according to these prompts to complete the screen switching.
[0089] The embodiment of the present application aims to solve the problem that the above-mentioned manual operation is cumbersome and causes the shooting interruption time to be too long. By executing various steps, automatic screen switching can be achieved after the flipping action.
[0090] Figure 3 1 is a schematic diagram of the result of switching screens during shooting in an embodiment of the present application. Figure 3 (a) and Figure 3In the selfie mode shown in (b), when the user takes a photo in the selfie mode facing the main screen, after turning the electronic device over, the user can directly see the photo without any manual operation. Figure 3 The interface shown in (b) is displayed. Figure 3 The image in the preview window in (a) is from camera #1, but Figure 3 The image in the preview window in (b) is from camera #2 or camera #3. When there is only camera #2 or camera #3 on the left side of the secondary screen, Figure 3 The image in the preview window in (b) comes from the existing camera. When camera #2 is the near-view camera and camera #3 is the far-view camera, Figure 3 The image in the preview window in (b) comes from camera #2.
[0091] like Figure 3 (c) and Figure 3 In the dual view mode shown in (d), when the user takes a photo in the dual view mode facing the main screen, the image in preview window #1 comes from camera #2, and the image in preview window #2 comes from camera #1. When the electronic device is turned over, the user does not need to perform any manual operation to directly see the image. Figure 3 The interface shown in (d) is shown in the figure. Figure 3 The image in preview window #3 in (d) comes from camera #1. Figure 3 The image in preview window #4 in (d) comes from camera #2 or camera #3. When there is only camera #2 or camera #3 on the left side of the secondary screen, Figure 3 The image in preview window #4 in (d) comes from the existing camera. When camera #2 is the near-view camera and camera #3 is the far-view camera, Figure 3 The image in preview window #4 in (d) comes from camera #2.
[0092] Figure 3 The medium dual-screen mode is illustrated using the multi-view recording function as an example. The user can trigger the recording by clicking the touch control to start recording. The user can also click the touch control to swap the preview windows to swap the positions of preview window #1 and preview window #2, or swap the positions of preview window #3 and preview window #4.
[0093] Figure 4 is a schematic flow chart of a method for switching screens during shooting in an embodiment of the present application. Figure 4 Each step is introduced.
[0094] S401: Run a camera application on a first screen of the electronic device in an outwardly folded state.
[0095] The first screen can be a main screen or a secondary screen. The first screen can be, for example, Figure 1 The main screen or sub-screen in Figure 3 However, it should be understood that due to Figure 3 Only the example of the main screen flipping to the secondary screen is shown, but the example of the secondary screen flipping to the secondary screen is not shown. However, in practice, the solution of the present application is also applicable to the case where the secondary screen flips to the main screen.
[0096] The first screen can be considered as the screen facing the user before being flipped, and the user looks at the first screen while using the electronic device.
[0097] For the introduction of other related contents such as external folding state, please refer to Figure 1 , no more details.
[0098] In one implementation, when the first screen is the main screen, step S401 may include: in response to a user clicking operation on a start control of the camera application on the main screen, starting and running the camera application on the main screen.
[0099] In this implementation, since the first screen is the main screen, the camera application is started and then run. For example, the camera application can be started by clicking the desktop icon of the camera application. It is also possible that the camera application suspended in the background is hot-started by clicking a snapshot. In other words, the startup control can be a desktop icon or a snapshot.
[0100] It should be understood that for an electronic device that can directly launch a camera application on a secondary screen, when the first screen is the secondary screen, the camera application can also be launched and run on the secondary screen in response to a user clicking on the launch control of the camera application on the secondary screen.
[0101] However, for electronic devices that cannot start the camera application on the secondary screen and can only start the camera application on the main screen, that is, when the electronic device starts the camera application, the camera application will be started and run on the main screen by default. In this case, the first screen can also be the secondary screen, but at this time, running on the secondary screen will only occur after the screen switching operation is triggered. This screen switching operation may be manual screen switching or screen switching in the embodiment of the present application. The following example is given.
[0102] Case 1: Before executing the solution of this application, the camera application is already running on the main screen, then step S401 will include: in response to the user's manual screen switching operation, switching the camera application running on the main screen to run on the secondary screen, where the secondary screen is the first screen.
[0103] Case 2: Before executing the solution of this application, the camera application is not started, then the process before step S401 will include: in response to the user's startup operation, starting the camera application on the main screen; then, in response to the user's manual screen switching operation, switching the camera application running on the main screen to run on the secondary screen, where the secondary screen is the first screen.
[0104] Case three: This is the second round of executing the present application solution, that is, steps S401-S402 have been executed for a round before, and the main screen to secondary screen switching has been completed, so that the camera application is already running on the secondary screen. Then it is equivalent to executing each step of the present application solution first, completing the operation of switching the main screen to the secondary screen. In this process, the first screen is the main screen and the second screen is the secondary screen; thereafter, the second round begins, which is the execution of step S401 again. At this time, the first screen becomes the secondary screen. After executing the subsequent steps, the operation of switching from the secondary screen back to the main screen will be completed. The only difference from the first round is that in the execution of the second round, the first screen is the secondary screen and the second screen is the main screen.
[0105] In one implementation, when the first screen is the secondary screen and the second screen is the primary screen, the camera application is started on the primary screen and then switched to run on the secondary screen in response to a flip event that swaps the orientations of the primary and secondary screens.
[0106] This implementation method is that the first screen is the secondary screen after the main screen (as the first screen) is switched to the secondary screen (as the second screen) after a flip. That is, this is a step performed after the main screen has been switched to the secondary screen in the previous round and the secondary screen is to be switched back to the main screen in the current round. In the current round, the first screen has become the secondary screen.
[0107] S402: When the shooting mode of the camera application is the selfie mode or the dual-view mode, cache multiple frames of images captured by the first camera according to a preset cache mechanism, and the orientation of the first camera is the same as the orientation of the first screen.
[0108] When the screen is the main screen, the first camera may be, for example, the camera #1 described above. Other situations will not be listed one by one.
[0109] In the embodiment of the present application, the cached image is used to determine whether there is a face in the cached image before flipping, so as to determine whether it is necessary to continue to take close-up shots of the face, including selfies and close-up shots in dual views.
[0110] It should be understood that the number of cached multi-frame images can be set to a fixed amount, which is enough. However, this makes the cache customized. When other businesses need it, they cannot obtain the required number of images from it, which means that the cache cannot be used for other businesses. Another way is to set the size of a cache space, and cache until the cache space is full when storing. This can take into account the needs of other businesses, but this method also has the disadvantage of an uncertain number, so when reading it later, it is necessary to read it from it in a filtered manner.
[0111] In one example, a preset number of images collected by the first camera are stored in the first storage unit, and the first storage unit can be regarded as a specific storage space opened up for caching images. In this example, it is also mentioned that the number of cached images is set. When the preset number of caches is set, it can be understood as caching a certain amount of images for backup. Quantitative caching can minimize the occupied space while ensuring that the needs are met, and it is convenient for subsequent reading. When quantitative caching is used, all can be read directly without filtering during subsequent reading.
[0112] In one example, the preset number of the first storage unit is 100 frames. However, it should be understood that the number can be determined as needed during actual use. Too few numbers are not conducive to accurate judgment, and too many numbers may also make it seem that earlier images may not reflect the actual needs, resulting in low accuracy. Therefore, the determination of the number can be determined based on historical statistical data. Or set the cache quantity to a corresponding duration. For example, assuming that 30 frames can be collected in 1 second, the preset number can be determined according to the number of frames corresponding to the duration in 3 seconds.
[0113] In this example, it is equivalent to caching only 100 frames when caching. If you want to read 100 frames when reading after the flip event occurs, you don’t need to consider the time issue, you can just read all of them.
[0114] Images are stored only in the selfie mode and dual-view mode when there is a need to take close-up photos of faces. In other modes, images are not stored, and only the images captured by the first camera are stored. This can meet the storage requirements without taking up too much memory. From the subsequent steps, it can be seen that the images are stored to see if there are any faces that meet the requirements. For other modes, it is impossible to capture close-up faces, and there is no need to store face images. For example Figure 3 The image in preview window #1 shown in (c) is taken with the rear camera, so there is no need to cache the image.
[0115] In one implementation, the preset cache mechanism may include: when the number of images stored in the first storage unit is less than the preset number of the first storage unit, each time a frame of image to be cached is acquired, storing the frame of image in the first storage unit; or,
[0116] When the number of images stored in the first storage unit is equal to the preset number of the first storage unit, each time a frame of image to be cached is acquired, the frame of image replaces the frame of image with the earliest timestamp in the first storage unit.
[0117] In this caching mechanism, quantitative caching and real-time updating of cached images are achieved, which can facilitate subsequent reading and reduce the required storage space while meeting the needs.
[0118] When the cache mechanism is combined with step S402, that is, step S402 may include: when the number of images stored in the first storage unit is less than a preset number, each time a frame of image is captured by the first camera, the captured frame of image is stored in the first storage unit; or,
[0119] When the number of images stored in the first storage unit is equal to the preset number, each time a frame of image is captured by the first camera, the captured frame of image replaces the frame of image with the earliest timestamp in the first storage unit.
[0120] In this implementation, when there are fewer images to store, they will continue to be stored, and when there are enough images to store, they can be replaced starting from the earliest image, so that the first storage unit will always contain a certain number of the most recent images. This can not only meet subsequent needs, but also reduce the storage space occupied.
[0121] In one implementation, step S402 may include:
[0122] In the selfie mode or the dual view mode, each time a frame of image is captured by the first camera, face information in the captured frame of image is identified by using a face recognition algorithm, where the face information includes the number and size of faces in the image;
[0123] The frame image and the facial information of the frame image are cached according to a preset cache mechanism.
[0124] In this implementation, the facial information of each frame will be identified and stored together with the frame, and judgment can be made based on the facial information later. Caching these images and facial information does not depend on the triggering of the flip event, so the detection of the flip event and the cached image can be performed synchronously. When the flip event occurs, the stored data can be directly read without the need for re-identification, which shortens the response time to the flip event.
[0125] In one example, 0 is used to indicate that there is no face, and then it is cached together with images where the number of faces is greater than or equal to 1. When the number of faces is 0, it means that there is no face in the image. In another example, images without faces are not cached.
[0126] In one example, after recognizing the face information, only images containing the face are stored during caching, so that the cached images will inevitably contain the face. In this way, blurred images, images that the first camera continues to capture when a flip event occurs, and images captured by other cameras will not be cached, thereby ensuring that the cached images are all images containing the face. Then, even if only one frame of the image is read from the cached image later, it is still sufficient to give a judgment result that meets the accuracy requirements.
[0127] S403: When a flipping event is detected, at least one frame of image is read from the multiple frames of image buffered before the flipping event.
[0128] The flip event is used to represent an interactive event in which the orientation of a first screen is swapped with the orientation of a second screen by flipping the electronic device, where the second screen is a screen in an externally folded state of the electronic device that faces oppositely to the first screen.
[0129] It should be understood that when the preset number of quantitative buffers is used, the number of at least one frame of image read must be less than or equal to the preset number.
[0130] The image is read only after the flip event occurs, which can reduce unnecessary reading. When reading, the image cached before the flip event is read.
[0131] In one implementation, step S403 may include: reading one or more frames of images with the shortest time interval between the flip event and the multiple frames of images, and the one or more frames of images read are at least one frame of image. That is, when reading, the latest cached image is read, or in other words, no image is cached since the moment when the flip event occurs, then a certain amount of images are read forward from that moment as the starting point as the at least one frame of image read above. The closer the image is to the time when the flip event occurs, the more it can reflect the user's screen switching needs.
[0132] It should be understood that if only one frame of image is read, the solution of the present application can also be implemented. In order to prevent the occurrence of instability, such as screen jitter causing one or more frames of cached image to be blurred, which may lead to inaccurate subsequent judgments, so the number of frames is best. However, images that are read too early in the time interval may no longer meet user needs. Reading and making judgments not only increases the cumbersomeness of the processing process, but may also lead to misjudgments. However, when a face recognition algorithm is used to identify facial information when caching images, only images containing faces can be stored at this time, and blurred images or images collected by other cameras will not be cached, and will not be read out here, so even if only one frame of image is read, it is still sufficient for subsequent judgments.
[0133] It should also be understood that in the embodiment of the present application, since the first camera is still collecting images from the time the flip event occurs until the first camera is turned off or the shooting mode changes, and the mode also satisfies one of the two conditions, the images collected by the first camera during this period may be cached. Here, only considering the images cached before the flip event can eliminate the interference caused by these images and improve the accuracy of subsequent judgments.
[0134] In one example, among at least one frame of images read from the multiple frames of images cached before the flipping event, the timestamp of the at least one frame of images is later than the timestamps of other images except the at least one frame of images in the multiple frames of images cached before the flipping event. In this example, the timestamp is used to assist in screening the images to be read, and the images with a closer time are used for judgment to see whether there is a face, and the result is more accurate.
[0135] In one example, the number of frames of at least one frame of image to be read can also be set, for example, 100 frames, 80 frames, etc. When reading, the 100 frames or 80 frames closest to the flipping event before the flipping event occurs are read from the multiple frames of images in the buffer. In other words, a quantitative frame image before the flipping event is read.
[0136] S404: When at least one frame of image contains a face that meets a preset condition, switch the camera application to run on the second screen, and use the second camera to capture images, with the second camera facing the same direction as the second screen.
[0137] In other words, the screen switching is triggered according to the included faces, and manual operation is no longer required.
[0138] In one implementation, step S404 may include: when it is determined that the shooting mode of the camera application before flipping is the selfie mode or the dual-view mode, determining whether at least one frame of the image contains a face that meets a preset condition, the preset condition including that the number of faces in at least one frame of the image is greater than or equal to a preset value, and / or that the face size of at least one face in at least one frame of the image is within a preset threshold range;
[0139] When it is determined that at least one frame of image contains a human face that meets the preset condition, the camera application is switched to run on the second screen, and the second camera is used to capture images.
[0140] This implementation includes two judgments: the first is the judgment on the shooting mode, and the second is the judgment on the face. This can ensure that the final screen switching trigger is more accurate and better meets user expectations.
[0141] The preset threshold range can be a fixed value setting. For example, based on the statistical interval of the size of the face and the arm span length interval (if the arm span is exceeded, it is impossible to flip, so there is no need to consider the flipping action, and it is no longer the scene described in this application), the relative proportion interval of the size of the face on the screen when taking a selfie can be calculated. For example, the size of a certain number of faces on the screen when taking selfies with the arms stretched out can be counted, that is, the size of the faces on the screen of different people in the above situation, and the average value is taken as the minimum value of the preset threshold range; the size of a certain number of faces on the screen when taking selfies as close to the screen as possible while ensuring the integrity of the face can be counted, that is, the size of the faces on the screen of different people in the above situation, and the average value is taken as the maximum value of the preset threshold range, so as to determine the preset threshold of the above face size. For another example, the preset threshold range is greater than or equal to the first size, then the face size within the preset threshold range is equivalent to the face size being greater than or equal to the first size. Although the face may not be fully displayed on the screen when the subject is very close, as long as the face can be recognized, it will not affect the judgment. In addition, when using a mobile phone, the user will not get too close to the screen in order to see the screen clearly. Therefore, there is no need for a maximum value in the preset threshold range.
[0142] In one implementation, step S404 may include: when it is determined that the shooting mode of the camera application before flipping is the selfie mode, and at least one frame of the image contains a face that meets a preset condition, switching the camera application to run in the selfie mode on the second screen, and using the second camera to capture images.
[0143] In this implementation, when the selfie mode is on, the camera used for shooting is switched from the first camera to the second camera. Figure 3 For example, before flipping, you take a selfie with camera #1, and after flipping, you take a selfie with camera #2.
[0144] In one implementation, step S404 may include: when it is determined that the shooting mode of the camera application before flipping is the selfie mode or the dual-view mode, and at least one frame of the image contains a face that meets a preset condition, switching the camera application to run in the selfie mode on the second screen, and using the second camera to capture images.
[0145] In this implementation, whether it is selfie mode or dual-view mode, the second camera is directly used to take selfies.
[0146] In one implementation, step S404 may include: when it is determined that the shooting mode of the camera application before flipping is the dual-view mode, and the first camera is used to capture the foreground image, the second camera is used to capture the background image, and at least one frame of the image contains a face that meets a preset condition, switching the camera application to run in the dual-view mode on the second screen;
[0147] The second camera is used to capture the foreground image, and the first camera is used to capture the background image.
[0148] In this implementation, the foreground camera and the background camera swap their shooting objects. The camera that shot the foreground before flipping is used to shoot the background after flipping, and the camera that shot the background before flipping is used to shoot the foreground after flipping. In other words, the camera used for selfies becomes used to shoot distant scenes, and the camera used to shoot distant scenes is used for selfies. Figure 3 For example, before flipping, camera #1 (the first camera) is shooting the foreground, and camera #2 (the second camera) is shooting the background; after flipping, camera #2 is shooting the foreground, and camera #1 is shooting the background.
[0149] In one implementation, step S404 may include: when it is determined that the shooting mode of the camera application before flipping is the dual-view mode, and the first camera is used to capture the foreground image, the second camera is used to capture the background image, and at least one frame of the image contains a face that meets a preset condition, switching the camera application to run in the dual-view mode on the second screen;
[0150] The second camera is used to capture a near-view image, and the third camera is used to capture a far-view image, wherein the third camera and the second screen face the same direction; or,
[0151] The second camera is used to capture a distant image, and the third camera is used to capture a near-field image.
[0152] In this implementation, the dual view of the distant view and the near view is considered, that is, the first camera is turned off and only the second and third cameras are used. This situation is relatively rare because the distant view may be affected by the near view.
[0153] When the camera application running on the first screen only supports the selfie mode, step S404 may include:
[0154] Determining whether at least one frame of image contains a face that meets a preset condition, where the preset condition includes the number of faces and / or the size of the faces;
[0155] When it is determined that at least one frame of image contains a human face that meets the preset condition, the camera application is switched to run in selfie mode on the second screen, and the second camera is used to capture images.
[0156] In this implementation, for the case where there is only selfie mode, since it is all selfies, there is no need to determine which mode it is. You can directly determine the face situation, and continue to run in selfie mode after switching the screen. In practice, this situation mainly occurs when you flip to the secondary screen and then flip back to the main screen, and the secondary screen only supports selfie mode. In the process of flipping back to the main screen, the first screen becomes the secondary screen and the second screen becomes the main screen.
[0157] After detecting a flipping event, the method further includes: when it is determined that the shooting mode of the camera application before the flipping is neither the selfie mode nor the dual-view mode, switching the camera application to run in the selfie mode on the second screen and capturing images using the second camera.
[0158] If it is not one of these two modes, the first camera cannot capture the face, so there is no need to judge whether there is a face or not. Just skip these steps and switch the screen directly.
[0159] Figure 4 The method shown, during the shooting process, mainly caches the image before flipping, and switches the screen after flipping according to the shooting mode and the face situation in the image cached before flipping. It does not require manual operation, is more intelligent, and improves the user experience.
[0160] Figure 5 It is a schematic diagram of an execution process of screen switching during shooting in an embodiment of the present application. Figure 5 It can be seen as introducing the solution of the embodiment of the present application from the internal execution process, that is, it can be seen as Figure 4 The method shown is an example of an internal implementation process. Figure 5As shown, the camera software package (APK) includes a face recognition algorithm module, a fusion decision module, a flip perception control module and a flip perception monitoring module. Among them, the face recognition algorithm module is used to call the face recognition algorithm to identify whether there is a face in the image, and can also be used to identify the number of faces and / or the size of faces in the image. The fusion decision module is used to determine whether the screen needs to be cut based on at least one of the face recognition results, flip events and shooting modes. The flip perception monitoring module is used to monitor whether a flip event occurs. The flip perception control module is used to control the various flip perception-related modules to work, so as to detect and report flip events to the flip perception monitoring module.
[0161] The camera's hardware abstraction layer (HAL) / HAL interface definition language (HIDL) includes the flip perception framework (ISF HAL), flip algorithm module, motion HAL and motion HIDL, which are used to perceive and report flip events to the perception monitoring module, and to start or shut down functions under the instructions of the flip perception control module. The ISF HAL is used to call the flip algorithm to determine whether a flip event occurs.
[0162] SensorHub is another processor that controls related sensors. The acceleration and gyroscope sensors (A+G) sense the flipping action and report it through the fusion sensor.
[0163] It should be understood that Figure 5 Only some modules that are more relevant to the solution of the present application are shown. In practice, other modules may also be included for switching screens during shooting.
[0164] Figure 6 It is a schematic diagram of an execution process of screen switching during shooting in an embodiment of the present application. Figure 6 It can be seen as introducing the execution process of the solution of the embodiment of the present application from the perspective of the internal program execution process of the electronic device, that is, it can be seen as an introduction to the execution process of the solution of the embodiment of the present application from the perspective of the internal program execution process of the electronic device. Figure 4 An example of the internal program execution flow of the method shown during execution.
[0165] S601. The camera software (ie, camera APK) registers a flip-aware virtual sensor with motion HIDL.
[0166] S602, motion HIDL enables the flip algorithm to ISF HAL.
[0167] S603: ISF HAL sends a flip enable request to a fusion sensor.
[0168] S604, the fusion sensor turns on the A+G sensor.
[0169] S605: ISF HAL detects that a flipping action occurs.
[0170] S606. ISF HAL reports the flip event to motion HIDL.
[0171] S607, motion HIDL reports the flip event to the camera software.
[0172] S608: The camera software determines whether screen switching is required according to the fusion strategy.
[0173] When the camera application is running on the main screen, the fusion strategy includes flip determination, face determination, and shooting mode determination.
[0174] Flip determination is to determine whether a flip event occurs, face determination is to determine whether a certain amount of images cached before flipping contain faces that meet preset conditions, and shooting mode determination is to determine whether the shooting mode is selfie mode, dual-view mode, or neither.
[0175] When it is determined according to the fusion strategy that a flip event has occurred, there are faces that meet the preset conditions (both the quantity and the size are met), and it is a selfie mode or a dual-view mode, step S609 can be executed.
[0176] S609: The camera software notifies the window management system (WMS) to switch the running interface of the camera software from the main screen to the sub-screen.
[0177] S610: ISF HAL detects a flipping action.
[0178] S611. ISF HAL reports the flip event to motion HIDL.
[0179] It should be understood that Figure 6 The example shown is an example of the entire process of flipping from the main screen to the secondary screen and then flipping from the secondary screen back to the main screen, so the flip event at step S610 occurs when the camera application is running on the secondary screen, specifically when it is running on the secondary screen in selfie mode.
[0180] S612, motion HIDL reports the flip event to the camera software.
[0181] S613: The camera software determines whether screen switching is required according to the fusion strategy.
[0182] Since the camera application is running on the secondary screen at this time, the fusion strategy includes flip determination and face determination. Figure 6 In the example shown, the secondary screen only supports the selfie mode, so there is no need to add the shooting mode determination.
[0183] Flip determination is to determine whether a flip event occurs, and face determination is to determine whether a certain amount of images cached before flipping contain a face that meets a preset condition.
[0184] When it is determined according to the fusion strategy that a flip event has occurred and there are faces that meet the preset conditions (both the quantity and the size are met), step S613 can be executed.
[0185] S614. The camera software WMS switches the running interface of the camera software from the secondary screen to the primary screen.
[0186] S615: The camera software detects a request to exit the camera.
[0187] S616. The camera software deregisters the flip perception virtual sensor to the motion HIDL.
[0188] S617, motion HIDL notifies ISF HAL to remove the enable flip algorithm.
[0189] S618. The ISF HAL sends a request to remove the flip enable to the fusion sensor.
[0190] S619, the fusion sensor turns off the A+G sensor.
[0191] Figure 7 is a schematic flow chart of a method for switching screens during shooting in an embodiment of the present application. Figure 7 Each step is introduced. Figure 7 It can be seen as Figure 4 An example of the method shown, and in this example includes the process of flipping the main screen to the secondary screen and then flipping back to the main screen.
[0192] S701: Run a camera application on the main screen of the electronic device in the outward folded state to display a camera interface.
[0193] At this time, the main screen is the first screen in the above step S401, that is, S701 is an example of step S401.
[0194] S702, determining whether the current shooting mode is the selfie mode or the dual-view mode, when the determination result is yes, executing step S703, when the determination result is no, executing step S704.
[0195] S703: Cache facial information.
[0196] What is cached here is the face information in the image captured by the camera on the main screen (hereinafter referred to as the front camera). The face information can be obtained using a face recognition algorithm.
[0197] S704: A flipping action is detected, which is a flipping action from the main screen to the secondary screen.
[0198] This step can be performed by the fusion sensor. The flipping action here must be from the main screen facing the face to the secondary screen facing the face, and the flipping is successful. Because the camera application is already displayed on the main screen, the flipping that occurs at this time is only the case of the main screen flipping to the secondary screen, and the case of flip failure is not considered.
[0199] S705, calling the rollover algorithm to detect whether there is a rollover event, when the judgment result is yes, executing step S706, when the judgment result is no, executing step S707.
[0200] This step can be performed by the ISF HAL calling the flip algorithm.
[0201] S706, determining whether the mode before flipping is the selfie mode or the dual-view mode, when the determination result is yes, executing step S708, when the determination result is no, executing step S711.
[0202] Judging again after flipping is equivalent to one more check, which makes the final screen switching more accurate and avoids unnecessary screen switching.
[0203] S707, maintaining the main screen shooting state without switching screens.
[0204] That is to say, keep shooting on the main screen and the shooting mode remains in the original mode.
[0205] S708. Determine whether there is a face that meets the conditions. If the determination result is yes, execute step S709; if the determination result is no, execute step S710.
[0206] For example, it may be determined whether the face size meets a preset threshold range and is a face within 100 frames before flipping. When the determination result is yes, step S709 is executed; when the determination result is no, step S710 is executed.
[0207] In this judgment, it is equivalent to judging whether the at least one frame of image is a recent image, and whether the image includes a face whose size meets the preset threshold range.
[0208] Here, the first 100 frames are flipped as an example, which is equivalent to the above example of judging whether there is a face that meets the conditions.
[0209] S709, switch to the secondary screen to take selfies.
[0210] That is, for selfies or dual scenes, if there are still faces that meet the conditions, it means that the user has a high demand to continue taking pictures of himself after flipping. Here, the secondary screen only supports the selfie mode as an example. In this case, the secondary screen will inevitably run in the selfie mode after switching the screen.
[0211] S710. Maintain the main screen shooting state without switching screens.
[0212] That is to say, keep shooting on the main screen and the shooting mode remains in the original mode.
[0213] S711, switch to the secondary screen to take a selfie.
[0214] That is to say, for the case where it is neither a selfie nor a dual view, it means that the rear camera is being used to shoot, and the rear camera can continue to be used to shoot after flipping. Here, the middle and secondary screens only support the selfie mode as an example. In this case, the secondary screen will definitely run in the selfie mode after switching the screen.
[0215] It should be noted that when the switch is completed and the camera app switches to running in selfie mode on the secondary screen, a round of screen switching has ended, and the subsequent process is to flip it again.
[0216] When the camera application runs on the secondary screen, it is equivalent to the first screen in the above step S401 becoming the secondary screen.
[0217] S712: Continue to cache facial information.
[0218] This can be seen as an example in which in step S402, the first screen is the secondary screen and the first camera is the rear camera (a camera facing the same direction as the secondary screen).
[0219] Since the secondary screen only has a selfie mode, it must meet the conditions for caching facial information, so there is no need to perform a mode judgment, or even if a mode judgment is performed, the result will inevitably be "yes", so step S712 will inevitably be executed after step S711.
[0220] S713: A flipping action is detected, which is a flipping action of the secondary screen to the main screen.
[0221] This step can be performed by the fusion sensor. The flipping action here must be from the secondary screen facing the face to the main screen facing the face, and the flipping is successful. Because it is executed after step S712, the camera application is already displayed on the secondary screen, so the flip that occurs at this time is only the case where the secondary screen flips to the main screen, and the case of flip failure is not considered.
[0222] S714, calling the rollover algorithm to detect whether there is a rollover event, when the judgment result is yes, executing step S715, when the judgment result is no, executing step S716.
[0223] This step can be performed by the ISF HAL calling the flip algorithm.
[0224] S715. Maintain the secondary screen selfie mode without switching screens.
[0225] That is to say, keep shooting on the secondary screen, and the shooting mode is selfie mode.
[0226] S716: Determine whether there is a face that meets the conditions. If yes, execute step S717; if no, execute step S718.
[0227] For example, it can be determined whether the face size meets a preset threshold range and is a face within 100 frames before flipping. When the judgment result is yes, step S717 is executed, and when the judgment result is no, step S718 is executed.
[0228] In this judgment, it is equivalent to judging whether the at least one frame of image is a recent image, and whether the image includes a face whose size meets the preset threshold range.
[0229] Here, the first 100 frames are flipped as an example, which is equivalent to the above example of judging whether there is a face that meets the conditions.
[0230] S717. Switch to the main screen to take a selfie.
[0231] That is, switch to the main screen and continue to run the camera application in selfie mode on the main screen.
[0232] S718. Maintain the secondary screen selfie mode without switching screens.
[0233] That is to say, keep shooting on the secondary screen, and the shooting mode is selfie mode.
[0234] exist Figure 7In the method shown, after the user opens the camera application on the main screen, the flip perception control module in the camera APK turns on the flip perception algorithm, and the flip perception monitoring module monitors the flip event. When the user selects the front selfie mode or the dual view mode on the main screen interface, and the dual view includes taking a selfie with the front camera, the face algorithm continues to cache the face information. When the user flips the main screen to the secondary screen, the flip perception algorithm detects the flip event, and the flip perception monitoring module in the camera notifies the camera APK. The fusion decision module in the camera APK makes a decision based on whether the main screen camera is in the front selfie / dual view state before flipping. If it is the main screen front selfie / dual view, after detecting the flip event, it is also necessary to determine whether the cached face information meets the threshold conditions of the number and area (face size) of faces. If the main screen is not a front selfie / dual view, the main screen is directly controlled to switch to the secondary screen through the flip event. After switching to the secondary screen, in the selfie interface of the secondary screen, the face algorithm calculates the size of the face and continuously refreshes and caches the face information that meets the threshold definition into the preset face information cache, such as a predefined cache of 100 frames of face information. When the user flips back to the main screen from the secondary screen selfie, the flip perception monitoring module first monitors the flip event, then determines whether there is face information in the face information cache, and the fusion decision module makes the final decision based on the flip + face. If the decision is passed, the secondary screen super selfie is switched to the main screen for taking pictures.
[0235] from Figure 7 It can be seen from the method shown that when the functions of the secondary screen are different from those of the main screen, adjustments can be made in the fusion decision. If the secondary screen only has the selfie mode, there is no need to make another shooting mode judgment after flipping. In addition, since the secondary screen only has the selfie mode, after the main screen is flipped to the secondary screen, the camera that collects images only replaces the front camera with the rear camera, and the front camera does not need to continue to collect images.
[0236] It should also be noted that this application is aimed at the question of whether the screen can be automatically switched after the flipping action occurs during shooting, but flipping after the screen has been switched is not within the scope of this application. Because the screen is switched first and then flipped, it is just to flip the screen with the interface to the user's eyes, and no response is required.
[0237] Figure 8 This is a schematic diagram of the process of turning over the electronic device after cutting the screen during Selfie. Figure 8 (a) So, the user is using the selfie mode, taking a photo with the front camera - camera #1. At this time, the user wants to switch to the secondary screen. The user clicks the settings control, and a prompt window pops up as follows Figure 8 As shown in (b) in the figure. Then the user clicks Figure 8After confirming the screen switching, the main screen in front of the user becomes the desktop background or turns off the screen directly, as shown in (b). Figure 8 As shown in (c). Figure 8 In (c), the camera on the main screen has been switched to the secondary screen, causing the main screen to go off. At this time, if the user wants to see the shooting interface, they need to flip to the secondary screen. However, it should be understood that the secondary screen is already displaying the camera interface, so there is no need to consider switching the screen after flipping. Moreover, after manually switching the screen, how long it takes before flipping depends on the user. Maybe the user does not plan to flip the screen? For example, if two users are sitting opposite each other, switching the screen may be just to let their friend take a photo for them on the secondary screen. Assuming the user flips, they will see Figure 8 The interface shown in (d) in the figure. However, it should be understood that this flipping is equivalent to turning a page of a book to see the content of the next page. There is no need to report this flipping action as a flipping event for the electronic device to respond. A more appropriate description can be called flipping. These are just two independent things. The first thing is to manually switch the screen, and the second thing is to turn the phone over.
[0238] Fig. 9 Schematic diagram of the process of turning over the electronic device after cutting the screen during dual-view shooting. Fig. 9 (a) Therefore, the user is using the dual view mode, taking a selfie with the front camera - camera #1 while taking a distant view with the rear camera. At this time, the user wants to switch to the secondary screen, so the user clicks the settings control and a prompt window pops up as follows: Fig. 9 As shown in (b) in the figure. Then the user clicks Fig. 9 After confirming the screen switching, the main screen in front of the user becomes the desktop background or turns off the screen directly, as shown in (b). Fig. 9 As shown in (c). Fig. 9 In (c), the camera on the main screen has been switched to the secondary screen, causing the main screen to go off. At this time, if the user wants to see the shooting interface, they need to flip to the secondary screen. However, it should be understood that the secondary screen is already displaying the camera interface, so there is no need to consider switching the screen after flipping. Moreover, after manually switching the screen, how long it takes before flipping depends on the user. Maybe the user does not plan to flip the screen? For example, if two users are sitting opposite each other, switching the screen may be just to let their friend take a photo for them on the secondary screen. Assuming the user flips, they will see Fig. 9 The interface shown in (d) in the figure. However, it should be understood that this flipping is equivalent to turning a page of a book to see the content of the next page. There is no need to report this flipping action as a flipping event for the electronic device to respond. A more appropriate description is to call it flipping. These are just two independent things. The first thing is to manually switch the screen, and the second thing is to turn the phone over. For example Fig. 9 The distant view shown in (d) is no longer Fig. 9 The screen shown in (a) is very different from the screen shown in (b). It is very likely that the user manually switched the screen. Fig. 9 After the interface shown in (c), it takes a long time to turn the electronic device over. During this time, the user has moved the electronic device to another place. Therefore, after turning it over, although the close-up view is still the user's selfie, the distant view is a new scene. Because under the premise of manual screen switching, manual screen switching and manual flipping of the electronic device are two independent events, which do not need to be coherent or related. The interval between the two is entirely determined by the user's subjective will.
[0239] from Figure 8 and Fig. 9 It can be seen that compared with this, the present application is still a better solution, because the present application solution no longer requires the user to manually switch the screen, and the user will not have to see a black screen (screen off) for a period of time after switching the screen, which will provide a better user experience.
[0240] The above mainly introduces the method of the embodiment of the present application in conjunction with the accompanying drawings. It should be understood that although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence, these steps are not necessarily performed in sequence in the order shown in the figure. Unless clearly stated in this article, there is no strict order restriction on the execution of these steps, and these steps can be performed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the various embodiments described above may include multiple steps or multiple stages, and these steps or stages are not necessarily performed at the same time, but can be performed at different times, and the execution order of these steps or stages is not necessarily performed in sequence, but can be performed in turn or alternately with other steps or at least a part of the steps or stages in other steps. The device of the embodiment of the present application is introduced below in conjunction with the accompanying drawings.
[0241] Fig.10 is a schematic diagram of a device for performing a transition effect of switching screens during shooting according to an embodiment of the present application. Fig.10 As shown, the device 2000 includes a processing unit 2001, a cache unit 2002 and a flip detection unit 2003. The device 2000 can be integrated in electronic devices such as mobile phones, tablet computers, touch-screen laptops, etc.
[0242] The device 2000 can be used to perform any of the above methods for switching screens during shooting. For example, the processing unit 2001 can be used to perform steps S401 and S404, the buffer unit 2002 can be used to perform step S402, and the flip detection unit 2003 can be used to perform step S403. The device 2000 can also be used to perform Figure 3 and Figure 5 The process shown and can be used to perform Figure 6 and Figure 7 The steps shown.
[0243] In one implementation, the apparatus 2000 may further include a storage unit for storing relevant data. The storage unit may be integrated in any one of the above units, or may be a unit independent of all the above units.
[0244] Fig.11 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. Fig.11 As shown, the electronic device 3000 includes: at least one processor 3001 ( Fig.11 Only one is shown in the figure) a processor, a memory 3002, and a computer program 3003 stored in the memory 3002 and executable on the at least one processor 3001, and when the processor 3001 executes the computer program 3003, the steps in any one of the above methods are implemented.
[0245] Those skilled in the art will understand that Fig.11 These are merely examples of electronic devices and do not constitute a limitation on the electronic device. In practice, the electronic device may include more or fewer components than those shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.
[0246] The processor 3001 may be a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0247] In some embodiments, the memory 3002 may be an internal storage unit of the electronic device 3000, such as a hard disk or memory of the electronic device 3000. In other embodiments, the memory 3002 may also be an external storage device of the electronic device 3000, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 3000. Optionally, the memory 3002 may also include both an internal storage unit of the electronic device 3000 and an external storage device. The memory 3002 is used to store an operating system, an application program, a boot loader, data, and other programs, such as the program code of the computer program. The memory 3002 may also be used to temporarily store data that has been output or is to be output.
[0248] Fig.12 FIG. 1 is a schematic diagram of the hardware structure of another electronic device according to an embodiment of the present application. Fig.12 As shown, 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. Among them, 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.
[0249] It is to be understood that the structure illustrated in the embodiment of the present application does 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 components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0250] For example, Fig.12The processor 110 shown may include one or more processing units, for example, the processor 110 may include an application processor (AP), a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0251] In the embodiment of the present application, the camera APK and HAL / HIDL layers are those in the AP, and the sensorHub is a processor used to manage related sensors.
[0252] In some embodiments, the MIPI interface can be used to connect the processor 110 with peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. The processor 110 and the camera 193 communicate via the CSI interface to realize the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to realize the display function of the electronic device 100.
[0253] In some embodiments, the GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. The GPIO interface can be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0254] It is understandable that the interface connection relationship between the modules illustrated in the embodiment of the present application is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0255] 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.
[0256] Display screen 194 is used to display images, videos, etc.
[0257] The electronic device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0258] 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.
[0259] 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 converts the optical signal into an electrical signal, which is then transmitted to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the digital signal processor for processing. The digital signal processor 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 1 or N cameras 193, where N is a positive integer greater than 1.
[0260] NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.
[0261] 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.
[0262] The gyroscope 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., the x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope 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 gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.
[0263] 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.
[0264] 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.
[0265] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.
[0266] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0267] An embodiment of the present application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein when the processor executes the computer program, the electronic device can implement the steps in any of the above methods.
[0268] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by an electronic device, the steps in the above-mentioned method embodiments can be implemented.
[0269] An embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by an electronic device, the steps in the above-mentioned method embodiments can be implemented.
[0270] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / electronic device, recording medium, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0271] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0272] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0273] In the embodiments provided in the present application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic, for example, the division of the modules or units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0274] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0275] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.
[0276] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0277] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.
[0278] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0279] The embodiments described above 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, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for switching screens during shooting, characterized in that: Applied to an electronic device, the electronic device includes a display screen, the display screen includes a first screen and a second screen, the first screen and the second screen are two display areas of the display screen, when the electronic device is in a folded state, the display directions of the first screen and the second screen are opposite, when the electronic device is in an unfolded state, the display directions of the first screen and the second screen are consistent, the method includes: When the electronic device is in a folded state, at a first moment, a first preview interface of a camera application is displayed on the first screen, the first preview interface including an image captured by the first camera, and the first preview interface including a face image; At a second moment, when the first screen displays the first preview interface, in response to the electronic device being turned over, a second preview interface of the camera application is displayed on the second screen, the second preview interface including an image captured by a second camera, and the second moment is later than the first moment; When the electronic device is in a folded state, at a third moment, a third preview interface of the camera application is displayed on the first screen, the third preview interface includes an image captured by the first camera, the third preview interface does not include a face image, and the third moment is later than the second moment; At a fourth moment, when the first screen displays the third preview interface, in response to the electronic device being flipped over, a fourth preview interface of the camera application is displayed on the first screen, the fourth preview interface including the image captured by the first camera, and the fourth moment is later than the third moment.
2. The method according to claim 1, characterized in that At the second moment, when the first screen displays the first preview interface, in response to the electronic device being turned over, displaying the second preview interface of the camera application on the second screen includes: In response to the electronic device being turned over, based on the first preview interface including the face image, the second preview interface is displayed on the second screen.
3. The method according to claim 1 or 2, characterized in that: When the electronic device is in the folded state, at a third moment, displaying a third preview interface of the camera application on the first screen includes: In response to the electronic device being turned over, based on the fact that the third preview interface does not include a facial image, the fourth preview interface is displayed on the first screen.
4. The method according to any one of claims 1 to 3, characterized in that The first preview interface, the second preview interface, the third preview interface and the fourth preview interface are preview interfaces in the selfie mode; the first preview interface, the third preview interface and the fourth preview interface do not include the image captured by the second camera; The second preview interface does not include the image captured by the first camera; The first camera is a front camera, and the second camera is a rear camera; or, the first camera is a rear camera, and the second camera is a front camera.
5. The method according to any one of claims 1 to 4, characterized in that The first preview interface, the second preview interface, the third preview interface and the fourth preview interface are preview interfaces in a multi-view recording mode; the first preview interface, the third preview interface and the fourth preview interface include images captured by the second camera; The second preview interface includes an image captured by the first camera; The first camera is a front camera, and the second camera is a rear camera; or, the first camera is a rear camera, and the second camera is a front camera.
6. The method according to claim 5, characterized in that In the case where the rear camera includes a distant view camera and a near view camera, the first camera is a front camera and the second camera is a near view camera; or, the first camera is a near view camera and the second camera is a front camera.
7. The method according to any one of claims 1 to 6, characterized in that The first preview interface is a preview interface in other modes, and the other modes are used to represent modes other than the selfie mode and the multi-view video mode; At the second moment, when the first screen displays the first preview interface, in response to the electronic device being turned over, displaying the second preview interface of the camera application on the second screen includes: In response to the electronic device being turned over, based on the fact that the first preview interface is a preview interface in other modes, the second preview interface is displayed on the second screen, and the second preview interface is a preview interface in the selfie mode.
8. The method according to any one of claims 1 to 7, characterized in that The method further comprises: In response to the electronic device being turned over, reading at least one frame of image from the plurality of frames of image captured by the first camera and buffered before the turning over; When it is determined that the at least one frame of image contains a face image that meets a preset condition, displaying the second preview interface on the second screen; or, When it is determined that the at least one frame of image does not include a face image that meets a preset condition, the fourth preview interface is displayed on the first screen.
9. The method according to claim 8, characterized in that The multiple frames of images are cached according to a preset cache mechanism when the shooting mode is a selfie mode or a multi-view video mode; The preset cache mechanism includes: When the number of images stored in the first storage unit is less than the preset number of the first storage unit, each time a frame of image to be cached is acquired, the frame of image is stored in the first storage unit; or, When the number of images stored in the first storage unit is equal to the preset number of the first storage unit, each time a frame of image to be cached is acquired, the frame of image replaces the frame of image with the earliest timestamp in the first storage unit.
10. The method according to claim 8 or 9, characterized in that: The at least one frame of image is one or more frames of image with the shortest time interval between flipping among the multiple frames of image.
11. The method according to any one of claims 8 to 10, characterized in that The preset condition includes that the number of face images in the at least one frame of image is greater than or equal to a preset value, and / or the face size of at least one face image in the at least one frame of image is within a preset threshold range.
12. An electronic device comprising a memory, one or more processors, and a computer program stored in the memory and executable on the one or more processors, characterized in that: When the one or more processors execute the computer program, the electronic device implements the method according to any one of claims 1 to 11.
13. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by an electronic device, the method according to any one of claims 1 to 11 is implemented.