Thumbnail display method and electronic equipment
By delaying displaying the preview thumbnail in the shooting preview interface until the first frame of the photo frame is captured and the display timing is determined according to the target shooting mode, the problem of poor image quality caused by too fast thumbnail display in the prior art is solved, and the user's photography experience is improved.
Patent Information
- Application Number
- CN202510062896.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2045-01-15
AI Technical Summary
While the prior art generates thumbnails quickly, it is difficult to ensure image quality, affecting the user's photography experience.
In the target shooting mode, the preview thumbnail is delayed until after the first frame of the photo frame is captured, the preview thumbnail is determined from at least one target preview frame, and the target display timing is determined according to the target shooting mode.
By delaying displaying preview thumbnails, the incomplete acquisition of photo frames caused by too fast display speed is reduced, and the image quality and user experience of photo images are improved.
Smart Images

Figure CN119545171A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and more particularly to a thumbnail display method and electronic device. Background Art
[0002] With the continuous development of electronic devices, the shooting function of electronic devices (such as mobile phones) has also developed rapidly, and more and more users like to use mobile phones to shoot images (such as photos or videos). During the shooting process, electronic devices can display shooting effects and quickly generate thumbnails to display the thumbnails in the preview interface. Therefore, how to ensure the image quality of the mobile phone generated images while quickly generating thumbnails to improve the user's shooting experience is an urgent problem to be solved. Summary of the invention
[0003] The embodiments of the present application provide a thumbnail display method and an electronic device for improving the image quality of photographed images, thereby improving the user's photographing experience.
[0004] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:
[0005] In a first aspect, a thumbnail display method is provided, which is applied to an electronic device. In the method, when a shooting preview interface is displayed, if a shooting operation is detected in a target shooting mode, the electronic device can start to collect shooting frames. The shooting frames are used to generate a shooting image. Afterwards, after the first shooting frame is collected, the electronic device can collect and determine a preview thumbnail from at least one target preview frame. Afterwards, the electronic device can display the preview thumbnail in the shooting preview interface according to the target display timing corresponding to the target shooting mode.
[0006] In the embodiment of the present application, the electronic device displays the preview thumbnail in the shooting preview interface only after the first frame of the photo frame is collected, rather than directly displaying the preview thumbnail in the shooting preview interface after the photo operation is detected. In this way, by delaying the display time of the preview thumbnail, the occurrence of incomplete acquisition of the photo frame due to the excessively fast display speed of the preview thumbnail can be reduced, thereby improving the image quality of the photo image and further improving the user's photo experience. In addition, since the target display timing of the preview thumbnail is determined based on the target shooting mode, the number of photo frames and the required duration required for the photo process are different for different target shooting modes, and the target display timing corresponding to different target shooting modes is also different. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the photo effect, so as to shorten the display time of the preview thumbnail as much as possible and improve the user's photo experience.
[0007] In addition, since the preview thumbnail is determined from at least one target preview frame, and the at least one target preview frame is a preview frame collected after the electronic device receives a photo operation, that is, the collection period of the target preview frame corresponds to the collection period of the photo frame, so that the display time of the preview thumbnail is closer to the collection completion time of the photo frame. In this way, the image quality of the preview thumbnail can be ensured, the difference between the preview thumbnail and the photo image is reduced, and the consistency between the preview thumbnail and the photo image is better, thereby improving the user experience.
[0008] In a possible implementation of the first aspect, the process of the electronic device determining the target display timing corresponding to the target shooting mode may specifically include: when the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the electronic device may determine the target display timing of the preview thumbnail to be after the first photo frame is captured.
[0009] In the embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode belongs to a single-frame algorithm, it means that the electronic device only needs to collect one frame of photo frames to generate a photo image. Therefore, the mobile phone is triggered to display a preview thumbnail only when it is determined that the first frame of photo frames has been collected. In this way, even if the user moves the electronic device during the process of the mobile phone collecting photo frames, since the electronic device will not collect other photo frames after collecting the first frame of photo frames, it can ensure that the collected photo frames will not be blurred. In other words, it reduces the situation where the user moves the electronic device during the process of the electronic device collecting photo frames due to the electronic device displaying the preview thumbnail too early, improves the acquisition accuracy of the photo frame, and provides a basis for the subsequent generation of high-quality photo images, so that the photo images can restore image details and image clarity, thereby improving the user's photo experience.
[0010] In a possible implementation of the first aspect, the process of the electronic device determining the target display timing corresponding to the target shooting mode may also include: when the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm, if the image processing algorithm corresponding to the target shooting mode belongs to an exposure compensation algorithm, the electronic device may determine the target display timing of the preview thumbnail to be after the last photo frame is captured.
[0011] In an embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode belongs to an exposure compensation algorithm, it means that the photographic image generated by the electronic device will be affected by changes in ambient light, that is, the electronic device needs more photographic frames to generate photographic images that are not affected by ambient light. Therefore, the electronic device can determine the target display timing of the preview thumbnail to be after the last photographic frame is captured. In this way, even if the electronic device plays the photographic flash black animation in the process of displaying the preview thumbnail, since the photographic flash black animation is played after the last photographic frame is captured, it can ensure that the photographic frames collected by the electronic device will not be affected by changes in ambient light, that is, the occurrence of the photographic frames collected by the electronic device being affected by changes in ambient light can be reduced, thereby improving the acquisition accuracy of the photographic frames, providing a basis for the subsequent generation of high-quality photographic images, so that the photographic images can restore image details and image clarity, thereby improving the user's photographic experience.
[0012] In a possible implementation of the first aspect, the process of the electronic device determining the target display timing corresponding to the target shooting mode may further include: when the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm, if the image processing algorithm corresponding to the target shooting mode does not belong to an exposure compensation algorithm, the electronic device may determine the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and a preset rule. Afterwards, the electronic device may determine the target display timing of the preview thumbnail as after the target photo frame is acquired.
[0013] In the embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode is not an exposure compensation algorithm, it means that the photographic image generated by the electronic device will not be affected by changes in ambient light, that is, the electronic device only needs a small number of photographic frames to generate photographic images that are not affected by ambient light. Therefore, the electronic device can determine the target photographic frame from other photographic frames according to the total number of frames of the image processing algorithm and the preset rules, and only display the preview thumbnail in the shooting preview interface of the camera application after the target photographic frame is acquired. In this way, while ensuring the display effect of the preview thumbnail, the acquisition time of the preview thumbnail can be shortened to the greatest extent, thereby improving the user's shooting experience.
[0014] In a possible implementation of the first aspect, the preset rule includes taking the collected Nth photo frame as the target photo frame, where N is the integer of the ratio between the total number of frames of the image processing algorithm and the preset value.
[0015] In the embodiment of the present application, when the electronic device collects the photo frame, it triggers the electronic device to refresh and display the preview thumbnail. In this way, not only can the photo effect of the electronic device be guaranteed, but also the display time of the preview thumbnail can be shortened as much as possible, thereby improving the user's photo experience.
[0016] In a possible implementation of the first aspect, the process of the electronic device collecting the photo frame and the target preview frame may specifically include: in response to the photo operation, the electronic device displays a shutter interaction effect. The shutter interaction effect is used to prompt that the photo processing is in progress. Thereafter, in the process of displaying the shutter interaction effect, the electronic device starts to collect the photo frame and the target preview frame. Thereafter, while the electronic device displays the preview thumbnail in the shooting preview interface, the shutter interaction effect ends displaying.
[0017] In the embodiment of the present application, when the electronic device is provided with a shutter interactive effect, after the shutter interactive effect ends, the electronic device can refresh the preview thumbnail in the shooting preview interface. In this way, by delaying the display time of the preview thumbnail, the display time of the preview thumbnail is made close to the completion time of the acquisition of the photo frame, which can meet the display mechanism of the shutter interactive effect, so that the electronic device can display the preview thumbnail after all the photo frames are acquired, and the photo frame loss due to the early end of the shutter interactive effect is less likely to occur, which provides a basis for the subsequent better display of the photo image.
[0018] In a possible implementation manner of the first aspect, the process of displaying a preview thumbnail by the electronic device may specifically include: the electronic device may display the preview thumbnail in a shooting preview interface, and play a flash-to-black animation when taking a photo.
[0019] In the embodiment of the present application, in response to the photo operation, the electronic device can play the photo flash black animation while displaying the preview thumbnail. In this way, by delaying the display time of the preview thumbnail, the situation where the photo frame collected by the electronic device is affected by the change of ambient light when the electronic device plays the photo flash black animation can be reduced, thereby improving the acquisition accuracy of the photo frame, thereby providing a basis for the subsequent better generation of the photo image.
[0020] In a possible implementation manner of the first aspect, the method further includes: after the electronic device finishes capturing the photo frames, obtaining a target thumbnail based on at least one captured photo frame, and displaying the target thumbnail in a shooting preview interface.
[0021] In the embodiment of the present application, since the target thumbnail is determined based on at least one frame of the photographed frame, and the preview thumbnail is determined based on a single frame of the preview frame, the image quality of the preview frame is lower than the image quality of the photographed frame. In other words, the image quality of the target thumbnail will be higher than the image quality of the preview thumbnail. Therefore, the electronic device replaces the preview thumbnail displayed in the shooting preview interface with the target thumbnail, which can improve the display effect of the thumbnail and thus improve the user's visual experience.
[0022] In a possible implementation of the first aspect, after the electronic device finishes collecting the photo frames, the electronic device may process at least one photo frame according to an image processing algorithm corresponding to the target shooting mode to obtain a photo image. Thereafter, the electronic device may display a thumbnail of the photo image in a shooting preview interface.
[0023] In the embodiment of the present application, since the target thumbnail is a photographic frame obtained without an image processing algorithm, and the photographic image is a photographic frame obtained by an image processing algorithm, that is, the image quality of the photographic image will be higher than the image quality of the target thumbnail. Therefore, the mobile phone replaces the target thumbnail displayed in the shooting preview interface with the thumbnail of the photographic image, which can improve the display effect of the thumbnail and thus improve the user's visual experience.
[0024] In a possible implementation manner of the first aspect, before the electronic device displays the preview thumbnail, if the acquisition time of the target thumbnail is earlier than the determination time of the preview thumbnail, the electronic device may display the target thumbnail in the shooting preview interface.
[0025] In the embodiment of the present application, if the target thumbnail has been determined, but the preview thumbnail has not been determined, the electronic device can directly display the target thumbnail in the shooting preview interface of the camera application. That is, if the acquisition time of the target thumbnail is earlier than the determination time of the preview thumbnail, the electronic device can directly discard the preview thumbnail and use the target thumbnail to display in the shooting preview interface.
[0026] In a possible implementation of the first aspect, the electronic device may include a camera application, and the electronic device may display a shooting preview interface of the camera application. The shooting preview interface may include a display area for thumbnails and a photo control. Afterwards, in response to a user triggering operation on the photo control in the shooting preview interface, the electronic device may start to collect photo frames and target preview frames. Afterwards, the electronic device may display a shooting preview thumbnail in the display area for thumbnails in the shooting preview interface.
[0027] In a possible implementation of the first aspect, the electronic device may further include a camera HAL, and the process of the electronic device determining a preview thumbnail may specifically include: in response to a photo operation, the camera application may send a photo request to the camera HAL. Thereafter, upon receiving the photo request sent by the camera application, the camera HAL may start acquiring photo frames and target preview frames. Thereafter, when the camera HAL acquires the first photo frame, the camera HAL may send a start callback of the first photo frame to the camera application. Thereafter, upon receiving the start callback of the first photo frame sent by the camera HAL, the camera application may determine a preview thumbnail from at least one acquired target preview frame.
[0028] In the embodiment of the present application, only when the start callback of the first frame of the photo frame is obtained, the camera application determines that the camera HAL has obtained the photo frame collected by the camera. Therefore, the camera application can determine the preview thumbnail from at least one frame of the target preview frame. In this way, the acquisition time of the preview thumbnail can be delayed, and the occurrence of incomplete acquisition of the photo frame due to the too fast display speed of the preview thumbnail can be reduced, thereby improving the image quality of the photo image and thus improving the user's photo experience. In addition, since the above-mentioned preview thumbnail is determined from at least one frame of the target preview frame, and the at least one frame of the target preview frame is a preview frame collected after the electronic device receives the photo operation, that is, the acquisition time of the target preview frame is the same as the acquisition time of the photo frame, so that the display time of the preview thumbnail is closer to the acquisition completion time of the photo frame. In this way, the image quality of the preview thumbnail can be ensured, the difference between the preview thumbnail and the photo image is reduced, and the consistency of the preview thumbnail and the photo image is better, thereby improving the user's use experience.
[0029] In a possible implementation of the first aspect, the electronic device may further include a service host, and the process of the electronic device determining the target display timing corresponding to the target shooting mode may specifically include: in response to a photo operation, the camera application may apply to the service host for creating a photo session. Thereafter, when a photo session is established between the camera application and the service host, the camera application may obtain photo information from the service host. The photo information includes an image processing algorithm corresponding to the target shooting mode. Thereafter, the camera application may send a photo request to the camera HAL. The photo request carries the photo information. Thereafter, when the camera HAL receives the photo request sent by the camera application, it may determine the target display timing corresponding to the target shooting mode according to the image processing algorithm corresponding to the target shooting mode carried in the photo request.
[0030] In the embodiment of the present application, since the target display timing of the preview thumbnail is determined based on the image processing algorithm corresponding to the target shooting mode, that is, the target display timing corresponding to different target shooting modes is different. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the shooting effect, so as to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0031] In a possible implementation of the first aspect, the process of the camera HAL determining the target display timing corresponding to the target shooting mode may specifically include: when the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the camera HAL may send an end callback of the first photo frame to the camera application after acquiring the first photo frame. Afterwards, when the camera application receives the end callback of the first photo frame sent by the camera HAL, it may determine that the target display timing corresponding to the target shooting mode is after the first photo frame is acquired.
[0032] In the embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode belongs to a single-frame algorithm, it means that the image processing algorithm corresponding to the target shooting mode only needs one frame of the shooting frame to generate the shooting image, that is, the camera HAL can quickly complete the acquisition of the shooting frame. Therefore, the camera HAL can send the end callback of the first frame of the shooting frame to the camera application to notify the camera application that the first frame of the shooting frame has been acquired, so that the camera application can display the preview thumbnail after acquiring the first frame of the image frame. That is, the target display timing of the preview thumbnail is determined to be after the first frame of the shooting frame is acquired. In this way, the situation where the user moves the electronic device during the process of the camera HAL acquiring the shooting frame due to the electronic device displaying the preview thumbnail too early can be reduced, the acquisition accuracy of the shooting frame is improved, and the basis is provided for the subsequent generation of high-quality shooting images, so that the shooting image can restore the image details and image clarity, thereby improving the user's shooting experience.
[0033] In a possible implementation of the first aspect, the process of the camera HAL determining the target display timing corresponding to the target shooting mode may further include: when the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm, if the image processing algorithm corresponding to the target shooting mode belongs to an exposure compensation algorithm, the camera HAL may send an end callback of the last photo frame to the camera application after acquiring the last photo frame. Afterwards, when the camera application receives the end callback of the last photo frame sent by the camera HAL, it determines that the target display timing corresponding to the target shooting mode is after the last photo frame is acquired.
[0034] In an embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode belongs to an exposure compensation algorithm, it means that the photographic image generated by the service host will be affected by changes in ambient light, that is, the service host needs more photographic frames to generate photographic images that are not affected by ambient light. Therefore, the camera HAL can send an end callback of the last photographic frame to the camera application to notify the camera application that the last photographic frame has been acquired, so that the camera application can display a preview thumbnail after acquiring the last image frame. That is, the target display timing of the preview thumbnail is determined to be after the last photographic frame is acquired. In this way, the situation in which the photographic frames acquired by the camera HAL are affected by changes in ambient light due to the flashing black animation played when the electronic device displays the preview thumbnail can be reduced, the acquisition accuracy of the photographic frame is improved, and the basis is provided for the subsequent generation of high-quality photographic images, so that the photographic image can restore the image details and image clarity, thereby improving the user's photography experience.
[0035] In a possible implementation of the first aspect, the process of the camera HAL determining the target display timing corresponding to the target shooting mode may also include: when the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm, if the image processing algorithm corresponding to the target shooting mode does not belong to an exposure compensation algorithm, the camera HAL may determine the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and a preset rule. Among them, the other photo frames are photo frames other than the first photo frame and the last photo frame. After acquiring the target photo frame, the camera HAL sends an end callback of the target photo frame to the camera application. Afterwards, when the camera application receives the end callback of the target photo frame sent by the camera HAL, it determines that the target display timing corresponding to the target shooting mode is after the target photo frame is acquired.
[0036] In the embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode does not belong to the exposure compensation algorithm, it means that the photographic image generated by the service host will not be affected by the change of ambient light, that is, the service host only needs a small number of photographic frames to generate a photographic image that is not affected by ambient light. Therefore, the camera HAL can determine the target photographic frame from other photographic frames according to the total number of frames of the image processing algorithm and the preset rules, so as to determine the target display timing of the preview thumbnail to be after the target photographic frame is collected. In this way, while ensuring the photographic effect, the target display timing of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0037] In a second aspect, the present application provides an electronic device, comprising a camera, a memory and one or more processors; the camera, the memory and the processor are coupled; the camera is used to capture image frames, the memory is used to store computer program codes, and the computer program codes include computer instructions; when the processor executes the computer instructions, the electronic device executes the method described above.
[0038] In a third aspect, the present application provides a computer-readable storage medium, comprising computer instructions, which, when executed on an electronic device, enables the electronic device to execute the method described above.
[0039] In a fourth aspect, the present application provides a computer program product, which, when executed on an electronic device, enables the electronic device to execute the method described above.
[0040] In a fifth aspect, a chip is provided, comprising: an input interface, an output interface, a processor and a memory, wherein the input interface, the output interface, the processor and the memory are connected via an internal connection path, and the processor is used to execute the code in the memory. When the code is executed, the processor is used to execute the method as described above.
[0041] Among them, the beneficial effects that can be achieved by the electronic device described in the second aspect, the computer-readable storage medium described in the third aspect, the computer program product described in the fourth aspect, and the chip described in the fifth aspect provided above can refer to the beneficial effects in the first aspect and any possible design method thereof, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of an interface for displaying preview thumbnails on a mobile phone provided in an embodiment of the present application;
[0043] Figure 2 A schematic diagram of an interface for displaying shutter interactive effects on a mobile phone provided in an embodiment of the present application;
[0044] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram showing a front camera and a rear camera of a mobile phone provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of the software structure of an electronic device provided in an embodiment of the present application;
[0047] Figure 6A schematic diagram of a thumbnail display process provided in an embodiment of the present application;
[0048] Figure 7 A flowchart of a thumbnail display method provided in an embodiment of the present application;
[0049] Figure 8 A schematic diagram showing a shooting preview interface in a different target shooting mode provided in an embodiment of the present application;
[0050] Fig. 9 A schematic diagram of displaying a shooting preview interface in a high-pixel mode provided in an embodiment of the present application;
[0051] Fig.10 A flowchart of another thumbnail display method provided in an embodiment of the present application;
[0052] Fig.11 A schematic diagram of another thumbnail display process provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] The technical solutions in the embodiments of the present application are described below in conjunction with the drawings in the embodiments of the present application. Among them, in the description of the embodiments of the present application, the terms used in the following embodiments are only for the purpose of describing specific embodiments, and are not intended to be used as limitations on the present application. As used in the specification and the appended claims of the present application, the singular expressions "a", "said", "above", "the" and "this" are intended to also include expressions such as "one or more", unless there is a clear contrary indication in the context. It should also be understood that in the following embodiments of the present application, "at least one", "one or more" refer to one or more (including two). The term "and / or" is used to describe the association relationship of associated objects, indicating that three relationships can exist; for example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0054] References to "one embodiment" or "some embodiments" etc. described in this specification mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Thus, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways. The term "connection" includes direct connection and indirect connection, unless otherwise specified. "First" and "second" are used for descriptive purposes only and cannot be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0055] In the embodiments of the present application, the words "exemplarily" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design described as "exemplarily" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplarily" or "for example" is intended to present related concepts in a specific way.
[0056] In some embodiments, an electronic device (such as a mobile phone) may have a shooting function, that is, a user may shoot the current scene through the camera application of the electronic device, thereby obtaining a photographic image of the current scene to be saved in the gallery application of the electronic device. However, in some cases, in order to enhance the user's shooting experience, the electronic device may be provided with a thumbnail display area in the preview interface of the camera application to display preview thumbnails. In this way, not only can the user be able to quickly browse photos and improve the user's shooting efficiency, but also by triggering the thumbnail display area, the electronic device can directly display an enlarged thumbnail in the album application, which is convenient for the user to quickly view the details of the photo and enhance the user's experience.
[0057] It is understandable that the above preview thumbnails Figure 1 It is generally obtained based on the preview frame collected by the electronic device. Among them, the preview frame refers to the image frame displayed in the preview interface of the camera application, that is, the image frame collected when the electronic device displays the preview interface. During the photo shooting process, the electronic device will also collect photo frames. Photo frames refer to image frames collected by the electronic device when the user's photo shooting operation is detected, which are used to generate photo images.
[0058] For example, Figure 1 As shown, the phone is displaying Figure 1The main interface shown in (a) of FIG. 1 may include an icon of a camera application. Then, in response to a user clicking the icon of the camera application, the mobile phone may display a first preview interface of the camera application, that is, display Figure 1 The first preview interface may include a preview frame and a photo control 1A. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may refresh the display. Figure 1 The second preview interface shown in (c) of FIG. The second preview interface may include a thumbnail display area 1B. The thumbnail display area 1B is used to display the image frame generated by the mobile phone when the user clicks the photo control 1A. Afterwards, if the thumbnail display area 1B in the second preview interface is clicked by the user, the mobile phone can enter the album application to display the image frame 110 generated by the mobile phone when the user clicks the photo control 1A, that is, display Figure 1 The image display interface shown in (d).
[0059] It is understandable that the above thumbnail display process is instantaneous, that is, after detecting the user's click operation on the photo control, the electronic device can quickly generate thumbnails while displaying the photo animation, and display them in the preview interface for the user to browse. However, if the thumbnail display speed is too fast, the electronic device will not be able to collect all the photo frames, that is, the image quality of the photo image will be poor due to incomplete photo frame collection, which will affect the user experience.
[0060] The above-mentioned thumbnail display speed is too fast, which means that the thumbnail display speed is greater than the frame output speed of the hardware abstract layer (HAL) in the electronic device, that is, when the thumbnail refresh is completed, the HAL layer of the electronic device has not generated an image frame. The frame output speed of the HAL layer refers to the speed at which the HAL layer sends the photo frame.
[0061] It should be noted that in the process of taking photos by an electronic device, the time from when the user clicks the photo control to when the thumbnail is displayed in the thumbnail display area (i.e., shot2see) is generally 200 to 300 milliseconds (ms). However, since the thumbnail is determined based on the preview frame collected by the electronic device, and the preview frame is not the same as the photo frame. Therefore, in the process of displaying thumbnails, the electronic device cannot truly reflect the situation of the HAL layer sending the photo frame (such as the frame output time of the HAL layer of the electronic device is generally more than 400ms). And the process of the electronic device displaying thumbnails has nothing to do with the process of the HAL layer sending the photo frame, that is, the process of the electronic device displaying thumbnails and the process of the HAL layer sending the photo frame are executed simultaneously. Therefore, if the thumbnail display speed is too fast, it will affect the frame output effect of the HAL layer, and thus affect the image quality.
[0062] In some cases, if a user triggers a photo control, the electronic device can refresh the thumbnail display and display the photo animation. Among them, the photo animation can be a flash-black animation. The flash-black animation refers to a situation where a black screen flashes quickly and then the preview interface is displayed again when the preview interface is displayed. It can be understood that in the process of the electronic device displaying the flash-black animation for taking photos, the ambient light of the electronic device will change. Exemplarily, if the mobile phone is in the front shooting mode, the flash-black animation will affect the frame effect due to the fast display speed of the thumbnail, that is, the photo image finally generated by the electronic device will be affected by the change of ambient light, and finally affect the frame effect of the electronic device. Among them, the photo image is obtained by fusing multiple frames of photo frames collected by the electronic device using an exposure compensation (exposure values, EV) algorithm. In other words, the exposure compensation algorithm is a multi-frame algorithm, that is, an algorithm that requires multiple frames of photo frames to be calculated to generate a photo image.
[0063] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 1 may include a preview frame and a photo control 1A. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may display Figure 2 The second preview interface shown in (b) of FIG. 1 may include a black screen. Afterwards, when the display time of the second preview interface reaches a preset display time (such as 1ms), the mobile phone may return to displaying the second preview interface. Figure 2 It can be understood that the process of the mobile phone displaying the flash-to-black animation for taking a photo refers to the process of the preview frame of the preview interface changing from the flash-to-black animation for taking a photo back to the preview frame.
[0064] In other cases, the image processing algorithm in the electronic device will affect the frame output speed of the electronic device, that is, some image processing algorithms (such as the super night algorithm and the remosaic algorithm) will cause the frame output speed to slow down. Among them, the super night algorithm is used to enhance the image details and colors under low-light conditions, so that the generated image frames are clearer and brighter. In other words, the super night algorithm is mainly aimed at night shooting or other scenes with insufficient light, which can significantly improve the image quality and visualization effect. The remosaic algorithm is used to enable the camera to provide clear image output under different lighting conditions and enhance the user experience. In other words, the remosaic algorithm is mainly aimed at scenes in high-pixel mode, which can achieve good low-light performance while maintaining high resolution.
[0065] It is understandable that if the frame output speed of the electronic device is slow, the electronic device will refresh the displayed thumbnail during the frame output process. Therefore, when the electronic device refreshes the displayed thumbnail, the user may mistakenly believe that the photo shooting is over, and then move the electronic device, which may cause the final generated photo image to be blurred due to the movement of the electronic device during the frame output. That is, the photo image generated by the electronic device cannot restore the image details and image clarity, which ultimately affects the user's shooting experience.
[0066] In some other cases, the electronic device can set different shutter interaction effects according to its own frame output time. Among them, the display mechanism of the shutter interaction effect is that when the shutter interaction effect ends, the electronic device refreshes the displayed thumbnail. In other words, in the process of displaying the shutter interaction effect, the electronic device will not refresh the displayed thumbnail. Therefore, if the display speed of the thumbnail is too fast, it will cause the electronic device to end the shutter interaction effect prematurely. At this time, the electronic device will assume that the shutter interaction effect has ended, that is, the shutter interaction effect will not last until the end of the frame output. In this way, the electronic device will lose frames, which will affect the image quality of the photographed image.
[0067] In one example, when the frame output time of the electronic device is less than the first preset time, it means that the frame output speed of the electronic device is fast, that is, the electronic device can quickly obtain the photo frame. Therefore, when the user clicks the photo control, the mobile phone can directly display the photo flash black animation and refresh the thumbnail. In other words, when the frame output time of the electronic device is less than the first preset time, the shutter interaction effect is to display the photo flash black animation.
[0068] In another example, when the frame output time of the electronic device is greater than or equal to the above-mentioned first preset time, and less than the second preset time, it means that the frame output speed of the electronic device tends to the intermediate speed, that is, the electronic device can normally acquire the photo frame. Among them, the first preset time is less than the second preset time. Therefore, when the user's click operation on the photo control is detected, the mobile phone can process the photo control to display the processed photo control. Among them, the processing of the photo control can be grayscale processing of the photo control (for example, changing the color of the photo control from black to gray), or shape processing of the photo control (for example, changing the shape of the photo control from round to square), etc., as long as the display properties of the photo control can be changed, there is no specific limitation.
[0069] Afterwards, when the display duration of the processed photo control reaches the preset display duration, the electronic device can display a flash-to-black animation and refresh the displayed thumbnail. That is, when the frame output duration of the electronic device is greater than or equal to the first preset duration and less than the second preset duration, the shutter interaction effect includes displaying the processed photo control with the preset display duration and the flash-to-black animation. The preset display duration can be pre-set according to actual conditions. For example, the preset display duration can be 1 second, 2 seconds, etc., without specific limitation.
[0070] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 1 may include a preview frame and a photo control 1A. The photo control 1A is a black control. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may display Figure 2 The third preview interface shown in (c) of FIG. The third preview interface may include a preview image and a photo control 2A. The photo control 2A is a white control. Afterwards, when the display time of the third preview interface reaches the preset display time, the mobile phone may return to displaying the preview interface. Figure 2 The first preview interface shown in (a) in FIG. 1 is a first preview interface shown in FIG. 1 . It can be understood that the process of the camera control changing from black to white and then back to black is equivalent to the process of displaying the shutter interaction effect.
[0071] In another example, when the frame output time of the electronic device is greater than or equal to the above-mentioned second preset time, it means that the frame output speed of the electronic device is slow, that is, the speed at which the electronic device acquires the photo frame is slow. Therefore, when the user's click operation on the photo control is detected, the mobile phone can display a countdown of the preset waiting time. Among them, the countdown is used to characterize the time from the electronic device to acquire the photo frame. The preset waiting time can be preset according to the actual situation. For example, the preset waiting time can be 4 seconds, 5 seconds, etc., and is not specifically limited. Afterwards, when the above countdown is 0, that is, the time from the electronic device to acquire the photo frame is 0, it means that the electronic device has acquired all the photo frames, and the electronic device can display a flash black animation for taking a photo, and refresh the displayed thumbnail. That is to say, when the frame output time of the electronic device is greater than or equal to the second preset time, the shutter interaction effect includes a countdown for displaying the preset waiting time and a flash black animation for taking a photo.
[0072] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 1 may include a preview frame and a photo control 1A. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may display Figure 2The fourth preview interface shown in (d) in the figure. The fourth preview interface may include a countdown (such as 3.5s). Afterwards, when the countdown reaches 0, the mobile phone may return to displaying Figure 2 The first preview interface shown in (a) in FIG. 1 is a first preview interface shown in FIG. 1 . It can be understood that the process of the mobile phone displaying the countdown is equivalent to the process of displaying the shutter interactive effect.
[0073] Therefore, in order to improve the image quality of photographed images and enhance the user's photographing experience, an embodiment of the present application provides a method for displaying thumbnails. In the method, an electronic device displays a shooting preview interface. Wherein, the shooting preview interface includes a preview frame and a display area for thumbnails. Afterwards, in a target shooting mode, in response to a user's photographing operation, the electronic device can start collecting photographing frames. Wherein, the photographing frames are used to generate photographic images. Afterwards, after collecting the first frame of photographing frames, the electronic device can collect and determine a preview thumbnail from at least one frame of target preview frames. Afterwards, the electronic device can display the preview thumbnail in the display area of the thumbnail according to the target display timing corresponding to the target shooting mode.
[0074] In the embodiment of the present application, the electronic device displays the preview thumbnail in the shooting preview interface only after the first frame of the photo frame is collected, rather than directly displaying the preview thumbnail in the shooting preview interface after the photo operation is detected. In this way, by delaying the display time of the preview thumbnail, the occurrence of incomplete acquisition of the photo frame due to the excessively fast display speed of the preview thumbnail can be reduced, thereby improving the image quality of the photo image and further improving the user's photo experience. In addition, since the target display timing of the preview thumbnail is determined based on the target shooting mode, the number of photo frames and the required duration required for the photo process are different for different target shooting modes, and the target display timing corresponding to different target shooting modes is also different. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the photo effect, so as to shorten the display time of the preview thumbnail as much as possible and improve the user's photo experience.
[0075] In addition, since the preview thumbnail is determined from at least one target preview frame, and the at least one target preview frame is a preview frame collected after the electronic device receives a photo operation, that is, the collection period of the target preview frame corresponds to the collection period of the photo frame, so that the display time of the preview thumbnail is closer to the collection completion time of the photo frame. In this way, the image quality of the preview thumbnail can be ensured, the difference between the preview thumbnail and the photo image is reduced, and the consistency between the preview thumbnail and the photo image is better, thereby improving the user experience.
[0076] In some examples, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a smart watch, a desktop, a laptop, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, as well as a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, and other devices containing a camera. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.
[0077] For example, Figure 3 FIG. 2 shows a schematic diagram of the hardware structure of the electronic device 200. Figure 3 As shown, the electronic device 200 may include a processor 210, an external memory interface 220, an internal memory 221, a universal serial bus (USB) interface 230, a charging management module 211, a power management module 212, a battery 213, an antenna 1, an antenna 2, a mobile communication module 240, a wireless communication module 250, an audio module 270, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 1-N 293, a display screen 294, and a subscriber identification module (SIM) card interface 1-N 295, etc.
[0078] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0079] The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0080] In some embodiments, the electronic device 200 can implement the thumbnail display method provided in this application through the processor 210.
[0081] The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 240, the wireless communication module 250, the modem processor and the baseband processor.
[0082] The electronic device 200 implements the display function through a GPU, a display screen 294, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 210 may include one or more GPUs, which execute program instructions to generate or change display information.
[0083] The display screen (or screen) 294 is used to display images, videos, etc. For example, the display screen may be a touch screen, etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1. In an embodiment of the present application, the display screen 294 may be used to display a shooting preview interface of a camera application. The shooting preview interface may include a preview frame captured in real time by the camera, a photo control, and a display area for thumbnails, etc.
[0084] The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.
[0085] ISP is used to process the data fed back by camera 293. For example, when an electronic device takes a photo, the shutter is opened, and light is transmitted to the camera photosensitive element (or image sensor) through the lens, and the light signal is converted into an electrical signal. The camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 293. In some embodiments, camera 293 includes a shutter. The shutter is a device in the camera used to control the time that light irradiates the photosensitive element.
[0086] The camera 293 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 200 may include 1 or N cameras 293, where N is a positive integer greater than 1.
[0087] In some embodiments, the camera 293 may include a lens, which is an optical component for generating an image.
[0088] Exemplarily, the N cameras 293 may include: one or more front cameras and one or more rear cameras. Figure 4 , taking the above-mentioned electronic device 200 as a mobile phone as an example. Figure 4 The (a) interface shows a front camera, such as the front camera 20. Figure 4 The interface (b) in FIG. 1 shows three rear cameras, such as rear camera 21, rear camera 22 and rear camera 23. Of course, the number of cameras in the mobile phone includes but is not limited to the number described in the above embodiment.
[0089] Among them, the above-mentioned N cameras 293 may include one or more of the following cameras: a main camera, a telephoto camera, a wide-angle camera, an ultra-wide-angle camera, a macro camera, a fisheye camera, an infrared camera, a depth camera and a black and white camera.
[0090] In some embodiments, the camera 293 may further include an image sensor. In one example, the image sensor may be used to capture at least one target preview frame so that the electronic device can determine a preview thumbnail from the at least one target preview frame. The at least one target preview frame is a preview frame that the electronic device starts to capture when it receives a photo operation. In another example, the image sensor may also be used to capture at least one target photo frame so that the electronic device can generate a target thumbnail and / or a photo image based on the at least one target photo frame. The at least one target photo frame is a photo frame that the electronic device starts to capture when it receives a photo operation.
[0091] Exemplarily, the software system of the electronic device 200 may adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. ® Taking the system as an example, the software structure of the electronic device 200 is exemplified.
[0092] Figure 5 It is a software structure block diagram of the electronic device 200 of the embodiment of the present application. The embodiments of the present application will be discussed based on the following technical architecture. In order to facilitate the explanation of logic, only the business logic relationship is illustrated by a schematic block diagram, and the specific location of the technical architecture where each business is located is not strictly expressed. In addition, the naming of each module in the software architecture diagram is an exemplary example. The embodiment of the present application does not limit the naming of each module in the software architecture diagram. In actual implementation, the specific naming of the module can be determined according to actual needs.
[0093] The layered architecture divides the software into several layers, each with clear roles and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers, from top to bottom: application layer (applications), application framework layer (application framework), hardware abstraction layer (HAL), and kernel layer (kernel).
[0094] The application layer may include a series of application packages. The application layer may include multiple application packages. Figure 5 As shown, the application package can be an application such as a camera, a gallery, etc. It can be understood that the camera application can be used to trigger the electronic device to use the camera to collect image frames. The gallery application can be used to trigger the electronic device to display image frames. Among them, the image frame can include a preview frame and / or a photo frame.
[0095] The application framework layer provides application programming interface (API) and programming framework for the applications in the application layer. The application framework layer includes some predefined functions. Figure 5 As shown, the application framework layer may include a window manager, a view system, a camera service, and a service host (SH).
[0096] Among them, the window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc. The view system includes visual controls, such as controls for displaying text and controls for displaying pictures. The view system can be used to build applications. The display interface can be composed of one or more views. For example, the display interface including the SMS notification icon can include a view for displaying text and a view for displaying pictures.
[0097] The camera service is used to provide an API and programming framework for camera applications. In some embodiments, the camera service can be used to send a photo request to the camera HAL to trigger the camera HAL to start collecting target photo frames. In other embodiments, the camera service can also be used to send a preview request to the camera HAL to trigger the camera HAL to start collecting preview frames.
[0098] The service host is part of the camera application framework, which can be used to perform image algorithm processing on the preview stream and the captured image frames. The preview stream consists of multiple preview frames. In some embodiments, the camera application can obtain thumbnails and photographed images through the service host. The thumbnails may include preview thumbnails and / or target thumbnails. In some cases, the display time of the preview thumbnail is earlier than the display time of the target thumbnail. The display time of the target thumbnail is earlier than the display time of the photographed image.
[0099] The HAL layer is an encapsulation of the kernel driver, providing an interface upward, which hides the hardware interface details of a specific platform and provides a virtual hardware platform for the operating system. In an embodiment of the present application, the hardware abstraction layer may include a camera HAL. Among them, the camera HAL is the core software framework of the Camera, and the camera HAL may include a sensor node (sensor node) and an image front end (image front end, IFE) node (IFE node). The sensor node and the IFE node are components (nodes) in the image data and control instruction transmission path (also referred to as a transmission pipeline) created by the camera HAL.
[0100] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver and sensor driver, etc. Among them, the camera driver is the driver layer of the camera device, which is mainly responsible for the interaction with the camera hardware.
[0101] Understandably, Figure 5 The layers in the structure shown and the components contained in each layer do not constitute a specific limitation on the electronic device 200, i.e., a mobile phone. In other embodiments of the present application, the structure may include more or fewer layers than shown in the figure, and each layer may include more or fewer components, which is not limited in the present application.
[0102] In one implementation, in response to the user's camera operation, the mobile phone can generate a preview thumbnail based on the captured image frame during the process of capturing the image frame, and display it in the preview interface. Figure 5 The structure shown and Figure 6 The thumbnail display process shown in FIG. 1 details how a mobile phone displays thumbnails.
[0103] Correspondingly, such as Figure 6 As shown, the process may specifically include: the camera application in the mobile phone receives the user's opening operation. Then, in response to the user's opening operation on the camera application, the camera application may submit a preview request to the camera service. Then, the camera service sends a preview request to the camera HAL when receiving the preview request sent by the camera application. Then, the camera HAL starts to obtain the preview frame when receiving the preview request sent by the camera service.
[0104] Afterwards, each preview frame acquired by the camera HAL will be sent to the camera application through the camera service and the service host. Afterwards, upon receiving the preview frame sent by the service host, the camera application displays the preview frame in the shooting preview interface. Exemplarily, the camera HAL acquires the first preview frame. Afterwards, the camera HAL may send the first preview frame to the camera service. Afterwards, upon receiving the first preview frame sent by the camera HAL, the camera service sends the first preview frame to the service host. Afterwards, upon receiving the first preview frame sent by the camera service, the service host sends the first preview frame to the camera application. At the same time, the service host may save the first preview frame so that a preview thumbnail can be selected from the preview frame later. Afterwards, upon receiving the first preview frame sent by the service host, the camera application displays the first preview frame in the shooting preview interface.
[0105] At the same time, the camera application in the mobile phone receives the user's photo operation. The photo operation refers to the trigger operation for the photo control in the shooting preview interface. Afterwards, in response to the user's photo operation, the camera application can apply to the service host to create a photo session. Afterwards, the camera application can obtain photo information from the service host. The photo information can include an image processing algorithm corresponding to the target shooting mode. The target shooting mode refers to the shooting mode corresponding to the mobile phone when receiving the photo operation. Afterwards, the camera application can submit a photo request to the camera service. The photo request carries photo information. Afterwards, the camera service sends a photo request to the camera HAL when receiving the photo request sent by the camera application. Afterwards, the camera HAL starts to obtain photo frames when receiving the photo request sent by the camera service.
[0106] When the camera HAL starts to acquire the photo frame, the camera HAL can send a callback of the first photo frame to the camera application through the camera service. The callback of the first photo frame is used to indicate that the camera HAL has started to acquire the first photo frame. Specifically, when the camera HAL starts to acquire the photo frame, the camera HAL can send a start callback of the first photo frame to the camera service. Afterwards, upon receiving the start callback of the first photo frame sent by the camera HAL, the camera service sends a start callback of the first photo frame to the camera application.
[0107] In one implementation, the camera HAL may call back through the onCaptureStarted() method of the first photo frame, wherein the onCaptureStarted() method is used to indicate that the camera HAL has started to acquire the photo frame.
[0108] Furthermore, when the camera application obtains the above-mentioned photographing information, it can send a request to obtain a preview thumbnail to the service host. Afterwards, when the service host receives the request to obtain a preview thumbnail sent by the camera application, it can select any target preview frame from the received at least one target preview frame as a preview thumbnail. Among them, the at least one target preview frame is the preview frame obtained by the camera HAL when the camera application receives a photographing operation. Afterwards, the service host can send a preview thumbnail to the camera application. Afterwards, the camera application can refresh and display the preview thumbnail in the shooting preview interface.
[0109] In some embodiments, the camera application can send a request for obtaining a preview thumbnail to the preview filter (filter preview) module of the service host through the preview thumbnail request (requestPreviewImage) interface. Afterwards, when the filter preview module of the service host receives the request for obtaining a preview thumbnail sent by the camera application, it can set the flag to a first value. Among them, the first value is true. The flag being the first value can indicate that the service host has obtained the preview thumbnail. Afterwards, when the filter preview module of the service host receives the first frame of the camera sent by the camera HAL, if the flag is the first value, it can directly select any target preview frame from the at least one received target preview frame and send it to the camera application.
[0110] Afterwards, when the acquisition of the photo frame is finished, the camera HAL can send the end callback of the last photo frame to the camera application through the camera service. The end callback of the last photo frame is used to indicate that the camera HAL has completed the acquisition operation of the last photo frame, that is, the camera HAL has finished acquiring the photo frame. Specifically, when the camera HAL finishes acquiring the photo frame, the camera HAL can send the end callback of the last photo frame to the camera service. Afterwards, when the camera service receives the end callback of the last photo frame sent by the camera HAL, it sends the end callback of the last photo frame to the camera application.
[0111] In one implementation, the camera HAL may call back through the onCaptureCompleted() method of the last photo frame, wherein the onCaptureCompleted() method is used to indicate that the camera HAL has finished acquiring the photo frame.
[0112] Moreover, when the acquisition of the image frame is finished, the camera HAL may also send the photographing result to the camera service. The photographing result may include at least one photographing frame and photographing parameters of each photographing frame. The photographing parameters may include exposure time, sensitivity (ISO), focal length, etc. Afterwards, upon receiving the photographing result sent by the camera HAL, the camera service may save the photographing result to a queue buffer and send the queue buffer to the service host. Afterwards, upon receiving the queue buffer sent by the camera service, the service host may generate a target thumbnail based on at least one photographing frame in the queue buffer. Afterwards, the service host may send the target thumbnail to the camera application. Afterwards, the camera application may refresh and display the target thumbnail in the shooting preview interface.
[0113] At the same time, when the service host receives the queue buffer sent by the camera service, it can process at least one shooting frame in the queue buffer according to the image processing algorithm corresponding to the above-mentioned target shooting mode to obtain a shooting image. Afterwards, the service host can send the shooting image to the camera application. Afterwards, when the camera application receives the shooting image sent by the service host, it can refresh the thumbnail of the shooting image in the shooting preview interface.
[0114] It can be seen that the preview thumbnail is any target preview frame selected from at least one target preview frame obtained during the process of the camera HAL obtaining the photo frame. That is to say, when the camera HAL has not obtained all the photo frames, the camera application has already received the preview thumbnail and displayed it in the shooting preview interface. In this way, the photo frame may be incompletely obtained due to the thumbnail display speed being too fast, affecting the image quality of the photo image, and further affecting the user's shooting experience.
[0115] Based on a thumbnail display method provided by an embodiment of the present application, in response to a user's camera operation, a mobile phone can start to collect camera frames and target preview frames. After collecting the first camera frame, the mobile phone can determine a preview thumbnail from at least one collected preview frame and display the preview thumbnail in the shooting preview interface. By delaying the display time of the preview thumbnail, the occurrence of incomplete acquisition of the camera frame due to the excessive display speed of the preview thumbnail can be reduced, the image quality of the camera image is improved, and the user's camera experience is improved. In addition, since the preview thumbnail is determined from at least one target preview frame, and the at least one target preview frame is a preview frame collected after the electronic device receives the camera operation, that is, the collection time of the target preview frame is the same as the collection time of the camera frame, so that the display time of the preview thumbnail is closer to the collection completion time of the camera frame. In this way, the image quality of the preview thumbnail can be ensured, the difference between the preview thumbnail and the camera image is reduced, and the consistency between the preview thumbnail and the camera image is better, thereby improving the user's experience. Exemplary, such as Figure 7 As shown, the thumbnail display method may include S700 to S709:
[0116] S700: In response to the user's opening operation on the camera application, the mobile phone starts to collect preview frames.
[0117] The camera application startup operation is used to trigger the camera of the mobile phone to collect preview frames. For example, the camera can be a front camera or a rear camera, which is not specifically limited. The number of cameras used by the mobile phone to collect preview frames can be one or more, which is not specifically limited.
[0118] In some embodiments, the above-mentioned opening operation can be a trigger operation for the icon of the camera application in the main interface. The trigger operation can be a click operation, etc. Specifically, when the user's trigger operation for the icon of the camera application in the main interface is detected, the mobile phone can display a shooting preview interface. The shooting preview interface can be used to display the preview frame captured by the camera of the mobile phone. For example, Figure 1 As shown, the phone is displaying Figure 1 The main interface shown in (a) of FIG. 1 may include an icon of a camera application. Then, in response to a user clicking the icon of the camera application, the mobile phone may display a first preview interface of the camera application, that is, display Figure 1 The interface shown in (b) in the figure. The first preview interface may include a preview frame and a photo taking control 1A.
[0119] S701, in response to the user's photo-taking operation, the mobile phone starts to collect photo frames and target preview frames.
[0120] Specifically, after detecting the user's opening operation for the camera application, if the user's photo operation is detected, the mobile phone can start collecting photo frames and target preview frames. Among them, the photo operation is used to trigger the camera of the mobile phone to collect photo frames. Exemplarily, the camera can be a front camera or a rear camera, which is not specifically limited. The number of cameras used by the mobile phone to collect photo frames can be one or more, which is not specifically limited.
[0121] In one case, the above-mentioned photo-taking operation may be an operation in which the user clicks the photo-taking control in the photo-taking mode. Figure 8 , the phone is displaying Figure 8 The preview interface in the photo mode shown in (a). The preview interface in the photo mode may include a photo control 4A. If the photo control 4A is clicked by the user, it means that the user wants to take a photo in the current scene, that is, the user triggers the shooting operation. Therefore, the mobile phone can shoot the current scene in the photo mode to trigger the camera to start collecting photo frames and target preview frames.
[0122] In another case, the shooting operation may also be an operation in which the user clicks a camera control in night scene mode. Figure 8 , the phone is displaying Figure 8 The preview interface in the night scene mode shown in (b). The preview interface in the night scene mode may include a photo control 4B. If the photo control 4B is clicked by the user, the mobile phone can shoot the current scene in the night scene mode to trigger the camera to start collecting photo frames and target preview frames.
[0123] In another case, the shooting operation may also be an operation in which the user clicks the photo control when the high-pixel mode is turned on. Fig. 9 , the phone is displaying Fig. 9 The preview interface in the photo mode shown in (a) of FIG. The preview interface in the photo mode includes a preview frame and a "more" control. Afterwards, when a user touches the "more" control, the mobile phone may display a preview frame in response to the touch operation. Fig. 9 The setting interface shown in (b) in the figure. The setting interface includes multiple function controls, such as a "slow motion" control, a "delay" control, and a "high pixel" control. Afterwards, when a user triggers the "high pixel" control, the mobile phone can turn on the high pixel mode in response to the trigger operation, and after the high pixel mode is turned on, the mobile phone can display Fig. 9 The preview interface in the high-pixel mode shown in the interface (c). The preview interface in the high-pixel mode may include a preview frame and a photo control 5A. Afterwards, when a user triggers the photo control 5A, in response to the trigger operation, the mobile phone may shoot the current scene in the high-pixel mode to trigger the camera to start collecting photo frames and target preview frames.
[0124] It can be understood that the above-mentioned photo frame is a photo frame directly generated after the mobile phone camera takes a photo, that is, the photo frame is a photo frame that has not been image processed. The above-mentioned target preview frame is a preview frame collected by the camera when the mobile phone receives a photo operation.
[0125] In one implementation, when a user's photo operation is detected, the mobile phone can display a shutter interaction effect. The shutter interaction effect is used to indicate that the mobile phone is collecting photo frames. The shutter interaction effect can be pre-set according to its own frame output duration. Afterwards, in the process of displaying the shutter interaction effect, the mobile phone can start collecting photo frames and target preview frames. When the shutter interaction effect ends, it means that the mobile phone has completed the collection of photo frames, and the mobile phone can display the preview thumbnail in the shooting preview interface.
[0126] In one example, when the frame duration of the mobile phone is less than the first preset duration, it means that the frame speed of the mobile phone is fast, that is, the mobile phone can quickly obtain the photo frame. Therefore, when the user's photo operation is detected, the mobile phone can directly display the photo flash black animation and refresh the preview thumbnail. In other words, when the frame duration of the mobile phone is less than the first preset duration, the shutter interaction effect is to display the photo flash black animation.
[0127] In another example, when the frame output time of the mobile phone is greater than or equal to the above-mentioned first preset time, and less than the second preset time, it means that the frame output speed of the mobile phone tends to the middle speed, that is, the mobile phone can normally obtain the photo frame. Among them, the first preset time is less than the second preset time. Therefore, when the user's photo operation is detected, the mobile phone can process the photo control to display the processed photo control. Among them, the processing of the photo control can be grayscale processing of the photo control (for example, changing the color of the photo control from black to gray), or shape processing of the photo control (for example, changing the shape of the photo control from round to square), etc., as long as the display properties of the photo control can be changed, there is no specific limitation.
[0128] Afterwards, when the display duration of the processed photo control reaches the preset display duration, the mobile phone can display a flash-to-black animation and refresh the preview thumbnail. That is to say, when the frame output duration of the mobile phone is greater than or equal to the first preset duration and less than the second preset duration, the shutter interaction effect may include displaying the processed photo control with the preset display duration and the flash-to-black animation. The preset display duration may be pre-set according to actual conditions. For example, the preset display duration may be 1 second, 2 seconds, etc., without specific limitation.
[0129] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 1 may include a preview frame and a photo control 1A. The photo control 1A is a black control. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may display Figure 2 The third preview interface shown in (c) of FIG. The third preview interface may include a preview frame and a photo control 2A. The photo control 2A is a white control. Afterwards, when the display time of the third preview interface reaches the preset display time, the mobile phone may return to displaying the preview frame. Figure 2 The first preview interface shown in (a) in FIG. 1 is a first preview interface shown in FIG. 1 . It can be understood that the process of the camera control changing from black to white and then back to black is equivalent to the process of displaying the shutter interaction effect.
[0130] In another example, when the frame output time of the mobile phone is greater than or equal to the above-mentioned second preset time, it means that the frame output speed of the mobile phone is slow, that is, the speed at which the mobile phone obtains the photo frame is slow. Therefore, when the user's click operation on the photo control is detected, the mobile phone can display a countdown of the preset waiting time. Among them, the countdown is used to characterize the time from the mobile phone to obtain the photo frame. The preset waiting time can be preset according to the actual situation. For example, the preset waiting time can be 4 seconds, 5 seconds, etc., and is not specifically limited. Afterwards, when the above countdown is 0, that is, the time from the mobile phone to obtain the photo frame is 0, it means that the mobile phone has obtained the photo frame, and the mobile phone can display a flash black animation for taking a photo, and refresh the display thumbnail. In other words, when the frame output time of the mobile phone is greater than or equal to the second preset time, the shutter interaction effect includes a countdown for displaying the preset waiting time and a flash black animation for taking a photo.
[0131] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 1 may include a preview frame and a photo control 1A. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may display Figure 2 The fourth preview interface shown in (d) in the figure. The fourth preview interface may include a countdown (such as 3.5s). Afterwards, when the countdown reaches 0, the mobile phone may return to displaying Figure 2 The first preview interface shown in (a) in FIG. 1 is a first preview interface shown in FIG. 1 . It can be understood that the process of the mobile phone displaying the countdown is equivalent to the process of displaying the shutter interactive effect.
[0132] In some embodiments, when starting to collect photo frames and target preview frames, the mobile phone can determine a preview thumbnail from at least one collected target preview frame.
[0133] S702: When the first photo frame is captured, the mobile phone determines a preview thumbnail from at least one captured target preview frame.
[0134] Specifically, after the mobile phone starts to collect photo frames, if the first photo frame is collected, it means that the mobile phone has started to take photos, and the mobile phone can determine the preview thumbnail from at least one collected target preview frame.
[0135] It can be understood that since the above-mentioned preview thumbnail is determined from at least one target preview frame, and the at least one target preview frame is a preview frame collected after the electronic device receives a photo operation, that is, the collection time of the target preview frame is the same as the collection time of the photo frame, so that the display time of the preview thumbnail is closer to the collection completion time of the photo frame. In this way, the image quality of the preview thumbnail can be ensured, the difference between the preview thumbnail and the photo image is reduced, and the consistency between the preview thumbnail and the photo image is better, thereby improving the user experience.
[0136] In some cases, the mobile phone can use any captured target preview frame as a preview thumbnail.
[0137] In other cases, in order to improve the display effect of the preview thumbnail, that is, to ensure the image quality of the preview thumbnail, the mobile phone can use the first target preview frame captured by the mobile phone after the first photo frame is captured as the preview thumbnail, that is, the target preview frame with the latest capture time is used as the preview thumbnail. In this way, the difference between the preview thumbnail and the photo image can be reduced, making the preview thumbnail more consistent with the photo image, thereby improving the user experience.
[0138] In one implementation, after determining the preview thumbnail, the mobile phone can determine the target display timing of the preview thumbnail according to the image processing algorithm corresponding to the target shooting mode. That is, the mobile phone can display the preview thumbnail in the shooting preview interface according to the target display timing corresponding to the target shooting mode. The target shooting mode refers to the shooting mode corresponding to the mobile phone when receiving the shooting operation.
[0139] The following describes in detail how to determine the target display timing of the preview thumbnail according to the image processing algorithm corresponding to the target shooting mode.
[0140] S703, the mobile phone determines whether the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm.
[0141] Specifically, after determining the preview thumbnail, the mobile phone can further determine whether the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm. In this way, the timing of obtaining the preview thumbnail can be determined, thereby improving the display accuracy of the preview thumbnail and ultimately improving the user's shooting experience.
[0142] The above-mentioned single-frame algorithm refers to an image processing algorithm that only needs one frame of photographic frames as input to generate a photographic image. In other words, the single-frame algorithm is used to characterize that the photographic image is generated based on one frame of photographic frames. Exemplarily, the single-frame algorithm may include a remosaic algorithm in a high-pixel mode, etc.
[0143] It is understandable that the mobile phone may include a variety of image processing algorithms. Afterwards, the mobile phone can call different image processing algorithms according to different shooting modes to process the photo frames collected by the mobile phone to meet the visual needs of the user. For example, if the shooting mode is night scene mode, the image processing algorithm may be an ultra-night algorithm. For another example, if the shooting mode is high-pixel mode, the image processing algorithm may be a remosaic algorithm. For another example, if the shooting mode is front-facing portrait mode, the image processing algorithm may be a high dynamic range (HDR) algorithm for the original image file (RAW).
[0144] In some embodiments, if the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to a single-frame algorithm, it means that the image processing algorithm corresponding to the target shooting mode only needs one frame of photo frames to generate a photo image, that is, the mobile phone can quickly complete the acquisition of photo frames. Therefore, the mobile phone can execute S704, that is, determine that the target display timing is after the first photo frame is acquired. In this way, even if the user moves the mobile phone during the process of the mobile phone acquiring photo frames, since the mobile phone will not acquire other photo frames after the first photo frame is acquired, it can ensure that the acquired photo frames will not be blurred, that is, it can reduce the situation where the user moves the mobile phone during the process of the mobile phone acquiring photo frames due to the premature display of the preview thumbnail by the mobile phone, improve the acquisition accuracy of the photo frames, and provide a basis for the subsequent generation of high-quality photo images, so that the photo images can restore the image details and image clarity, thereby improving the user's photo experience.
[0145] In other embodiments, if the image processing algorithm corresponding to the target shooting mode is not a single-frame algorithm, that is, the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, it means that the image processing algorithm corresponding to the target shooting mode requires multiple frames to generate a photographic image, that is, the mobile phone needs a long time to collect photographic frames. Therefore, the mobile phone can execute S705 to further determine the target display timing of the preview thumbnail. In this way, while ensuring the photographic effect, the target display timing of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0146] The above-mentioned multi-frame algorithm refers to an image processing algorithm that requires multiple frames of photographic frames as input to generate a photographic image. In other words, the single-frame algorithm is used to characterize that the photographic image is generated based on multiple frames of photographic frames. Exemplarily, the multi-frame algorithm may include the RAWHDR algorithm of the front portrait mode, the ultra-night algorithm of the night scene mode, the ArcSoft algorithm of the portrait mode, etc.
[0147] S704: When the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the mobile phone determines the target display timing of the preview thumbnail to be after the first shooting frame is captured.
[0148] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode is a single-frame algorithm, the mobile phone can determine the target display timing of the preview thumbnail to be after the first frame of the photo is captured. That is, the mobile phone will display the preview thumbnail in the shooting preview interface of the camera application only after the first frame of the photo is captured.
[0149] It can be understood that if the image processing algorithm corresponding to the target shooting mode belongs to a single-frame algorithm, it means that the mobile phone only needs to collect one frame to generate a photo image. Therefore, the mobile phone is triggered to display the preview thumbnail only when it is determined that the first frame of the photo frame has been collected. In this way, the situation where the user moves the mobile phone during the process of collecting photo frames due to the premature display of the preview thumbnail by the mobile phone can be reduced, the collection accuracy of the photo frame is improved, and the basis for the subsequent generation of high-quality photo images is provided, so that the photo image can restore the image details and image clarity, thereby improving the user's photo experience.
[0150] For example, the target shooting mode is a high-pixel mode, and the image processing algorithm corresponding to the high-pixel mode is a remosaic algorithm, and the remosaic algorithm is a single-frame algorithm. Therefore, the mobile phone can determine that the image processing algorithm corresponding to the high-pixel mode belongs to a single-frame algorithm. Therefore, the mobile phone can determine the target display timing of the preview thumbnail to be after the first frame of the photo is collected.
[0151] S705: When the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, the mobile phone determines whether the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm.
[0152] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode does not belong to a single-frame algorithm, the mobile phone can continue to determine whether the image processing algorithm corresponding to the target shooting mode belongs to an exposure compensation algorithm. Among them, the exposure compensation algorithm refers to adjusting the exposure parameters of the mobile phone camera to achieve the purpose of adjusting the brightness of the image frame. In other words, through the exposure compensation algorithm, the mobile phone can adaptively adjust the exposure parameters of the camera according to changes in ambient light, so that the camera image generated by the mobile phone can achieve a moderate brightness effect and enhance the user's visual experience. Exemplarily, the compensation exposure algorithm may include a RAWHDR algorithm, an ultra-night algorithm, and the like.
[0153] For example, the target shooting mode is the front-facing portrait mode. The image processing algorithm corresponding to the front-facing portrait mode is the RAWHDR algorithm, and the RAWHDR algorithm is a multi-frame algorithm. Therefore, the mobile phone can determine that the image processing algorithm corresponding to the front-facing portrait mode does not belong to a single-frame algorithm. Therefore, the mobile phone can continue to determine whether the RAWHDR algorithm belongs to an exposure compensation algorithm to further determine the target display timing of the preview thumbnail.
[0154] In some embodiments, if the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to an exposure compensation algorithm, it means that the photographic image generated by the mobile phone will be affected by the change of ambient light, that is, the mobile phone needs more photographic frames to generate a photographic image that is not affected by ambient light. Therefore, the mobile phone can execute S706, that is, determine the target display timing of the preview thumbnail to be after the last photographic frame is collected. In this way, even if the mobile phone plays the photographic flash black animation in the process of displaying the preview thumbnail, since the photographic flash black animation is played after the last photographic frame is collected, it can ensure that the photographic frames collected by the mobile phone will not be affected by the change of ambient light, that is, it can reduce the situation that the photographic frames collected by the mobile phone are affected by the change of ambient light due to the playing of the photographic flash black animation when the mobile phone displays the preview thumbnail, improve the acquisition accuracy of the photographic frame, and provide a basis for the subsequent generation of high-quality photographic images, so that the photographic image can restore the image details and image clarity, thereby improving the user's photography experience.
[0155] In some embodiments, if the image processing algorithm corresponding to the above-mentioned target shooting mode does not belong to an exposure compensation algorithm, it means that the photographed image generated by the mobile phone will not be affected by changes in ambient light, that is, the mobile phone only needs a small number of photographic frames to generate photographed images that are not affected by ambient light. Therefore, the mobile phone can execute S707, that is, determine the target display timing of the preview thumbnail according to the total number of frames of the image processing algorithm and the preset rules. In this way, while ensuring the photographic effect, the target display timing of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0156] S706: When the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, the mobile phone determines the target display timing of the preview thumbnail to be after the last photo frame is captured.
[0157] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to the exposure compensation algorithm, the mobile phone can determine the target display timing of the preview thumbnail as after the last frame of the photo is collected, that is, the mobile phone will display the preview thumbnail in the shooting preview interface of the camera application after the last frame of the photo is collected. In this way, the situation where the photo frames collected by the mobile phone are affected by the change of ambient light due to the flashing black animation of the photo when the mobile phone displays the preview thumbnail can be reduced, the acquisition accuracy of the photo frame is improved, and the basis for the subsequent generation of high-quality photo images is provided, so that the photo images can restore the image details and image clarity, thereby improving the user's photo experience.
[0158] For example, the target shooting mode is the front-end portrait mode. The image processing algorithm corresponding to the front-end portrait mode is the RAWHDR algorithm, and the RAWHDR algorithm is a compensation exposure algorithm. Therefore, the mobile phone can determine that the image processing algorithm corresponding to the front-end portrait mode belongs to the compensation exposure algorithm. Therefore, the mobile phone can determine the target display timing of the preview thumbnail to be after the last frame of the photo is collected.
[0159] S707, when the image processing algorithm corresponding to the target shooting mode does not belong to the exposure compensation algorithm, the mobile phone determines the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and a preset rule.
[0160] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode does not belong to the exposure compensation algorithm, the mobile phone can determine the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and the preset rules. Among them, the other photo frames refer to the photo frames collected by the mobile phone except the first photo frame and the last photo frame. In this way, while ensuring the display effect of the preview thumbnail, the acquisition time of the preview thumbnail can be shortened to the greatest extent, thereby improving the user's shooting experience.
[0161] For example, the target shooting mode is the portrait mode. The image processing algorithm corresponding to the portrait mode is the ArcSoft algorithm, and the ArcSoft algorithm is not an exposure compensation algorithm, that is, the image processing algorithm corresponding to the portrait mode does not belong to an exposure compensation algorithm. Therefore, the mobile phone can determine the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and the preset rules.
[0162] It is understandable that the total number of frames required by each image processing algorithm stored in the mobile phone is predetermined. Exemplarily, the total number of frames can be 12 frames, or 9 frames, etc., which is not specifically limited.
[0163] In some embodiments, the preset rule may be to use the Nth photo frame collected by the mobile phone as the target photo frame. Wherein, N may be the ratio between the total number of frames of the image processing algorithm and the preset value rounded. Exemplarily, the preset value may be pre-set according to the acquisition speed of the photo frame. For example, the preset value may be 3, 2, etc., which are not specifically limited. In this way, the mobile phone may be triggered to refresh the preview thumbnail during the process of collecting photo frames by the mobile phone, which not only ensures the photo effect of the mobile phone, but also shortens the display time of the preview thumbnail as much as possible, thereby improving the user's photo experience.
[0164] For example, taking the preset value of 3 as an example, if the total number of frames is 9, the mobile phone can use the acquisition time of the third photo frame as the display time of the preview thumbnail. If the total number of frames is 8, the mobile phone can use the acquisition time of the second photo frame as the display time of the preview thumbnail.
[0165] S708, the mobile phone determines the target display timing of the preview thumbnail to be after the target photo frame is captured.
[0166] Specifically, after determining the target photo frame, the mobile phone can determine the target display timing of the preview thumbnail to be after the target photo frame is acquired, that is, the mobile phone displays the preview thumbnail in the shooting preview interface of the camera application only after the target photo frame is acquired. In this way, while ensuring the display effect of the preview thumbnail, the acquisition time of the preview thumbnail can be shortened to the greatest extent, thereby improving the user's shooting experience.
[0167] S709: The mobile phone displays the preview thumbnail in the shooting preview interface according to the target display timing of the preview thumbnail.
[0168] Specifically, after determining the target display timing of the preview thumbnail, the mobile phone can display the preview thumbnail in the shooting preview interface of the camera application according to the target display timing of the preview thumbnail. In this way, by delaying the display time of the preview thumbnail, not only can the situation of incomplete acquisition of the photo frame caused by the preview thumbnail display speed being too fast be reduced, the image quality of the photo image is improved, and the user's photo experience is improved. In addition, the user can trigger the mobile phone to enter the gallery or trigger the mobile phone to exit the camera later, which can reduce the situation where the mobile phone exits the photo scene due to the mobile phone not collecting all the photo frames, effectively improve the acquisition efficiency of the photo frame, and provide a basis for the subsequent generation of high-quality photo images. In addition, since the target display timing of the preview thumbnail is determined based on the target shooting mode, that is, the target display timing corresponding to different target shooting modes is different. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the photo effect, so as to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0169] For example, Figure 1 As shown, the phone is displaying Figure 1 The first preview interface shown in (b) of FIG. 1 may include a preview frame and a photo control 1A. Afterwards, if the photo control 1A in the first preview interface is clicked by the user, the mobile phone may refresh the display. Figure 1 The second preview interface shown in (c) of FIG. 1 may include a thumbnail display area 1B. The thumbnail display area 1B is used to display the preview thumbnails.
[0170] In some cases, when the phone is in the front-facing shooting mode (such as the front-facing portrait mode), if the user's photo operation is detected, the phone can refresh the preview thumbnail in the shooting preview interface and play the flash-to-black animation in the shooting preview interface only after the last frame of the photo is collected. The flash-to-black animation refers to the situation where a black screen quickly flashes across the shooting preview interface and then the shooting preview interface is redisplayed when the shooting preview interface is displayed. In this way, the preview thumbnail is refreshed and the flash-to-black animation is played only when the last frame of the photo is collected, thereby reducing the situation where the photo frames collected by the mobile phone are affected by changes in ambient light when the mobile phone plays the flash-to-black animation of the photo, improving the acquisition accuracy of the photo frames, and thus providing a basis for the subsequent better generation of photo images.
[0171] In other cases, when the phone is in high-pixel mode, if the user's photo operation is detected, the phone can refresh the preview thumbnail in the shooting preview interface only after the first photo frame is collected. In this way, the preview thumbnail is refreshed and displayed only when the first photo frame is collected, which reduces the possibility that the user mistakenly believes that the photo shooting is over and then moves the electronic device due to the preview thumbnail being displayed too early, reduces the probability of blurry images generated by the phone later, and improves the clarity of the photo images.
[0172] In some other cases, when the mobile phone is provided with a shutter interactive effect, after the shutter interactive effect ends, the mobile phone can refresh the preview thumbnail in the shooting preview interface. Among them, the shutter interactive effect is used to prompt that the photo processing is in progress. In this way, by delaying the display time of the preview thumbnail, the display time of the preview thumbnail is made close to the completion time of the acquisition of the photo frame, which can meet the display mechanism of the shutter interactive effect, so that the mobile phone can display the preview thumbnail after all the photo frames are acquired, and the loss of the photo frame due to the early end of the shutter interactive effect is less likely to occur, which provides a basis for the subsequent better display of the photo image.
[0173] In some embodiments, when a preview thumbnail is displayed on the shooting preview interface, if it is detected that the preview thumbnail is triggered by the user, the mobile phone can display the preview thumbnail in the gallery application. In this way, the situation where the preview thumbnail and the photographed image are greatly different due to the user triggering the mobile phone to immediately enter the gallery application can be reduced, so that the preview thumbnail and the photographed image are more consistent, thereby improving the user experience.
[0174] In one implementation, after displaying the preview thumbnail, if the mobile phone finishes collecting image frames, the mobile phone can generate a target thumbnail and a photographed image based on at least one captured photographing frame, and display them in the shooting preview interface. Fig.10 As shown, the thumbnail display method may further include S710 to S713:
[0175] S710: When the acquisition of the photo frames is finished, the mobile phone determines a target thumbnail according to at least one acquired photo frame.
[0176] It can be understood that when the number of photo frames collected by the mobile phone reaches the total number of frames of the above-mentioned image processing algorithm, the mobile phone may stop collecting photo frames, that is, end collecting photo frames. Afterwards, when the collection of photo frames is finished, the mobile phone can determine the target thumbnail (or SH thumbnail) based on at least one collected photo frame. The acquisition time of the target thumbnail is later than the acquisition time of the preview thumbnail.
[0177] In some embodiments, if the image processing algorithm corresponding to the above-mentioned target shooting mode is a single-frame algorithm, the mobile phone can process the first captured frame to obtain a target thumbnail. If the image processing algorithm corresponding to the target shooting mode is not a single-frame algorithm, that is, the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, the mobile phone can fuse at least two captured frames to obtain a target thumbnail.
[0178] S711, the phone displays the target thumbnail in the shooting preview interface.
[0179] Specifically, after determining the above-mentioned target thumbnail, the mobile phone can display the target thumbnail in the shooting preview interface of the camera application, that is, replace the preview thumbnail displayed in the shooting preview interface with the target thumbnail. It can be understood that since the target thumbnail is determined based on at least one frame of the photo frame, and the preview thumbnail is determined based on a single frame of the preview frame, the image quality of the preview frame is lower than the image quality of the photo frame. In other words, the image quality of the target thumbnail will be higher than the image quality of the preview thumbnail. Therefore, the mobile phone replaces the preview thumbnail displayed in the shooting preview interface with the target thumbnail, which can improve the display effect of the thumbnail and thus improve the user's visual experience.
[0180] It should be noted that if the target thumbnail has been determined but the preview thumbnail has not been determined, the mobile phone can directly display the target thumbnail in the shooting preview interface of the camera application. In other words, if the acquisition time of the target thumbnail is earlier than the acquisition time (or determination time) of the preview thumbnail, the mobile phone can directly discard the preview thumbnail and use the target thumbnail to display in the shooting preview interface.
[0181] S712, the mobile phone processes at least one photographic frame according to an image processing algorithm corresponding to the target shooting mode to obtain a photographic image.
[0182] Specifically, after the acquisition of the photo frame is completed, the mobile phone can process the at least one photo frame acquired according to the image processing algorithm corresponding to the above-mentioned target shooting mode to obtain a photo image. The photo image is the photo frame obtained after image processing. The acquisition time of the photo image is later than the acquisition time of the target thumbnail.
[0183] S713, the mobile phone displays a thumbnail of the photographed image in the shooting preview interface.
[0184] Specifically, after determining the above-mentioned photographed image, the mobile phone can display the photographed image in the shooting preview interface of the camera application, that is, the target thumbnail displayed in the shooting preview interface is replaced with the thumbnail of the photographed image. It can be understood that since the target thumbnail is a photographed frame obtained without the image processing algorithm, and the photographed image is a photographed frame obtained by the image processing algorithm. In other words, the image quality of the photographed image will be higher than the image quality of the target thumbnail. Therefore, the mobile phone replaces the target thumbnail displayed in the shooting preview interface with the thumbnail of the photographed image, which can improve the display effect of the thumbnail and thus improve the user's visual experience.
[0185] In some embodiments, since the image displayed in the shooting preview interface is a small-sized image, the mobile phone can reduce the photographed image according to a preset size to obtain a reduced photographed image, that is, a thumbnail of the photographed image. Afterwards, the mobile phone can replace the target thumbnail displayed in the shooting preview interface with the thumbnail of the photographed image.
[0186] In one implementation, in response to the user's photo operation, if the camera application of the mobile phone receives a callback of the first photo frame, the camera application can send a request to obtain a preview thumbnail to the service host, so as to trigger the service host to determine a preview thumbnail from at least one captured target preview frame, so as to display it in the shooting preview interface of the camera application. Figure 5 The structure shown and Fig.11 The thumbnail display process shown in FIG. 1 details how a mobile phone displays thumbnails.
[0187] S1101. The camera application of the mobile phone receives an opening operation from the user.
[0188] The above-mentioned opening operation refers to a triggering operation of the user on the icon of the camera application in the main interface. For example, the triggering operation can be a click operation, a long press operation, etc., as long as it can meet the preset opening rules of the camera application, and there is no specific limitation.
[0189] S1102: The camera application submits a preview request to the camera service.
[0190] The preview request is used to enable the camera service to trigger the camera HAL to acquire a preview frame, which can be displayed in the shooting preview interface of the camera application.
[0191] S1103: When receiving the preview request sent by the camera application, the camera service sends a preview request to the camera HAL.
[0192] S1104: When the camera HAL receives the preview request sent by the camera service, it starts to obtain the preview frame.
[0193] Here, obtaining the preview frame refers to obtaining the captured preview frame from the camera of the mobile phone.
[0194] S1105. The camera HAL sends a preview frame to the camera service.
[0195] Specifically, after starting to obtain preview frames, the camera HAL can send each preview frame obtained to the camera application through the camera service and the service host, so that the camera application can display the preview frame in the shooting preview interface. In this way, it is convenient for users to view the real-time images captured by the mobile phone camera, which improves the user experience.
[0196] S1106. When the camera service receives the preview frame sent by the camera HAL, the camera service sends the preview frame to the service host.
[0197] S1107. When receiving the preview frame sent by the camera service, the service host sends the preview frame to the camera application.
[0198] S1108. When the camera application receives the preview frame sent by the service host, the camera application displays the preview frame in the shooting preview interface.
[0199] S1109: The camera application of the mobile phone receives the user's photo-taking operation.
[0200] The above-mentioned photo operation refers to a trigger operation of a user on a photo control in a camera application. The photo control is set in the preview interface of the camera application. Exemplarily, the trigger operation can be a click operation, a slide operation, etc., as long as it can meet the preset trigger rules of the photo control, and there is no specific limitation.
[0201] S1110 . The camera application and the service host of the mobile phone apply to create a photo session.
[0202] Specifically, when a user's photo-taking operation is detected, the camera application may apply to the service host to create a photo-taking session.
[0203] Among them, the above-mentioned service host may include a filter preview module. The filter preview module is used to receive a preview thumbnail and set a first flag. The first flag is used to indicate whether the filter preview module obtains a preview thumbnail. It can be understood that if the filter preview module obtains a preview thumbnail, the first flag is a first value. If the filter preview module does not obtain a preview thumbnail, the first flag is a second value. Exemplarily, the first value is true and the second value is false.
[0204] S1111: The camera application obtains photographing information from the service host, wherein the photographing information includes an image processing algorithm corresponding to a target photographing mode.
[0205] In some embodiments, when the camera session between the camera application and the service host is established, the camera application can obtain the photo information from the service host. The photo information may include an image processing algorithm corresponding to the target shooting mode. The target shooting mode refers to the shooting mode corresponding to the mobile phone when receiving the photo operation.
[0206] For example, if the target shooting mode is a high-pixel mode, the image processing algorithm may be a remosaic algorithm. If the target shooting mode is a front-facing portrait mode, the image processing algorithm may be a RAWHDR algorithm.
[0207] In one implementation, the camera application can obtain the photo information from the service host through the ServiceHostSession.capturegetCaptureParams() method.
[0208] S1112: The camera application submits a photo request to the camera service of the mobile phone, wherein the photo request carries photo information.
[0209] Specifically, when the above-mentioned photographing information is obtained, the camera application may submit a photographing request to the camera service, so that the camera service triggers the camera HAL to collect photographing frames.
[0210] In one implementation, the camera application may submit a photo-taking request to the camera service through a submit request list method.
[0211] S1113. When the camera service receives the photo-taking request sent by the camera application, the camera service sends the photo-taking request to the camera HAL of the mobile phone.
[0212] The photo taking request may be a process capture request (process_capture_request).
[0213] S1114. When the camera HAL receives the photo request sent by the camera service, it starts to obtain the photo frame.
[0214] Specifically, after receiving the photo request sent by the camera service, the camera HAL may start to obtain the photo frame. For example, the camera HAL may obtain the collected photo frame from the camera of the mobile phone.
[0215] It should be noted that each photo frame acquired by the camera HAL includes the callback method of onCaptureStarted() and the callback method of onCaptureCompleted(). Among them, the callback method of onCaptureStarted() is used to indicate that the current photo frame has started to be acquired. The callback method of onCaptureCompleted() is used to indicate that the current photo frame has been acquired. The callback method of onCaptureCompleted() carries a second flag. The second flag is used to instruct the camera HAL to display a preview thumbnail.
[0216] S1115. The camera HAL sends a start callback for the first photo frame to the camera service.
[0217] Specifically, when the camera HAL starts to acquire the photo frame, it means that the camera HAL has started to acquire the first photo frame. Therefore, the camera HAL can send a start callback of the first photo frame to the camera service to notify the camera application that the photo frame has been acquired, so that the camera application can start to acquire the preview thumbnail.
[0218] In one implementation, the camera HAL may perform a callback through the onCaptureStarted() method of the first photographing frame to implement the start callback of the first photographing frame.
[0219] S1116: When the camera service receives the start callback of the first photo frame sent by the camera HAL, the camera service sends the start callback of the first photo frame to the camera application.
[0220] S1117: When the camera application receives the start callback of the first photo frame sent by the camera service, the camera application sends a request to obtain a preview thumbnail to the service host.
[0221] In some embodiments, after receiving the start callback of the first photo frame sent by the service host, the camera application can determine that the camera HAL has obtained the photo frame captured by the camera. Therefore, the camera application can send a request to obtain a preview thumbnail to the service host so that the service host can determine the preview thumbnail from at least one target preview frame. In this way, the acquisition time of the preview thumbnail can be delayed, reducing the occurrence of incomplete photo frame acquisition due to the too fast display speed of the preview thumbnail, improving the image quality of the photo image, and thus improving the user's photo experience.
[0222] In one implementation, upon receiving a start callback of the first photo frame sent by the service host, the camera application may call the requestPreviewImage interface to send a request for obtaining a preview thumbnail to the filter preview module of the service host.
[0223] S1118. When receiving a request for obtaining a preview thumbnail sent by the camera application, the service host determines a preview thumbnail from at least one obtained target preview frame.
[0224] The at least one target preview frame refers to a preview frame acquired by the camera HAL when the camera application receives a photo-taking operation.
[0225] It can be understood that since the above-mentioned preview thumbnail is determined from at least one target preview frame, and the at least one target preview frame is a preview frame collected after the mobile phone receives the photo operation, that is, the collection time of the target preview frame is the same as the collection time of the photo frame, so that the display time of the preview thumbnail is closer to the collection completion time of the photo frame. In this way, the image quality of the preview thumbnail can be ensured, the difference between the preview thumbnail and the photo image is reduced, and the consistency between the preview thumbnail and the photo image is better, thereby improving the user experience.
[0226] In one implementation, after receiving a request for obtaining a preview thumbnail sent by a camera application, the filter preview module of the service host may set the flag to a first value, wherein the flag being the first value may indicate that the service host has obtained a preview thumbnail.
[0227] In some cases, the service host may use any target preview frame of at least one target preview frame as a preview thumbnail.
[0228] In other cases, the service host may use the first target preview frame in the at least one target preview frame acquired after the request receiving time as the preview thumbnail, wherein the request receiving time is the time when the service host receives the request for acquiring the preview thumbnail.
[0229] Specifically, when the filter preview module of the service host receives the first target preview frame obtained after the request receiving time, if the above flag is the first value, it means that the filter preview module has obtained the preview thumbnail. Therefore, the filter preview module of the service host can send the first target preview frame as the preview thumbnail to the camera application.
[0230] Exemplarily, the filter preview module of the service host may copy the first target preview frame. Afterwards, the filter preview module of the service host may send the copied first target preview frame as a preview thumbnail to the camera application.
[0231] S1119: When the camera HAL receives a photo request sent by the camera service, it determines whether the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm.
[0232] Specifically, after receiving the photo request sent by the camera service, the camera HAL can determine the target display timing corresponding to the target shooting mode according to the image processing algorithm corresponding to the target shooting mode carried in the photo request. It can be understood that since the target display timing of the preview thumbnail is determined based on the image processing algorithm corresponding to the target shooting mode, that is, the target display timing corresponding to different target shooting modes is different. In this way, while ensuring the photo effect, the target display timing of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0233] In some embodiments, the camera HAL can determine whether the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm. If the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, it means that the image processing algorithm corresponding to the target shooting mode only needs one frame of photo frames to generate a photo image, that is, the camera HAL can quickly complete the acquisition of photo frames. Therefore, the camera HAL can execute S1120 to send the end callback of the first photo frame to the camera application to notify the camera application that the first photo frame has been acquired, so that the camera application can display the preview thumbnail after the first image frame is acquired. That is, the target display timing of the preview thumbnail is determined to be after the first photo frame is acquired. In this way, even if the user moves the phone while the phone is capturing photo frames, the camera HAL will not capture other photo frames after acquiring the first photo frame. Therefore, it can ensure that the captured photo frames will not be blurry. In other words, the possibility of the user moving the phone while the camera HAL is capturing photo frames due to the phone displaying the preview thumbnail too early is reduced. This improves the capture accuracy of the photo frames, provides a basis for the subsequent generation of high-quality photo images, and enables the photo images to restore image details and clarity, thereby improving the user's photo experience.
[0234] In other embodiments, if the image processing algorithm corresponding to the target shooting mode is not a single-frame algorithm, that is, the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, it means that the image processing algorithm corresponding to the target shooting mode requires multiple frames to generate a photographic image, that is, the mobile phone needs a long time to collect photographic frames. Therefore, the camera HAL can execute S1121 to further determine the target display timing of the preview thumbnail. In this way, while ensuring the photographic effect, the target display timing of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0235] S1120: When the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, after acquiring the first shooting frame, the camera HAL sends an end callback of the first shooting frame to the camera service.
[0236] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to a single-frame algorithm, it means that the service host only needs one frame to generate a photographic image. Therefore, after obtaining the first frame of the photographic frame, the camera HAL can directly send the end callback of the first frame of the photographic frame to the camera service. Among them, the end callback is used to indicate that the first frame of the photographic frame has been acquired. In this way, the situation in which the user moves the mobile phone during the process of collecting photographic frames due to the premature display of the preview thumbnail by the mobile phone can be reduced, the acquisition accuracy of the photographic frame is improved, and the basis for the subsequent generation of high-quality photographic images is provided, so that the photographic image can restore the image details and image clarity, thereby improving the user's photography experience.
[0237] In one implementation, the camera HAL may report the second flag to the camera application through the onCaptureCompleted() method of the first photo frame.
[0238] S1121. When the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, the camera HAL determines whether the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm.
[0239] Specifically, after determining that the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, the camera HAL may continue to determine whether the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm. The exposure compensation algorithm refers to adjusting the exposure parameters of the mobile phone camera to achieve the purpose of adjusting the brightness of the image frame.
[0240] In some embodiments, if the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to an exposure compensation algorithm, it means that the photographic image generated by the service host will be affected by the change of ambient light, that is, the service host needs more photographic frames to generate a photographic image that is not affected by ambient light. Therefore, the camera HAL can execute S1122 to send the end callback of the last photographic frame to the camera application to notify the camera application that the last photographic frame has been obtained, so that the camera application can display the preview thumbnail after the last image frame is obtained. That is, the target display timing of the preview thumbnail is determined to be after the last photographic frame is acquired. In this way, even if the mobile phone plays the photographic flash black animation during the display of the preview thumbnail, since the photographic flash black animation is played after the last photographic frame is acquired, it can ensure that the photographic frame acquired by the camera HAL will not be affected by the change of ambient light, that is, it can reduce the occurrence of the photographic frame acquired by the camera HAL being affected by the change of ambient light due to the playing of the photographic flash black animation when the mobile phone displays the preview thumbnail, thereby improving the acquisition accuracy of the photographic frame, providing a basis for the subsequent generation of high-quality photographic images, so that the photographic image can restore the image details and image clarity, thereby improving the user's photographic experience.
[0241] In other embodiments, if the image processing algorithm corresponding to the target shooting mode does not belong to the exposure compensation algorithm, it means that the photographic image generated by the service host will not be affected by the change of ambient light, that is, the service host only needs a small number of photographic frames to generate a photographic image that is not affected by ambient light. Therefore, the camera HAL can execute S1123, that is, according to the total number of frames of the image processing algorithm and the preset rules, determine the target photographic frame from other photographic frames, so as to determine the target display timing of the preview thumbnail after the target photographic frame is collected. In this way, while ensuring the photographic effect, the target display timing of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience.
[0242] S1122: When the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, after acquiring the last shooting frame, the camera HAL sends an end callback of the last shooting frame to the camera service.
[0243] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to the exposure compensation algorithm, it means that the service host has more photo frames to generate a photo image that is not affected by ambient light. Therefore, the camera HAL can send an end callback of the first photo frame to the camera service after acquiring the first photo frame. Among them, the end callback is used to indicate that the last photo frame has been acquired, that is, the camera HAL has acquired all the photo frames. In this way, the situation in which the photo frames collected by the mobile phone are affected by changes in ambient light due to the flashing black animation when the mobile phone displays the preview thumbnail can be reduced, the acquisition accuracy of the photo frames is improved, and the basis is provided for the subsequent generation of high-quality photo images, so that the photo images can restore the image details and image clarity, thereby improving the user's photo experience.
[0244] In one implementation, the camera HAL may report the second flag to the camera application through the onCaptureCompleted() method of the last image frame.
[0245] S1123: When the image processing algorithm corresponding to the target shooting mode does not belong to the exposure compensation algorithm, the camera HAL determines the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and a preset rule.
[0246] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode does not belong to the exposure compensation algorithm, it means that the service host only needs a small number of photo frames to generate a photo image that is not affected by ambient light. Therefore, the camera HAL can determine the target photo frame from other photo frames according to the total number of frames of the image processing algorithm and preset rules. Among them, other photo frames refer to photo frames other than the first photo frame and the last photo frame obtained by the camera HAL.
[0247] In some embodiments, the preset rule may be to use the Nth image frame captured by the mobile phone as the target photo frame. Wherein, N may be the ratio between the total number of frames of the image processing algorithm and the preset value rounded. In this way, the mobile phone may be triggered to refresh the preview thumbnail during the process of capturing the photo frame, which not only ensures the photo effect of the mobile phone, but also shortens the display time of the preview thumbnail as much as possible, thereby improving the user's photo experience.
[0248] S1124. After acquiring the target photo frame, the camera HAL sends an end callback of the target photo frame to the camera service.
[0249] Specifically, after determining the target photo frame, if the target photo frame is obtained, the camera HAL can send an end callback of the target photo frame to the camera service. The end callback is used to indicate that the target photo frame has been obtained. In this way, the camera application can be triggered to display a preview thumbnail during the process of the camera HAL obtaining the photo frame, which can not only ensure the photo effect of the mobile phone, but also shorten the display time of the preview thumbnail as much as possible, thereby improving the user's photo experience.
[0250] In one implementation, the camera HAL may report the second flag to the camera application through the onCaptureCompleted() callback method of the target image frame.
[0251] S1125. When the camera service receives the end callback sent by the camera HAL, the camera service sends an end callback to the camera application.
[0252] Among them, the above-mentioned second callback can be the end callback of the first frame of the photo frame when the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, or it can be the end callback of the last frame of the photo frame when the image processing algorithm corresponding to the target shooting mode does not belong to the single-frame algorithm but belongs to the exposure compensation algorithm. It can also be the end callback of the target photo frame when the image processing algorithm corresponding to the target shooting mode is neither a single-frame algorithm nor an exposure compensation algorithm.
[0253] S1126: When the camera application receives the end callback sent by the camera service, the camera application displays the preview thumbnail in the shooting preview interface.
[0254] It can be understood that after receiving the above-mentioned end callback, it means that the target display time of the preview thumbnail is currently in progress. Therefore, the mobile phone can display the preview thumbnail in the shooting preview interface. In this way, while ensuring the photographic effect, the target display time of the preview thumbnail can be determined in a targeted manner to shorten the display time of the preview thumbnail as much as possible and improve the user's shooting experience. In some cases, if the image processing algorithm corresponding to the target shooting mode belongs to a single-frame algorithm, the camera application can refresh the preview thumbnail in the shooting preview interface when receiving the end callback of the first frame of the photographic frame. In this way, the situation in which the user moves the mobile phone during the process of collecting the photographic frame due to the premature display of the preview thumbnail by the mobile phone can be reduced, the acquisition accuracy of the photographic frame is improved, and the basis for the subsequent generation of high-quality photographic images is provided, so that the photographic image can restore the image details and image clarity, thereby improving the user's photographic experience.
[0255] In other cases, if the image processing algorithm corresponding to the target shooting mode is not a single-frame algorithm, and the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, the camera application can refresh the preview thumbnail in the shooting preview interface and play the flash-to-black animation in the shooting preview interface when receiving the end callback of the last frame of the photo. The flash-to-black animation refers to the situation where a black screen quickly flashes across the display of the shooting preview interface and then the shooting preview interface is redisplayed. In this way, the preview thumbnail is refreshed and the flash-to-black animation is played only when the last frame of the photo is collected, thereby reducing the situation where the photo frames collected by the mobile phone are affected by changes in ambient light when the mobile phone plays the flash-to-black animation of the photo, improving the acquisition accuracy of the photo frames, and thus providing a basis for the subsequent better generation of photo images.
[0256] In some cases, if the mobile phone is equipped with a shutter interactive effect, after the shutter interactive effect ends, the camera application can refresh the preview thumbnail in the shooting preview interface. In this way, by delaying the display time of the preview thumbnail, the display time of the preview thumbnail is close to the completion time of the acquisition of the photo frame, which can meet the display mechanism of the shutter interactive effect, so that the mobile phone can display the preview thumbnail after all the photo frames are acquired, and the loss of the photo frame due to the early end of the shutter interactive effect is less likely to occur, which provides a basis for the subsequent better display of the photo image.
[0257] It should be noted that the camera HAL sends the start callback of the first photo frame to the camera application so that the camera application triggers the service host to determine the preview thumbnail process, and the camera HAL determines the end callback to send the end callback to the camera application. The process can be performed simultaneously or in sequence. For example, the mobile phone can perform steps S1114~S1118 and S1119~S1126 at the same time.
[0258] S1127, the camera HAL finishes acquiring the photo frame.
[0259] In some embodiments, when the number of picture frames acquired by the camera HAL reaches the total number of frames of the image processing algorithm, the camera HAL may continue to acquire picture frames, that is, end the acquisition of picture frames.
[0260] S1128. The camera HAL sends the photo-taking result to the camera service.
[0261] Specifically, after the image frame is acquired, the camera HAL may send a photographing result to the camera service. The photographing result may include at least one photographing frame and photographing parameters of each photographing frame. The photographing parameters may include exposure time, ISO, focal length, etc.
[0262] Exemplarily, the above-mentioned photographing result may be a process capture result (process_capture_result).
[0263] S1129. When the camera service receives the photographing result sent by the camera HAL, the camera service saves the photographing result into the queue buffer area.
[0264] Specifically, after receiving the photographing result sent by the camera HAL, the photographing result may be saved in a queue buffer, so that the service host can subsequently generate a target thumbnail and a photographed image.
[0265] S1130. The camera service sends a queue buffer to the service host.
[0266] S1131. When the service host receives the queue buffer sent by the camera service, it generates a target thumbnail according to at least one photographed frame in the queue buffer.
[0267] Specifically, after receiving the queue buffer sent by the camera service, the service host can generate a target thumbnail according to at least one photographed frame in the queue buffer, wherein the acquisition time of the target thumbnail is later than the acquisition time of the preview thumbnail.
[0268] In some embodiments, if the image processing algorithm corresponding to the above-mentioned target shooting mode belongs to a single-frame algorithm, the service host can process the first captured frame to obtain a target thumbnail. If the image processing algorithm corresponding to the target shooting mode does not belong to a single-frame algorithm, that is, the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm, the service host can fuse at least two captured frames to obtain a target thumbnail.
[0269] S1132. The service host sends the target thumbnail to the camera application.
[0270] In one implementation, the service host may send the target thumbnail to the camera application through the onImageAvailable() method.
[0271] S1133: When the camera application receives the target thumbnail sent by the service host, the camera application displays the target thumbnail in the shooting preview interface.
[0272] Specifically, after receiving the target thumbnail sent by the service host, the camera application can display the target thumbnail in the shooting preview interface, that is, replace the preview thumbnail displayed in the shooting preview interface with the target thumbnail. It can be understood that since the target thumbnail is determined based on at least one frame of the photo frame, and the preview thumbnail is determined based on a single frame of the preview frame, the image quality of the preview frame is lower than the image quality of the photo frame. In other words, the image quality of the target thumbnail will be higher than the image quality of the preview thumbnail. Therefore, the camera application replaces the preview thumbnail displayed in the shooting preview interface with the target thumbnail, which can improve the display effect of the thumbnail and thereby improve the user's visual experience.
[0273] S1134. The service host processes at least one photographic frame in the queue buffer according to an image processing algorithm corresponding to the target shooting mode to obtain a photographic image.
[0274] Specifically, after receiving the queue buffer area sent by the camera service, the service host can also process at least one frame of the photo frame in the queue buffer area according to the image processing algorithm corresponding to the above-mentioned target shooting mode, so as to obtain a photo image. The photo image is a photo frame obtained after image processing. The acquisition time of the photo image is later than the acquisition time of the target thumbnail.
[0275] S1135. The service host sends the photographed image to the camera application.
[0276] S1136. When the camera application receives the photographed image sent by the service host, it displays a thumbnail of the photographed image in the shooting preview interface.
[0277] Specifically, after receiving the photographed image sent by the service host, the camera application can display a thumbnail of the photographed image in the shooting preview interface, that is, replace the target thumbnail displayed in the shooting preview interface with the thumbnail of the photographed image. It can be understood that since the target thumbnail is an image frame obtained without an image processing algorithm, and the photographed image is a photographed frame obtained through an image processing algorithm. In other words, the image quality of the photographed image will be higher than the image quality of the target thumbnail. Therefore, the camera application replaces the target thumbnail displayed in the shooting preview interface with the thumbnail of the photographed image, which can improve the display effect of the thumbnail and thus improve the user's visual experience.
[0278] It should be understood that the corresponding steps executed by each module in the mobile phone may also be executed by other modules in the mobile phone. For example, the process of the camera HAL determining the image processing algorithm corresponding to the target shooting mode may be executed by the service host, which is not specifically limited.
[0279] In some embodiments, the present application provides a computer-readable storage medium, including computer instructions, which, when executed on an electronic device, enable the electronic device to execute the method described above.
[0280] In some embodiments, the present application provides a computer program product. When the computer program product is run on an electronic device, the electronic device executes the method as described above.
[0281] Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0282] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, 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.
[0283] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0284] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0285] 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 readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0286] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
Claims
1. A method for displaying thumbnails, characterized in that: Applied to electronic equipment, the method comprises: The electronic device displays a shooting preview interface; In the target shooting mode, in response to a photographing operation, the electronic device starts to collect photographing frames and target preview frames, wherein the photographing frames are used to generate photographing images; After the first photographing frame is acquired, the electronic device determines a preview thumbnail from at least one acquired target preview frame; The electronic device displays the preview thumbnail in a shooting preview interface according to the target display timing corresponding to the target shooting mode.
2. The method according to claim 1, characterized in that: When the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the target display timing corresponding to the target shooting mode is after the first frame of the photographic frame is acquired; wherein the single-frame algorithm is used to characterize that the photographic image is generated based on one frame of the photographic frame.
3. The method according to claim 1, characterized in that When the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm and the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, the target display timing corresponding to the target shooting mode is after the last photo frame is captured; wherein, the multi-frame algorithm is used to characterize that the photographed image is generated based on multiple frames of the photographed frames.
4. The method according to claim 1, characterized in that: When the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm and does not belong to an exposure compensation algorithm, the target display timing corresponding to the target shooting mode is after the target photo frame is captured; wherein, the target photo frame is a photo frame determined from other photo frames according to the total number of frames of the image processing algorithm and preset rules, and the other photo frames are photo frames other than the first photo frame and the last photo frame.
5. The method according to claim 4, characterized in that The preset rule includes taking the collected Nth photo frame as the target photo frame; wherein N is the integer ratio between the total number of frames of the image processing algorithm and a preset value.
6. The method according to any one of claims 1 to 5, characterized in that In response to the photographing operation, the electronic device starts to collect photographing frames and target preview frames, including: In response to the photo-taking operation, the electronic device displays a shutter interaction effect; wherein the shutter interaction effect is used to prompt that a photo-taking process is in progress; During the process of displaying the shutter interaction dynamic effect, the electronic device starts to collect the photo frame and the target preview frame; The electronic device displays the preview thumbnail in a shooting preview interface according to the target display timing corresponding to the target shooting mode, including: The electronic device displays the preview thumbnail in a shooting preview interface according to the target display timing corresponding to the target shooting mode, and the shutter interactive animation effect ends display.
7. The method according to any one of claims 1 to 5, characterized in that The electronic device displays the preview thumbnail in a shooting preview interface according to the target display timing corresponding to the target shooting mode, including: The electronic device displays the preview thumbnail in a shooting preview interface according to the target display timing corresponding to the target shooting mode, and plays a flash-to-black animation when shooting.
8. The method according to any one of claims 1 to 5, characterized in that The method further comprises: After the electronic device finishes collecting the photographing frames, it obtains the target thumbnail according to the collected at least one photographing frame; The electronic device displays the target thumbnail in the shooting preview interface.
9. The method according to claim 8, characterized in that After the electronic device finishes collecting the photo frame, the method further includes: The electronic device processes the at least one photographic frame according to an image processing algorithm corresponding to the target photographing mode to obtain the photographic image; The electronic device displays a thumbnail of the photographed image in a shooting preview interface.
10. The method according to any one of claims 1 to 5, characterized in that The method further comprises: After the electronic device finishes collecting the photographing frames, it obtains the target thumbnail according to the collected at least one photographing frame; In a case where the acquisition time of the target thumbnail is earlier than the determination time of the preview thumbnail, the electronic device displays the target thumbnail in the shooting preview interface.
11. The method according to any one of claims 1 to 5, characterized in that The electronic device includes a camera application and a camera hardware abstraction layer HAL. In response to a photo-taking operation, the electronic device starts to collect photo frames and target preview frames, including: In response to a photo taking operation, the camera application sends a photo taking request to the camera HAL; Upon receiving the photo request sent by the camera application, the camera HAL starts acquiring photo frames and target preview frames; After the first photographing frame is acquired, the electronic device determines a preview thumbnail from at least one acquired target preview frame, including: When the camera HAL obtains the first photo frame, the camera HAL sends a start callback of the first photo frame to the camera application; When receiving the start callback of the first photo frame sent by the camera HAL, the camera application determines the preview thumbnail from the acquired at least one target preview frame.
12. The method according to claim 11, characterized in that The electronic device further includes a service host, and in response to the photo-taking operation, the camera application sends a photo-taking request to the camera HAL, including: In response to a photographing operation, the camera application applies to the service host for creating a photographing session; In the case where a photographing session is established between the camera application and the service host, the camera application obtains photographing information from the service host; wherein the photographing information includes an image processing algorithm corresponding to a target photographing mode; The camera application sends a photo request to the camera HAL; wherein the photo request carries the photo information; The method further comprises: When receiving the photographing request sent by the camera application, the camera HAL determines the target display timing corresponding to the target photographing mode according to the image processing algorithm corresponding to the target photographing mode carried in the photographing request.
13. The method according to claim 12, characterized in that The camera HAL determines the target display timing corresponding to the target shooting mode according to the image processing algorithm corresponding to the target shooting mode carried in the photo request, including: When the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, after acquiring the first shooting frame, the camera HAL sends an end callback of the first shooting frame to the camera application; When receiving the end callback of the first photo frame sent by the camera HAL, the camera application determines that the target display timing corresponding to the target shooting mode is after the first photo frame is collected.
14. The method according to claim 12, characterized in that The camera HAL determines the target display timing corresponding to the target shooting mode according to the image processing algorithm corresponding to the target shooting mode carried in the photo request, including: In the case where the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, if the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, after acquiring the last shooting frame, the camera HAL sends an end callback of the last shooting frame to the camera application; When the camera application receives the end callback of the last photo frame sent by the camera HAL, it determines that the target display timing corresponding to the target shooting mode is after the last photo frame is collected.
15. The method according to claim 12, characterized in that The camera HAL determines the target display timing corresponding to the target shooting mode according to the image processing algorithm corresponding to the target shooting mode carried in the photo request, including: In the case where the image processing algorithm corresponding to the target shooting mode belongs to a multi-frame algorithm, if the image processing algorithm corresponding to the target shooting mode does not belong to an exposure compensation algorithm, the camera HAL determines the target shooting frame from other shooting frames according to the total number of frames of the image processing algorithm and a preset rule; wherein the other shooting frames are shooting frames other than the first shooting frame and the last shooting frame; After acquiring the target photo frame, the camera HAL sends an end callback of the target photo frame to the camera application; When receiving the end callback of the target photo frame sent by the camera HAL, the camera application determines that the target display timing corresponding to the target shooting mode is after the target photo frame is collected.
16. An electronic device, characterized in that: The electronic device includes a camera, a memory and one or more processors; the camera, the memory and the processor are coupled; the camera is used to capture image frames, the memory is used to store computer program codes, and the computer program codes include computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 15.
17. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 15.
18. A computer program product, characterized in that The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 15.
Citation Information
Patent Citations
Photographing method and apparatus, terminal and computer readable storage medium
CN108495050A
Shooting processing method and device, electronic equipment and storage medium
CN115002332A
Image display method and device, electronic equipment and storage medium
CN118828184A
Shooting method and electronic equipment
CN118870186A