Method and apparatus for screen switching during photographing process
By cached images and detected flip events during the shooting process, and automatically switched the camera to apply to another screen, solving the problem of cumbersome manual screen cutting operation after flip of the external folding state electronic device, achieving a seamless shooting process.
Patent Information
- Application Number
- PCT/CN2024/113674
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-11
- Filing Date
- 2024-08-21
- Publication Date
- 2025-03-20
AI Technical Summary
During the shooting process, after the electronic device in the outer folded state is flipped, the user needs to manually cut the screen to continue shooting, which leads to cumbersome operation, which may cause interruption in shooting or input unnecessary pictures.
By cached multiple frames of images during shooting, and after detecting a flip event, the camera is automatically switched to another screen according to the face situation in the cached image, and continued shooting with the corresponding camera.
It enables continued shooting without manual operation of the electronic device after flipping, which improves the user experience, reduces operation time and avoids shooting interruptions.
Smart Images

Figure CN2024113674_20032025_PF_FP_ABST
Abstract
Description
Method and device for switching screens during shooting
[0001] This application claims priority to the Chinese patent application filed with 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”, the entire contents of which are incorporated by reference into this application. 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. 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, a unique operating behavior will appear, that is, the 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 scenarios such as taking photos or recording videos on electronic devices in an outward-folding state, users hope to be able to switch to the other screen more quickly after the flipping action occurs. For example, when a user is taking a selfie on the main screen, the front camera is not clear enough, and they want to use the rear camera to see their face clearly, so they flip the electronic device so that the secondary screen is facing the user's face. At this time, the user hopes to continue the shooting process, but because the camera application is still running on the main screen instead of the secondary screen, the user is facing the secondary screen and 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, they need to manually switch according to the steps of manual screen switching (screen switching) preset by the electronic device, and manually select which camera to use after switching the screen, which makes the operation too cumbersome. Moreover, if the video is recorded, the operation takes too long and many unwanted images will be recorded in the middle, and the recording may even be interrupted.
[0005] Therefore, how to solve the problem of cumbersome manual screen switching operation 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.
[0006] Summary of the Invention
[0007] 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 the shooting process can be better continued after the screen is flipped, thereby improving the user experience.
[0008] 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.
[0009] 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 faces opposite to the first screen; the orientation of the second camera is the same as that of the second screen.
[0010] 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.
[0011] In conjunction with the first aspect, in certain 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 a 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
[0012] 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.
[0013] 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.
[0014] When the cache mechanism is incorporated into the cache step, 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
[0015] 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.
[0016] In conjunction with the first aspect, in certain implementations of the first aspect, when the shooting mode of the camera application is the selfie mode or the dual-view mode, caching multiple frames of images captured by the first camera according to a preset caching mechanism may include:
[0017] In selfie mode or dual-view mode, each time a frame of image is captured by the first camera, facial recognition algorithm is used to identify facial information in the captured frame of image, where the facial information includes the number and size of faces in the image;
[0018] The frame image and the facial information of the frame image are cached according to a preset cache mechanism.
[0019] In this implementation, facial information is identified and stored for each frame, allowing for subsequent judgments based on facial information. Caching these images and facial information does not rely on triggering a flip event, so flip event detection and image caching can be performed simultaneously. When a flip event occurs, the stored data can be directly read without the need for re-recognition, shortening the response time to the flip event.
[0020] In one example, 0 is used to indicate no face, and then it is cached together with images with a face count greater than or equal to 1. When the face count is 0, it means that there is no face in the image. In another example, images without faces are not cached.
[0021] In one example, after facial recognition, only images containing faces are cached, ensuring that the cached images always contain faces. This prevents blurred images, images captured by the first camera during a flip event, and images captured by other cameras from being cached, ensuring that the cached images always contain faces. Consequently, even if only a single frame is subsequently read from the cached images, a judgment result that meets accuracy requirements is still sufficient.
[0022] In conjunction with the first aspect, in certain implementations of the first aspect, after a flip event is detected, reading at least one frame of image from multiple frames of image buffered before the flip event may include:
[0023] 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 being at least one frame of image.
[0024] In other words, the latest cached image is used during the read operation. In other words, no images have been cached since the flip event occurred. Therefore, a certain number of images from that moment forward are read as the at least one frame. Images captured closer to the flip event are more likely to reflect the user's screen switching needs.
[0025] 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 shaking causing a frame or multiple frames of cached images to be blurred, which may lead to inaccurate subsequent judgments, it is best to have multiple frames. However, images read too early in the time interval may no longer meet user needs. Reading and making judgments not only increases the complexity 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. Blurred images or images collected by other cameras will not be cached, and will not be read out here. Therefore, even if only one frame of image is read, it is still sufficient for subsequent judgments.
[0026] 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 this part of the images and improve the accuracy of subsequent judgments.
[0027] In one example, at least one frame read from the multiple frames buffered before the flip event has a timestamp that is later than the timestamps of all other frames in the multiple frames buffered before the flip event. In this example, using timestamps to filter the images to be read, selecting the more recent images for face detection, yields more accurate results.
[0028] In conjunction with the first aspect, in certain implementations of the first aspect, when at least one image frame includes a face that meets a preset condition, switching the camera application to run on the second screen and capturing an image using the second camera may include:
[0029] 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 image contains a face that meets a preset condition, the preset condition including that the number of faces in the at least one frame of image is greater than or equal to a preset value, and / or that the face size of at least one face in the at least one frame of image is within a preset threshold range;
[0030] When it is determined that at least one frame of image contains a face that meets the preset conditions, the camera application is switched to run on the second screen, and the second camera is used to capture images.
[0031] This implementation includes two judgments: the first is the judgment of the shooting mode, and the second is the judgment of the face. This can ensure that the final screen switching trigger is more accurate and better meets user expectations.
[0032] 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 no longer possible to flip, so there is no need to consider the flipping action, and it is no longer the scenario 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 face size of different people on the screen in the above-mentioned 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 face size of different people on the screen in the above-mentioned situation, and the average value is taken as the maximum value of the preset threshold range, thereby determining the preset threshold of the above-mentioned face size. For another example, if 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 still be recognized, it will not affect the judgment. Moreover, when using a mobile phone, the user will not get too close to the screen in order to see the screen clearly. Therefore, the preset threshold range does not need to have a maximum value.
[0033] In conjunction with the first aspect, in certain implementations of the first aspect, when at least one image frame includes a face that meets a preset condition, switching the camera application to run on the second screen and capturing an image using the second camera may include:
[0034] When it is determined that the shooting mode of the camera application before flipping is the selfie mode, and at least one frame of 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.
[0035] In this implementation, when in selfie mode, the camera used for shooting is switched from the first camera to the second camera.
[0036] In conjunction with the first aspect, in certain implementations of the first aspect, when at least one image frame includes a face that meets a preset condition, switching the camera application to run on the second screen and capturing an image using the second camera may include:
[0037] When it is determined that the shooting mode of the camera application before flipping is selfie mode or dual-view mode, and at least one frame of image contains a face that meets the preset conditions, the camera application is switched to run in selfie mode on the second screen, and the second camera is used to capture images.
[0038] In this implementation, whether in selfie mode or dual-view mode, you can directly use the second camera to take selfies.
[0039] In conjunction with the first aspect, in certain implementations of the first aspect, when at least one image frame includes a face that meets a preset condition, switching the camera application to run on the second screen and capturing an image using the second camera may include:
[0040] 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;
[0041] The second camera is used to capture a foreground image, and the first camera is used to capture a background image.
[0042] In conjunction with the first aspect, in certain implementations of the first aspect, after detecting the flip event, the method further includes:
[0043] 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.
[0044] 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.
[0045] In conjunction with the first aspect, in certain implementations of the first aspect, when a camera application running on a first screen only supports a selfie mode, when at least one frame of an image contains a face that meets a preset condition, switching the camera application to run on a second screen and capturing an image using a second camera may include:
[0046] Determining whether at least one frame of image contains a face that meets preset conditions, where the preset conditions include the number of faces and / or the size of the faces;
[0047] When it is determined that at least one frame of image contains a human face that meets the preset conditions, the camera application is switched to run in selfie mode on the second screen, and the second camera is used to capture images.
[0048] In this implementation, when the only mode is selfie mode, there's no need to determine which mode is active. Simply determine the face and continue in selfie mode after switching screens. In practice, this situation typically occurs when the user flips to the secondary screen and then flips back to the main screen, where the secondary screen only supports selfie mode. During this process, the primary screen becomes the secondary screen and the secondary screen becomes the primary screen.
[0049] After detecting a flip event, the method further includes: when it is determined that the shooting mode of the camera application before the flip 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 using the second camera to capture images.
[0050] 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.
[0051] 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 outwardly folded state may include:
[0052] In response to a user clicking operation on a launch control of a camera application on the home screen, the camera application is launched and executed on the home screen.
[0053] In this implementation, since the first screen is the home screen, the camera app is launched after it is started. For example, the camera app can be launched by clicking its desktop icon. Alternatively, a camera app suspended in the background can be hot-started by clicking a snapshot. In other words, the launch control can be a desktop icon or a snapshot.
[0054] It should be understood that for electronic devices that can directly start the camera application on the secondary screen, when the first screen is the secondary screen, the camera application can also be started and run on the secondary screen in response to the user clicking the start control of the camera application on the secondary screen.
[0055] 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 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 the screen switching operation. This screen switching operation may be manual screen switching or the screen switching in the embodiment of the present application.
[0056] 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.
[0057] In a second aspect, a device for executing a transition effect of cutting 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.
[0058] 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.
[0059] In a fourth aspect, a chip is provided, comprising a processor for reading and executing a computer program stored in a memory, wherein 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.
[0060] Optionally, the chip further includes a memory, and the memory is electrically connected to the processor.
[0061] Optionally, the chip may further include a communication interface.
[0062] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by an electronic device, any one of the methods of the first aspect can be implemented.
[0063] 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
[0064] FIG1 is a schematic diagram of a working form of a foldable electronic device applicable to the present application.
[0065] FIG. 2 is a schematic diagram of an interface after the electronic device is turned over during a shooting process.
[0066] FIG3 is a schematic diagram of a result of screen switching during a shooting process according to an embodiment of the present application.
[0067] FIG4 is a schematic flowchart of a method for switching screens during shooting according to an embodiment of the present application.
[0068] FIG5 is a schematic diagram of an execution process of screen switching during shooting according to an embodiment of the present application.
[0069] FIG6 is a schematic diagram of an execution process of screen switching during shooting according to an embodiment of the present application.
[0070] FIG7 is a schematic flowchart of a method for switching screens during shooting according to an embodiment of the present application.
[0071] FIG8 is a schematic diagram of the process of turning the electronic device over after cutting the screen during a selfie.
[0072] FIG9 is a schematic diagram of the process of turning the electronic device over after switching the screen during dual-view shooting.
[0073] FIG10 is a schematic diagram of a device for executing a transition effect of switching screens during shooting according to an embodiment of the present application.
[0074] FIG11 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application.
[0075] FIG12 is a schematic diagram of the hardware structure of another electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0076] The following describes the solutions of the embodiments of the present application with reference to the accompanying drawings.
[0077] This application is aimed at electronic devices in an outwardly folded state. In scenarios where a flip occurs during filming, it is hoped that after the flip, the screen can be automatically switched without user interaction, solving the problem of cumbersome manual screen switching during filming. After the screen is flipped, the filming process can be automatically resumed relatively intelligently, improving the user experience. The following first introduces the impact of the outwardly folded state and manual screen switching on the filming process with reference to Figures 1-5.
[0078] Figure 1 is a schematic diagram of the working form of a foldable electronic device applicable to the present application. As shown in Figure 1, the screen of electronic device A is foldable, and the electronic device A can be a mobile phone or a tablet computer.
[0079] Figure 1(a) shows the full-screen state. When the user folds the screen in the direction shown in Figure 1(b), the screen will be in the semi-folded state shown in Figure 1(b). It should be noted that since this application mainly focuses on the outward folding state, the folding direction is only exemplified by the outward folding. However, it should be understood that in practice, the screen can also have an inward folding function.
[0080] When the main and secondary screens are completely back-to-back and facing opposite directions, that is, when the angle between the two screens is zero, they reach the outward folded state. Figure 1 (c) shows an example of the main screen in the outward folded state, and Figure 1 (d) shows an example of the secondary screen in the outward folded state.
[0081] In the external folded state, assuming that the user flips the electronic device A in the flipping direction shown in (c) in Figure 1, the orientations of the main screen and the secondary screen will be swapped. This application aims to more intelligently switch the screen after the flipping behavior occurs, making the user's shooting process more comfortable.
[0082] The electronic device A needs to include two screens that can face opposite directions after folding, such as the main screen and the secondary screen in Figure 1. If it is folded inward, although the two screens face opposite directions, the user cannot see the screens and therefore cannot see the shooting interface. Therefore, inward folding is not applicable to the scenario of this application solution.
[0083] Shooting functions may include taking photos and recording videos. Shooting modes may include selfie mode, dual-view mode, and single-view mode, and may also include multiple-view modes with more than two views. Dual-view modes may be a combination of foreground and background, or a combination of distant and near views, with foreground and background being more common.
[0084] 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 recording cannot be used in the selfie mode. In other words, the camera function and the shooting mode are not mutually exclusive. The specific combination in actual application depends on the initial design settings of the electronic device A. However, no matter what combination is used, it will not affect the application of the embodiment of the present application.
[0085] It should also be understood that although two rear cameras are shown in Figure 1, in reality there may be only one rear camera, or there may be three or more rear cameras. In practice, there may also be multiple front cameras. For the embodiments 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.
[0086] In addition, Figure 1 takes the front camera on the main screen as an example, but it is also possible that the front camera will not occupy the main screen area. For example, it may be a retractable camera that is embedded in the electronic device A when not in use and protrudes (extends) from the main screen when in use.
[0087] Figure 1 is just an example. In practice, there may be other manual screen switching situations. As long as the problem of the shooting process being unfriendly to users 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.
[0088] Figure 2 is a schematic diagram of the interface after flipping an electronic device during a photo shoot. As shown in Figure 2 (a), in the interface shown in Figure 2 (a), a camera app is running on the main screen of the electronic device. The user is facing the main screen, and the preview window of the camera app on the main screen displays the user's portrait. The image is captured using camera #1, which can be called the front camera, and the photo function is currently in use. In the photo function, the front camera is used to capture the user's portrait, and only one preview window displays the user's portrait, which is known as selfie mode. In selfie mode, the electronic device is necessarily close to the user. Furthermore, 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 cannot exceed the distance between the electronic device and the user's face when the user holds the electronic device with their arms extended. The user can trigger a photo shoot by tapping the capture touch control shown in Figure 2 (a). Assuming the user flips the electronic device at this point, the secondary screen will now face the user, as shown in Figure 2 (b). Immediately after the flip is complete, the secondary screen remains off.
[0089] 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 for related operations on switching the screen, so that the user can perform a series of manually selected operations according to these prompts before completing the screen switching.
[0090] In the embodiment of the present application, in order to solve the problem that the above-mentioned manual operation is cumbersome and causes the shooting interruption time to be too long, the various steps are executed to achieve automatic screen switching after the flipping action.
[0091] Figure 3 is a schematic diagram of the result of screen switching during a shooting process in an embodiment of the present application. In the selfie mode as shown in Figure 3 (a) and Figure 3 (b), when the user is taking a photo in selfie mode facing the main screen, after flipping the electronic device, the user can directly see the interface shown in Figure 3 (b) without any manual operation. The image in the preview window in Figure 3 (a) comes from camera #1, but the image in the preview window in Figure 3 (b) comes from camera #2 or camera #3. When there is only camera #2 or only camera #3 on the left side of the secondary screen, the image in the preview window in Figure 3 (b) comes from the existing camera. When camera #2 is a close-up camera and camera #3 is a long-range camera, the image in the preview window in Figure 3 (b) comes from camera #2.
[0092] In dual-view mode, as shown in Figures 3(c) and 3(d), when a user is taking a photo in 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 flipped over, the user can directly view the interface shown in Figure 3(d) without any further manual operation. The image in preview window #3 in Figure 3(d) comes from camera #1, and the image in preview window #4 in Figure 3(d) comes from camera #2 or camera #3. When only camera #2 or only camera #3 is on the left side of the secondary screen, the image in preview window #4 in Figure 3(d) comes from whichever camera is present. When camera #2 is the near-view camera and camera #3 is the far-view camera, the image in preview window #4 in Figure 3(d) comes from camera #2.
[0093] The dual-screen mode in Figure 3 is illustrated using the multi-view recording function as an example. The user can trigger 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.
[0094] FIG4 is a schematic flow chart of a method for switching screens during shooting according to an embodiment of the present application.
[0095] S401: Run a camera application on the first screen of the electronic device in the outward folded state.
[0096] The first screen can be either the main screen or the secondary screen. The first screen can be, for example, the main screen or the secondary screen in FIG1 , or the main screen in FIG3 . However, it should be understood that since FIG3 only illustrates the case where the main screen flips to the secondary screen, but does not illustrate the case where the secondary screen flips to the secondary screen, in practice, the solution of the present application is also applicable to the case where the secondary screen flips to the main screen.
[0097] 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.
[0098] For the introduction of the external folding state and other related contents, please refer to Figure 1 and will not be repeated here.
[0099] In one implementation, when the first screen is the main screen, step S401 may include: in response to a user clicking a start control of the camera application on the main screen, starting and running the camera application on the main screen.
[0100] In this implementation, since the first screen is the home screen, the camera app is launched after it is started. For example, the camera app can be launched by clicking its desktop icon. Alternatively, a camera app suspended in the background can be hot-started by clicking a snapshot. In other words, the launch control can be a desktop icon or a snapshot.
[0101] It should be understood that for electronic devices that can directly start the camera application on the secondary screen, when the first screen is the secondary screen, the camera application can also be started and run on the secondary screen in response to the user clicking the start control of the camera application on the secondary screen.
[0102] 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 in this case, 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 illustrates this.
[0103] 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, and the secondary screen is the first screen.
[0104] Case 2: Before executing the solution of this application, the camera application is not started, then 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, and the secondary screen is the first screen.
[0105] Case 3: This is the second round of execution of the present application solution. That is, steps S401-S402 have already been executed once, completing the switch from the main screen to the secondary screen, so that the camera application is already running on the secondary screen. This is equivalent to first executing the various steps of the present application solution and completing the switch from the main screen to the secondary screen. During this process, the first screen is the main screen and the second screen is the secondary screen. After that, the second round begins, which is the re-execution of step S401. At this time, the first screen becomes the secondary screen. After executing the subsequent steps, the switch from the secondary screen back to the main screen will be completed. The only difference from the first round is that during the execution of the second round, the first screen is the secondary screen and the second screen is the main screen.
[0106] 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.
[0107] 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 the step performed when the secondary screen is switched back to the main screen in the current round after the main screen has been switched to the secondary screen in the previous round. In the current round, the first screen has become the secondary screen.
[0108] 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.
[0109] When the screen is the main screen, the first camera may be, for example, the camera #1 described above. Other situations are not listed one by one.
[0110] In the embodiment of the present application, the cached image is used to determine whether there is a face in the image cached 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.
[0111] It should be understood that the number of cached multi-frame images can be set to a fixed amount, just enough for use. However, this makes the cache customized, and 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 approach is to set a cache space size and cache until the cache is full. This can meet the needs of other businesses, but this approach also has the disadvantage of an indefinite number of frames, so subsequent reading requires filtering from the cache.
[0112] In one example, a preset number of images captured by a first camera are stored in a 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 of the images can be read directly without filtering during subsequent reading.
[0113] 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 will also lead to low accuracy because older images may not reflect the actual needs. Therefore, the number can be determined based on historical statistical data. Alternatively, the cache number can be set to correspond to the duration. For example, if 30 frames can be collected in 1 second, the preset number can be determined according to the number of frames corresponding to the duration of 3 seconds.
[0114] In this example, it is equivalent to caching only 100 frames. 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 directly.
[0115] Images are only stored in selfie mode and dual-view mode when there's a need to capture faces up close. In other modes, no images are stored. Furthermore, only images captured by the first camera are stored, ensuring that storage requirements are met without taking up too much memory. As can be seen in the subsequent steps, images are stored to see if any of them meet the required faces. In other modes, however, it's impossible to capture faces up close, and there's no need to store facial images. For example, the image in preview window #1 shown in Figure 3 (c) was captured with the rear camera, so there's no need to cache the image.
[0116] In one implementation, the preset caching 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, 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.
[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 incorporated into step S402, 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, 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.
[0119] In this implementation, when the number of stored images is small, they will continue to be stored. When the number of stored images is sufficient, they can be replaced starting from the oldest 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 storage space usage.
[0120] In one implementation, step S402 may include: in selfie mode or dual-view mode, each time a frame of image is captured using the first camera, using a face recognition algorithm to identify facial information in the captured frame of image, where the facial information includes the number and size of faces in the image; and caching the frame of image and the facial information of the frame of image according to a preset caching mechanism.
[0121] In this implementation, facial information is identified and stored for each frame, allowing for subsequent judgments based on facial information. Caching these images and facial information does not rely on triggering a flip event, so flip event detection and image caching can be performed simultaneously. When a flip event occurs, the stored data can be directly read without the need for re-recognition, shortening the response time to the flip event.
[0122] In one example, 0 is used to indicate no face, and then it is cached together with images with a face count greater than or equal to 1. When the face count is 0, it means that there is no face in the image. In another example, images without faces are not cached.
[0123] In one example, after facial recognition, only images containing faces are cached, ensuring that the cached images always contain faces. This prevents blurred images, images captured by the first camera during a flip event, and images captured by other cameras from being cached, ensuring that the cached images always contain faces. Consequently, even if only a single frame is subsequently read from the cached images, a judgment result that meets accuracy requirements is still sufficient.
[0124] S403: When a flip event is detected, at least one frame of image is read from the multiple frames of image buffered before the flip event.
[0125] The flip event is used to represent an interactive event in which the orientation of the first screen is swapped with the orientation of the second screen by flipping the electronic device, where the second screen is a screen in the electronic device in an outward folded state that faces opposite to the first screen.
[0126] It should be understood that when the preset number of images is used for quantitative buffering, the number of at least one frame of image read must be less than or equal to the preset number.
[0127] 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.
[0128] In one implementation, step S403 may include: reading one or more frames of images from the multiple frames of images with the shortest time interval between the flip event and the image frame, where the one or more frames of images read are the at least one frame of image. Specifically, the image read is the latest cached image, or in other words, no images have been cached since the flip event occurred. In this case, a certain number of images are read from that time forward as the at least one frame of image. Images captured closer to the flip event are more likely to reflect the user's screen switching needs.
[0129] 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 shaking causing a frame or multiple frames of cached images to be blurred, which may lead to inaccurate subsequent judgments, it is best to have multiple frames. However, images read too early in the time interval may no longer meet user needs. Reading and making judgments not only increases the complexity 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. Blurred images or images collected by other cameras will not be cached, and will not be read out here. Therefore, even if only one frame of image is read, it is still sufficient for subsequent judgments.
[0130] 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 this part of the images and improve the accuracy of subsequent judgments.
[0131] In one example, at least one frame read from the multiple frames buffered before the flip event has a timestamp that is later than the timestamps of all other frames in the multiple frames buffered before the flip event. In this example, using timestamps to filter the images to be read, selecting the more recent images for face detection, yields more accurate results.
[0132] In one example, the number of frames of the at least one image to be read can be set, for example, 100 frames, 80 frames, etc. When reading, the 100 frames or 80 frames closest to the flip event are read from the buffered multiple frames. In other words, a fixed number of frames before the flip event is read.
[0133] 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.
[0134] In other words, the screen switching is triggered according to the included faces, and manual operation is no longer required.
[0135] 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 image contains a face that meets a preset condition, the preset condition including that the number of faces in the at least one frame of image is greater than or equal to a preset value, and / or that the face size of at least one face in the at least one frame of image is within a preset threshold range;
[0136] When it is determined that at least one frame of image contains a face that meets the preset conditions, the camera application is switched to run on the second screen, and the second camera is used to capture images.
[0137] This implementation includes two judgments: the first is the judgment of the shooting mode, and the second is the judgment of the face. This can ensure that the final screen switching trigger is more accurate and better meets user expectations.
[0138] 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 no longer possible to flip, so there is no need to consider the flipping action, and it is no longer the scenario 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 face size of different people on the screen in the above-mentioned 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 face size of different people on the screen in the above-mentioned situation, and the average value is taken as the maximum value of the preset threshold range, thereby determining the preset threshold of the above-mentioned face size. For another example, if 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 still be recognized, it will not affect the judgment. Moreover, when using a mobile phone, the user will not get too close to the screen in order to see the screen clearly. Therefore, the preset threshold range does not need to have a maximum value.
[0139] 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 the preset conditions, switching the camera application to run in the selfie mode on the second screen, and using the second camera to capture images.
[0140] In this implementation, when in selfie mode, the camera used for shooting is switched from the first camera to the second camera. Taking Figure 3 as an example, before flipping, the selfie is taken with camera #1, and after flipping, the selfie is taken with camera #2.
[0141] In one implementation, step S404 may include: when it is determined that the shooting mode of the camera application before flipping is selfie mode or dual-view mode, and at least one frame of the image contains a face that meets preset conditions, switching the camera application to run in selfie mode on the second screen and using the second camera to capture images.
[0142] In this implementation, whether in selfie mode or dual-view mode, you can directly use the second camera to take selfies.
[0143] 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, 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;
[0144] The second camera is used to capture a foreground image, and the first camera is used to capture a background image.
[0145] In this implementation, the foreground camera and the background camera swap their focus: the camera that was shooting the foreground before flipping is now shooting the background, and the camera that was shooting the background before flipping is now shooting the foreground. In other words, the camera used for selfies is now shooting the background, and the camera used for the background is now shooting the selfie. For example, in Figure 3, before flipping, camera #1 (the first camera) is shooting the foreground, while camera #2 (the second camera) is shooting the background; after flipping, camera #2 is shooting the foreground, while camera #1 is shooting the background.
[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, 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] Using the second camera to capture a near-view image, and using the third camera to capture a far-view image, the third camera and the second screen facing the same direction; or,
[0148] The second camera is used to capture a distant image, and the third camera is used to capture a near-view image.
[0149] In this implementation, the dual-view scenario of long-range and short-range images 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 long-range image may be affected by the short-range image.
[0150] When the camera application running on the first screen only supports the selfie mode, step S404 may include:
[0151] Determining whether at least one frame of image contains a face that meets preset conditions, where the preset conditions include the number of faces and / or the size of the faces;
[0152] When it is determined that at least one frame of image contains a human face that meets the preset conditions, the camera application is switched to run in selfie mode on the second screen, and the second camera is used to capture images.
[0153] In this implementation, when the only mode is selfie mode, there's no need to determine which mode is active. Simply determine the face and continue in selfie mode after switching screens. In practice, this situation typically occurs when you flip to the secondary screen and then flip back to the main screen, and the secondary screen only supports selfie mode. During the process of flipping back to the main screen, the first screen becomes the secondary screen and the second screen becomes the main screen.
[0154] After detecting a flip event, the method further includes: when it is determined that the shooting mode of the camera application before the flip 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 using the second camera to capture images.
[0155] 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.
[0156] The method shown in FIG4 mainly caches the image before flipping during the shooting process, 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.
[0157] Figure 5 is a schematic diagram of the execution process of screen switching during shooting in an embodiment of the present application. Figure 5 can be seen as an introduction to the scheme of the embodiment of the present application from the internal execution process, that is, it can be considered as an example of the internal execution process of the method shown in Figure 4. As shown in Figure 5, 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 and / or size of faces in the image. The fusion decision module is used to determine whether the screen needs to be switched 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 to detect and report flip events to the flip perception monitoring module.
[0158] The camera's hardware abstraction layer (HAL) / HAL interface definition language (HIDL) includes the flip perception framework (ISF HAL), a flip algorithm module, the motion HAL, and motion HIDL. These are responsible for sensing and reporting flip events to the perception monitoring module, as well as enabling or disabling functions in response to instructions from the flip perception control module. The ISF HAL calls the flip algorithm to determine if a flip event has occurred.
[0159] The 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.
[0160] It should be understood that FIG5 only shows some modules that are more relevant to the solution of the present application. In practice, other modules may also be included for switching screens during shooting.
[0161] Figure 6 is a schematic diagram of the execution process of screen switching during shooting in an embodiment of the present application. Figure 6 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, that is, it can be seen as an example of the internal program execution process during the execution of the method shown in Figure 4.
[0162] S601. The camera software (ie, camera APK) registers a flip-aware virtual sensor with motion HIDL.
[0163] S602: Motion HIDL enables the flip algorithm to ISF HAL.
[0164] S603: The ISF HAL sends a flip enable request to the fusion sensor.
[0165] S604: Fusion sensor turns on the A+G sensor.
[0166] S605: The ISF HAL detects that a flipping action occurs.
[0167] S606. ISF HAL reports the rollover event to motion HIDL.
[0168] S607. Motion HIDL reports the flip event to the camera software.
[0169] S608: The camera software determines whether screen switching is required according to the fusion strategy.
[0170] When the camera app is running on the main screen, the fusion strategy includes flip determination, face determination, and shooting mode determination.
[0171] Flip detection is to determine whether a flip event occurs, face detection is to determine whether a certain amount of images cached before flipping contain faces that meet preset conditions, and shooting mode detection is to determine whether the shooting mode is selfie mode, dual-view mode, or neither.
[0172] 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.
[0173] 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 secondary screen.
[0174] S610: ISF HAL detects a flipping action.
[0175] S611. ISF HAL reports the rollover event to motion HIDL.
[0176] It should be understood that the example shown in Figure 6 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.
[0177] S612. Motion HIDL reports the flip event to the camera software.
[0178] S613: The camera software determines whether screen switching is required based on the fusion strategy.
[0179] Since the camera app is currently running on the secondary screen, the fusion strategy includes both flip detection and face detection. Since the secondary screen in the example shown in Figure 6 only supports selfie mode, there is no need to include shooting mode detection.
[0180] Flip detection is to determine whether a flip event occurs, and face detection is to determine whether a certain amount of images cached before flipping contain a face that meets preset conditions.
[0181] 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.
[0182] S614. The camera software WMS switches the running interface of the camera software from the secondary screen to the main screen.
[0183] S615: The camera software detects a request to exit the camera.
[0184] S616: The camera software deregisters the flip perception virtual sensor to the motion HIDL.
[0185] S617. Motion HIDL notifies ISF HAL to remove the enable flip algorithm.
[0186] S618: The ISF HAL sends a request to remove the flip enable to the fusion sensor.
[0187] S619: Fusion sensor turns off A+G sensors.
[0188] Figure 7 is a schematic flowchart of a method for switching screens during shooting according to an embodiment of the present application. The steps of Figure 7 are described below. Figure 7 can be considered an example of the method shown in Figure 4, and in this example includes the process of flipping the main screen to the secondary screen and then back to the main screen.
[0189] S701: Run a camera application on the main screen of the electronic device in the outward folded state to display a camera interface.
[0190] At this time, the main screen is the first screen in the above step S401, that is, S701 is an example of step S401.
[0191] S702: Determine whether the current shooting mode is the selfie mode or the dual-view mode. If yes, execute step S703; otherwise, execute step S704.
[0192] S703: Cache facial information.
[0193] The cached data here is the facial information from the image captured by the camera on the main screen (hereinafter referred to as the front camera). The facial information can be obtained using a face recognition algorithm.
[0194] S704: A flipping action is detected, which is a flipping action from the main screen to the secondary screen.
[0195] This step can be performed by a fusion sensor. The flipping action here must be from the main screen facing the user's face to the secondary screen, and the flip must be successful. Because the camera app is already displayed on the main screen, the flip at this point is only from the main screen to the secondary screen; failed flips are not considered.
[0196] 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 .
[0197] This step can be performed by the ISF HAL calling the flip algorithm.
[0198] S706: Determine whether the mode before flipping is the selfie mode or the dual-view mode. If yes, execute step S708; if no, execute step S711.
[0199] Judging again after flipping is equivalent to having one more check, which makes the final screen switching more accurate and avoids unnecessary screen switching.
[0200] S707: Maintain the main screen shooting state without switching screens.
[0201] That is to say, keep shooting on the main screen and the shooting mode is the original mode.
[0202] S708. Determine whether there is a face that meets the conditions. If yes, execute step S709; if no, execute step S710.
[0203] For example, it may be determined whether the face size meets a preset threshold range and is a face within 100 frames before flipping. If the determination result is yes, step S709 is executed; if the determination result is no, step S710 is executed.
[0204] This judgment 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 a preset threshold range.
[0205] Here, the first 100 frames are flipped as an example, which is equivalent to the above example of determining whether there is a face that meets the conditions.
[0206] S709, switch to the secondary screen to take a selfie.
[0207] In other words, for selfies or dual-viewing, if there are still faces that meet the requirements, it means that the user has a high demand to continue taking pictures of themselves after flipping the screen. Here, let's take the example of a secondary screen that only supports selfie mode. In this case, the secondary screen will inevitably operate in selfie mode after switching the screen.
[0208] S710: Maintain the main screen shooting state without switching screens.
[0209] That is to say, keep shooting on the main screen and the shooting mode is the original mode.
[0210] S711, switch to the secondary screen to take a selfie.
[0211] In other words, if it's not a selfie or dual view camera, it means you're shooting with the rear camera, and you can continue shooting with the rear camera after flipping. Here, we take the example of the secondary screen only supporting selfie mode. In this case, after switching the screen, the secondary screen will inevitably run in selfie mode.
[0212] It should be noted that when the switch is completed and the camera application switches to running in selfie mode on the secondary screen, a round of screen switching is over, and the subsequent process is to execute it again.
[0213] 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.
[0214] S712: Continue to cache facial information.
[0215] 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).
[0216] 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 mode judgment, or even if the mode judgment is performed, the result will inevitably be "yes", so step S712 will inevitably be executed after step S711.
[0217] S713: A flipping action is detected, which is a flipping action of the secondary screen to the main screen.
[0218] This step can be performed by a fusion sensor. The flipping action here must be from the secondary screen facing the user's face to the primary screen facing the user's face, and the flip is successful. Because it is executed after step S712, the camera app is already displayed on the secondary screen. Therefore, the flip at this time only occurs when the secondary screen flips to the primary screen, and the flip failure is not considered.
[0219] S714 , calling the rollover algorithm to detect whether there is a rollover event. When the judgment result is no, executing step S715 ; when the judgment result is yes, executing step S716 .
[0220] This step can be performed by the ISF HAL calling the flip algorithm.
[0221] S715. Maintain the secondary screen selfie mode without switching screens.
[0222] That is to say, keep shooting on the secondary screen, and the shooting mode is selfie mode.
[0223] S716: Determine whether there is a face that meets the conditions. If yes, execute step S717; if no, execute step S718.
[0224] For example, it can be determined whether the face size meets the preset threshold range and is a face within 100 frames before flipping. When the judgment result is yes, step S717 is executed; when the judgment result is no, step S718 is executed.
[0225] This judgment 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 a preset threshold range.
[0226] Here, the first 100 frames are flipped as an example, which is equivalent to the above example of determining whether there is a face that meets the conditions.
[0227] S717, switch to the main screen to take a selfie.
[0228] That is, switch to the main screen and continue to run the camera application in selfie mode on the main screen.
[0229] S718, maintain the secondary screen selfie mode, do not switch screens.
[0230] That is to say, keep shooting on the secondary screen, and the shooting mode is selfie mode.
[0231] In the method shown in Figure 7, after the user opens the camera app on the main screen, the flip perception control module in the camera APK activates the flip perception algorithm, and the flip perception monitoring module monitors for flip events. If the user selects front-facing selfie mode or dual-view mode on the main screen, and dual-view includes taking selfies with the front camera, the face recognition algorithm continues to cache facial 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 was in the front-facing selfie / dual-view state before the flip. If the main screen was in the front-facing selfie / dual-view state, after detecting the flip event, it also needs to determine whether the cached facial information meets the threshold conditions for the number of faces and area (face size). If the main screen is not in the front-facing selfie / dual-view state, the main screen is directly switched to the secondary screen based on the flip event. After switching to the secondary screen, the facial recognition algorithm calculates the face size in the secondary screen's selfie interface and continuously refreshes and caches facial information that meets the threshold into a preset facial information cache, such as a pre-defined cache of 100 frames of facial information. When the user flips back to the main screen from the secondary screen selfie, the flip perception monitoring module first listens for the flip event, then determines whether there is facial information in the facial information cache. The fusion decision module makes the final decision based on the flip and face. If the decision is correct, the secondary screen super selfie switches to the main screen for photo taking.
[0232] As shown in Figure 7, when the secondary screen has different functions than the primary screen, adjustments can be made to the fusion decision. For example, if the secondary screen only has selfie mode, there's no need to perform a separate shooting mode determination after flipping it. Furthermore, since the secondary screen only has selfie mode, flipping the primary screen to the secondary screen simply switches the image capture camera from the front camera to the rear camera, eliminating the need for the front camera to continue capturing images.
[0233] It should also be noted that this application addresses the question of whether the screen can be automatically switched after a flip action occurs during shooting. However, flipping after the screen has already been switched is not within the scope of this application. This is because flipping after switching the screen only flips the screen with the interface to the user, and no response is required.
[0234] Figure 8 illustrates the process of flipping an electronic device over after switching the screen during a selfie. As shown in Figure 8 (a), a user is in selfie mode, taking a photo with the front-facing camera (Camera #1). When they want to switch to the secondary screen, they tap the settings control, which pops up a prompt window, as shown in Figure 8 (b). The user then taps the confirmation control shown in Figure 8 (b). After confirming the screen switch, the user's main screen becomes the desktop background or simply turns off, as shown in Figure 8 (c). In Figure 8 (c), the camera on the main screen has already been switched to the secondary screen, causing it to turn off. If the user wants to view the camera 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's no need to consider switching to another screen after flipping. Furthermore, the time between manually switching and flipping depends on the user. Perhaps the user doesn't intend to flip the screen again. For example, if two users are sitting opposite each other, switching the screen might simply allow a friend to take a photo on the secondary screen. Assuming the user flips, they'll see the interface shown in Figure 8 (d). However, it should be understood that this flipping is similar to turning a page in a book to see the next page. There is no need to report this flipping action as a flip event for the electronic device to respond to. A more appropriate description is to refer to it as a flip. These are two independent events: the first is manually switching the screen, and the second is turning the phone over.
[0235] Figure 9 illustrates the process of flipping an electronic device over after switching screens during dual-view shooting. As shown in Figure 9 (a), a user is using dual-view mode, taking a selfie with the front camera (Camera #1) while simultaneously capturing a distant scene with the rear camera. At this point, the user wishes to switch to the secondary screen. They tap the settings control, which prompts a pop-up window (see Figure 9 (b)). The user then taps the confirmation control (see Figure 9 (b)). After confirming the screen switch, the user is presented with the primary screen, which becomes the desktop background or simply turns off, as shown in Figure 9 (c). In Figure 9 (c), the camera on the primary screen has already been switched to the secondary screen, causing it to go off. If the user wishes to view the shooting interface, they must flip to the secondary screen. However, since the secondary screen is already displaying the camera interface, there's no need to consider switching screens after flipping. Furthermore, the time between manually switching screens and flipping is user-defined. Perhaps the user doesn't intend to flip screens at all. For example, if two users are sitting opposite each other, they might simply switch screens so that a friend can take a photo on the secondary screen. Assume that the user flips the phone to see the interface shown in Figure 9 (d). However, it should be understood that this flipping is equivalent to turning a page in a book to see the next page. There's no need to report this flipping action as a flip event for the electronic device to respond to. A more appropriate description would be to refer to it as a flip. These are two independent events: the first is manually switching the screen, and the second is turning the phone over. For example, the distant view shown in Figure 9 (d) is no longer the same as the view shown in Figure 9 (a). The two are very different. This likely means that after the user manually switched the screen to the interface shown in Figure 9 (c), a considerable amount of time passed before turning the electronic device over. During this time, the user moved to another location with the device. Therefore, after flipping the device over, although the foreground view is still the user's selfie, the distant view is a new scene. Because manually switching the screen requires that the screen be switched and the electronic device be flipped over, they are two independent events. There is no need for continuity or correlation. The time interval between the two is entirely determined by the user's subjective will.
[0236] As can be seen from Figures 8 and 9, compared with the above, 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.
[0237] 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 shown in sequence, these steps are not necessarily performed in sequence in the order shown in the figures. Unless otherwise specified herein, 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 portion 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 portion 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.
[0238] Figure 10 is a schematic diagram of an apparatus for performing a screen-switching transition effect during filming, according to an embodiment of the present application. As shown in Figure 10 , the apparatus 2000 includes a processing unit 2001, a cache unit 2002, and a flip detection unit 2003. The apparatus 2000 can be integrated into electronic devices such as mobile phones, tablet computers, and touch-screen laptops.
[0239] The device 2000 can be used to perform any of the above-described 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 the processes shown in Figures 3 and 5, and can be used to perform the steps shown in Figures 6 and 7.
[0240] In one implementation, the apparatus 2000 may further include a storage unit for storing relevant data. The storage unit may be integrated into any one of the above units or may be a unit independent of all the above units.
[0241] Figure 11 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application. As shown in Figure 11, the electronic device 3000 includes: at least one processor 3001 (only one is shown in Figure 11), a memory 3002, and a computer program 3003 stored in the memory 3002 and executable on the at least one processor 3001. When the processor 3001 executes the computer program 3003, the steps of any of the above methods are implemented.
[0242] Those skilled in the art will understand that Figure 11 is merely an example of an electronic device and does not constitute a limitation on the electronic device. In practice, the electronic device may include more or fewer components than 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.
[0243] 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 device, a discrete gate or transistor logic device, a discrete hardware component, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0244] 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 equipped on the electronic device 3000, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. Alternatively, the memory 3002 may 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, application programs, 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 about to be output.
[0245] FIG12 is a schematic diagram of the hardware structure of another electronic device according to an embodiment of the present application. As shown in FIG12 , 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 jack 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display 194, and a subscriber identification module (SIM) card interface 195. Among them, the sensor module 180 can 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.
[0246] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0247] For example, the processor 110 shown in FIG12 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). Different processing units may be independent devices or integrated into one or more processors.
[0248] In the embodiment of the present application, the camera APK and HAL / HIDL layer are in the AP, and the sensorHub is the processor used to manage related sensors.
[0249] In some embodiments, a MIPI interface can be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. MIPI interfaces include a camera serial interface (CSI) and a display serial interface (DSI). The processor 110 and the camera 193 communicate via the CSI interface to enable the camera function of the electronic device 100. The processor 110 and the display screen 194 communicate via the DSI interface to enable the display function of the electronic device 100.
[0250] In some embodiments, the GPIO interface can be configured via software. The GPIO interface can be configured as a control signal or a data signal. The GPIO interface can be used to connect the processor 110 to 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.
[0251] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is merely an illustrative 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 from the above embodiments, or a combination of multiple interface connection methods.
[0252] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or modify display information.
[0253] The display screen 194 is used to display images, videos, etc.
[0254] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.
[0255] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.
[0256] Camera 193 is used to capture still images or videos. The lens generates an optical image of an object 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 a digital signal processor for processing. The digital signal processor converts the digital image signal into an image signal in a standard format such as RGB or YUV. In some embodiments, electronic device 100 may include one or N cameras 193, where N is a positive integer greater than one.
[0257] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.
[0258] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force is applied to pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the intensity of the touch operation based on pressure sensor 180A. Electronic device 100 can also calculate the location of the touch based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch operation intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, an instruction to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, an instruction to create a new short message is executed.
[0259] 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.
[0260] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0261] The touch sensor 180K is also called a "touch panel." The touch sensor 180K can be disposed on the display screen 194. 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 applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, in a location different from that of the display screen 194.
[0262] 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 this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.
[0263] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and 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 into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into 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, and will not be repeated here.
[0264] 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 capable of running 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.
[0265] 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.
[0266] 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 various method embodiments can be implemented.
[0267] 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 process in the above-mentioned embodiment method by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of each of the above-mentioned method embodiments. The computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include at least: 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, mobile hard disk, magnetic disk or optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.
[0268] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0269] Those skilled 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 beyond the scope of this application.
[0270] In the embodiments provided in this 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 merely a logical function division. In actual implementation, there may be other division methods, 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.
[0271] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0272] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.
[0273] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0274] 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.
[0275] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some embodiments," "in other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.
[0276] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection 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.
Citation Information
Patent Citations
Method and device for switching screen during shooting
CN117425066B
A screen switching control method and a terminal device in a shooting mode
CN108989560A
Display method and related device
CN109889630A
Screen switching method and device in shooting process
CN117425066A
Foldable device and method for controlling image capturing by using plurality of cameras
US20200356140A1