Thumbnail display method and electronic device
By displaying the preview thumbnail after the first frame of the photo frame is collected and the display timing is determined according to the target shooting mode, the poor image quality caused by the rapid generation of thumbnails by electronic devices is solved, and the quality of the photo image and user experience are improved.
Patent Information
- Application Number
- CN202510062896.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-08-08
- Estimated Expiration
- 2045-01-15
AI Technical Summary
In the prior art, electronic devices can easily lead to incomplete acquisition of photo frames in the process of quickly generating thumbnails, affecting image quality, and thus reducing the user's photo experience.
Only after the first frame of photography frame is collected, the electronic device displays the preview thumbnail in the shooting preview interface, and determines the target display timing according to the target shooting mode, ensures that the display time of the preview thumbnail is close to the acquisition completion time of the photography frame, and reduces the incomplete acquisition of the photography frame caused by too fast display speed.
It improves the image quality of the photo taken and the user's photo experience, ensures the consistency between the preview thumbnail and the photo taken, reduces the difference, and improves the user's user experience.
Smart Images

Figure CN119545171B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to a thumbnail display method and electronic device. Background Art
[0002] With the continuous development of electronic devices, the camera functions of electronic devices (such as mobile phones) have also rapidly improved. More and more users prefer to use their mobile phones to capture images (such as photos or videos). During the camera process, electronic devices can display camera animations and quickly generate thumbnails to display in the preview interface. Therefore, how to quickly generate thumbnails while ensuring the image quality of the captured images to improve the user's photography 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 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, applicable to an electronic device. In this method, while a shooting preview interface is displayed, if a shooting operation is detected in a target shooting mode, the electronic device may begin capturing shooting frames. The shooting frames are used to generate a shooting image. After capturing the first shooting frame, the electronic device may determine a preview thumbnail from at least one target preview frame. The electronic device may then display the preview thumbnail in the shooting preview interface according to a target display timing corresponding to the target shooting mode.
[0006] In an embodiment of the present application, the electronic device displays the preview thumbnail in the shooting preview interface only after the first frame is captured, rather than directly displaying the preview thumbnail in the shooting preview interface after detecting a shooting operation. By delaying the display of the preview thumbnail, the occurrence of incomplete capture frames due to excessively fast preview thumbnail display speed can be reduced, thereby improving the image quality of the captured image and thereby enhancing the user's shooting experience. Furthermore, since the target display timing of the preview thumbnail is determined based on the target shooting mode, different target shooting modes require different numbers of frames to be captured and the required duration for the shooting process. Consequently, different target shooting modes correspond to different target display timings. This allows the target display timing of the preview thumbnail to be determined in a targeted manner while ensuring the desired shooting effect, thereby minimizing the display time of the preview thumbnail and improving the user's shooting experience.
[0007] Furthermore, because the preview thumbnail is determined from at least one target preview frame, and this target preview frame is captured after the electronic device receives a capture operation, the capture period of the target preview frame corresponds to the capture period of the capture frame. This ensures that the display time of the preview thumbnail is closer to the time when the capture of the capture frame is completed. This ensures the image quality of the preview thumbnail, reduces the difference between the preview thumbnail and the captured image, and achieves better consistency between the preview thumbnail and the captured image, 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 is a single-frame algorithm, it means that the electronic device only needs to collect one frame to generate a photo image. Therefore, the mobile phone is triggered to display a preview thumbnail only when it is determined that the collection of the first frame is completed. In this way, even if the user moves the electronic device while the mobile phone is collecting photo frames, since the electronic device will not collect other photo frames after collecting the first frame, 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 while the electronic device is collecting photo frames due to the electronic device displaying the preview thumbnail too early, improves the collection accuracy of the photo frames, 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 further include: when 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, 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 a photographic image that is 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-to-black animation during the display of the preview thumbnail, since the photographic flash-to-black animation is played after the last photographic frame is captured, it can ensure that the photographic frames captured by the electronic device will not be affected by changes in ambient light, that is, it can reduce the occurrence of the photographic frames captured by the electronic device being affected by changes in ambient light, improve the acquisition accuracy of the photographic frames, and provide 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 one possible implementation of the first aspect, the process of the electronic device determining a target display timing corresponding to the target shooting mode may further include: if the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, and if the image processing algorithm corresponding to the target shooting mode is not an exposure compensation algorithm, the electronic device may determine the target shooting frame from other shooting frames based on the total number of frames of the image processing algorithm and a preset rule. The electronic device may then determine the target display timing of the preview thumbnail to be after the target shooting frame is captured.
[0013] In an embodiment of the present application, if the image processing algorithm corresponding to the target shooting mode does not include an exposure compensation algorithm, the image generated by the electronic device will not be affected by changes in ambient light. In other words, the electronic device only needs a small number of frames to generate an image that is not affected by ambient light. Therefore, the electronic device can determine the target frame from other frames based on the total number of frames of the image processing algorithm and preset rules, and only display the preview thumbnail in the shooting preview interface of the camera application after the target frame is acquired. In this way, while ensuring the display effect of the preview thumbnail, the time to obtain the preview thumbnail is 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 using the Nth captured frame as the target frame, where N is the integer of the ratio between the total number of frames of the image processing algorithm and a preset value.
[0015] In the embodiment of the present application, when the electronic device captures a photo frame, it triggers the electronic device to refresh and display the preview thumbnail. This not only ensures the photo quality of the electronic device, but also shortens the display time of the preview thumbnail as much as possible, improving the user's photo experience.
[0016] In one possible implementation of the first aspect, the process of the electronic device capturing a photo frame and a target preview frame may specifically include: in response to a photo operation, the electronic device displaying a shutter interaction animation. The shutter interaction animation is used to indicate that a photo is being taken. Subsequently, while displaying the shutter interaction animation, the electronic device begins capturing the photo frame and the target preview frame. Subsequently, the electronic device displays a preview thumbnail on a shooting preview interface, and the shutter interaction animation ends.
[0017] In an embodiment of the present application, if 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 close to the completion time of the acquisition of the photo frame, which can meet the display mechanism of the shutter interactive effect. The electronic device can display the preview thumbnail after all the photo frames are acquired, which reduces the possibility of photo frames being lost due to the early end of the shutter interactive effect, and provides a basis for better display of the subsequent photo image.
[0018] In a possible implementation of the first aspect, the process of the electronic device displaying the preview thumbnail may specifically include: the electronic device may display the preview thumbnail in the shooting preview interface, and play a flash-to-black animation when taking a photo.
[0019] In an embodiment of the present application, in response to a photo operation, the electronic device can simultaneously display a preview thumbnail and play a flash-to-black animation. This delay in displaying the preview thumbnail reduces the likelihood that the captured photo frames will be affected by ambient light changes while the electronic device is playing the flash-to-black animation, thereby improving the capture accuracy of the photo frames and providing a foundation for subsequent better generation of the photo image.
[0020] In a possible implementation 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 the shooting preview interface.
[0021] In the embodiment of the present application, since the target thumbnail is determined based on at least one captured frame, and the preview thumbnail is determined based on a single preview frame, the image quality of the preview frame is lower than that of the captured frame. In other words, the image quality of the target thumbnail is higher than that of the preview thumbnail. Therefore, by replacing the preview thumbnail displayed in the shooting preview interface with the target thumbnail, the electronic device can improve the display quality of the thumbnails, thereby enhancing the user's visual experience.
[0022] In one possible implementation of the first aspect, after the electronic device completes capturing 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. The electronic device may then 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 undergoing an image processing algorithm, while the photographic image is a photographic frame obtained with an image processing algorithm, the image quality of the photographic image is higher than that 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 quality of the thumbnails and thus enhance the user's visual experience.
[0024] In a possible implementation 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 an 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. In other words, 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 one 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 thumbnail display area and a photo control. Subsequently, in response to a user triggering an operation on the photo control in the shooting preview interface, the electronic device may begin capturing a photo frame and a target preview frame. Thereafter, the electronic device may display a shooting preview thumbnail in the thumbnail display area of the shooting preview interface.
[0027] In a possible implementation of the first aspect, the electronic device may further include a camera HAL. The process of the electronic device determining a preview thumbnail may specifically include: in response to a photo operation, a camera application may send a photo request to the camera HAL. Subsequently, upon receiving the photo request sent by the camera application, the camera HAL may begin acquiring photo frames and target preview frames. Subsequently, upon acquiring the first photo frame, the camera HAL may send a first photo frame start callback to the camera application. Subsequently, upon receiving the first photo frame start callback sent by the camera HAL, the camera application may determine a preview thumbnail from the acquired at least one target preview frame.
[0028] In the embodiment of the present application, the camera application determines that the camera HAL has acquired the camera-captured frames only after receiving the start callback for the first capture frame. Therefore, the camera application can determine the preview thumbnail from at least one target preview frame. This delays the acquisition of the preview thumbnail, reduces the occurrence of incomplete capture frames due to excessive preview thumbnail display speed, improves the image quality of the captured image, and thus enhances the user's photography experience. Furthermore, since the preview thumbnail is determined from at least one target preview frame, and the at least one target preview frame is captured after the electronic device receives a capture operation, the capture duration of the target preview frame is the same as the capture duration of the capture frame. This ensures that the display time of the preview thumbnail is closer to the completion time of the capture of the capture frame. This ensures the image quality of the preview thumbnail, reduces the difference between the preview thumbnail and the captured image, and improves the consistency between the preview thumbnail and the captured image, thereby enhancing the user experience.
[0029] In a possible implementation of the first aspect, the electronic device may further include a service host. 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-taking operation, the camera application may request the service host to create a photo-taking session. Thereafter, when a photo-taking session is established between the camera application and the service host, the camera application may obtain photo-taking information from the service host. The photo-taking information includes an image processing algorithm corresponding to the target shooting mode. Thereafter, the camera application may send a photo-taking request to the camera HAL. The photo-taking request carries the photo-taking information. Thereafter, upon receiving the photo-taking request sent by the camera application, the camera HAL may determine the target display timing corresponding to the target shooting mode based on the image processing algorithm corresponding to the target shooting mode carried in the photo-taking request.
[0030] In the embodiment of the present application, 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 for different target shooting modes is different. This allows the target display timing of the preview thumbnail to be determined in a targeted manner while ensuring the shooting effect, thereby minimizing the display time of the preview thumbnail and improving the user's shooting experience.
[0031] In one 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: if the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the camera HAL may send a first-frame completion callback to the camera application after acquiring the first picture frame. Subsequently, upon receiving the first-frame completion callback sent by the camera HAL, the camera application may determine that the target display timing corresponding to the target shooting mode is after acquiring the first picture frame.
[0032] In an embodiment of the present application, if the image processing algorithm corresponding to the target capture mode is a single-frame algorithm, this indicates that the image processing algorithm corresponding to the target capture mode only requires one capture frame to generate a captured image. This means that the camera HAL can quickly complete the capture of capture frames. Therefore, the camera HAL can send a first capture frame completion callback to the camera application to notify the camera application that the first capture frame has been captured, enabling the camera application to display a preview thumbnail after the first image frame has been captured. In other words, the target display timing for the preview thumbnail is determined to be after the first capture frame has been captured. This reduces the likelihood that the user will move the electronic device while the camera HAL is capturing a capture frame due to the electronic device displaying the preview thumbnail prematurely. This improves the capture accuracy of the capture frames, lays the foundation for the subsequent generation of high-quality capture images, and enables the capture images to restore image detail and clarity, thereby enhancing the user's photography 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: if the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, and if the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, the camera HAL may send a last-frame completion callback to the camera application after acquiring the last photo frame. Subsequently, upon receiving the last-frame completion callback sent by the camera HAL, the camera application 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 photo image generated by the service host will be affected by changes in ambient light, that is, the service host needs 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 last photo frame to the camera application to notify the camera application that the last photo 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 photo frame is captured. In this way, the situation where the photo frame acquired by the camera HAL is affected by changes in ambient light due to the photo flash animation played when the electronic device displays the preview thumbnail can be reduced, the acquisition accuracy of the photo frame is improved, and a basis is provided for the subsequent generation of high-quality photo images, so that the photo image can restore image details and image clarity, thereby improving the user's photo 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 further include: if the image processing algorithm corresponding to the target shooting mode is a multi-frame algorithm, and if the image processing algorithm corresponding to the target shooting mode is not an exposure compensation algorithm, the camera HAL may determine the target photo frame from other photo frames based on the total number of frames of the image processing algorithm and preset rules. 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 a target photo frame end callback to the camera application. Thereafter, upon receiving the target photo frame end callback 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 acquired.
[0036] 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 photo image generated by the service host will not be affected by changes in ambient light. In other words, 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 based on the total number of frames of the image processing algorithm and preset rules, thereby determining the target display timing of the preview thumbnail to be after the target photo frame is captured. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the shooting effect, thereby shortening the display time of the preview thumbnail as much as possible and improving 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 code, and the computer program code comprises 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 interaction 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 the front and rear cameras 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 method for displaying thumbnails 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] Figure 9 A schematic diagram showing a shooting preview interface in a high-pixel mode provided in an embodiment of the present application;
[0051] Figure 10 A flowchart of another thumbnail display method provided in an embodiment of the present application;
[0052] Figure 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 accompanying drawings. The terms used in the following embodiments are for the purpose of describing specific embodiments only and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "the," "the," "the," and "the" are intended to include expressions such as "one or more," unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, "at least one" and "one or more" refer to one or more (including two). The term "and / or" is used to describe an association relationship between associated objects, indicating that three possible relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0054] References to "one embodiment" or "some embodiments" etc. described in this specification mean that the specific features, structures or characteristics described in conjunction with the embodiment are included in one or more embodiments of the present application. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing 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 another way. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in another way. The term "connected" includes direct and indirect connections, unless otherwise stated. "First" and "second" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated.
[0055] In the embodiments of this application, words such as "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 this application should not be interpreted as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.
[0056] In some embodiments, an electronic device (such as a mobile phone) may have a shooting function, that is, a user may use the camera application of the electronic device to shoot the current scene, thereby obtaining a photographic image of the current scene and saving it to the gallery application of the electronic device. However, in some cases, in order to enhance the user's shooting experience, the electronic device may provide a thumbnail display area in the preview interface of the camera application to display preview thumbnails. In this way, not only can the user quickly browse photos and improve the user's shooting efficiency, but by triggering the thumbnail display area, the electronic device can directly display an enlarged thumbnail in the album application, making it convenient for the user to quickly view the details of the photo, thereby enhancing the user's experience.
[0057] It is understandable that the above preview thumbnail Figure 1 It is generally obtained based on the preview frames captured by the electronic device. Preview frames refer to the image frames displayed in the preview interface of the camera application, that is, the image frames captured when the electronic device displays the preview interface. During the photo shooting process, the electronic device also captures photo frames. Photo frames are image frames captured by the electronic device when the user's photo shooting operation is detected, and are used to generate the photo image.
[0058] For example, Figure 1 As shown, the phone is displaying Figure 1The main interface shown in (a) of FIG. The main interface may include an icon of a camera application. Then, in response to a user clicking on 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 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 understood that the thumbnail display process is instantaneous. That is, after detecting a user click on the photo control, the electronic device can quickly generate a thumbnail while displaying the photo animation, and display it in the preview interface for the user to browse. However, if the thumbnail display speed is too fast, the electronic device may not capture all the photo frames. In other words, the image quality of the photo may be poor due to incomplete photo frame capture, which in turn affects the user experience.
[0060] The aforementioned excessive thumbnail display speed refers to the speed at which the thumbnail is displayed exceeding the frame output rate of the hardware abstraction layer (HAL) in the electronic device. This means that the HAL layer of the electronic device has not yet generated an image frame when the thumbnail is refreshed. The HAL layer's frame output rate refers to the speed at which the HAL layer sends the photo frame.
[0061] It should be noted that during an electronic device's photo capture process, the time from when a user clicks the photo control to when the thumbnail appears in the thumbnail display area (i.e., shot2see) is typically 200-300 milliseconds (ms). However, because thumbnails are determined based on preview frames captured by the electronic device, which are different from photo frames, the thumbnail display process cannot truly reflect the HAL layer's transmission of photo frames (for example, the HAL layer's frame output time is typically over 400ms). Furthermore, the thumbnail display process is unrelated to the HAL layer's frame output; in other words, the thumbnail display process and the HAL layer's frame output process occur simultaneously. Therefore, if the thumbnail display speed is too fast, it will affect the HAL layer's frame output, and thus, image quality.
[0062] In some cases, if a user trigger operation on the photo control is detected, the electronic device can refresh the displayed thumbnail and display the photo animation effect. Among them, the photo animation effect can be a photo flash black animation. The photo flash black animation refers to the situation where a black screen quickly flashes and then the preview interface is redisplayed when the preview interface is displayed. It can be understood that when the electronic device displays the photo flash black animation, the ambient light of the electronic device will change. For example, if the mobile phone is in the front shooting mode, the thumbnail display speed will be too fast, causing the flash black animation to affect the frame effect. That is, the photo image finally generated by the electronic device will be affected by the change in ambient light, which ultimately affects 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. 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 display Figure 2 The second preview interface shown in (b) of FIG. The second preview interface 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-black animation for taking a photo refers to the process in which the preview frame of the preview interface changes from the flash-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, making the generated image frames 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 electronic device's frame output speed 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 has ended and move the electronic device. This may cause the final generated photo image to be blurred due to the movement of the electronic device during the frame output. In other words, the photo image generated by the electronic device cannot restore the image details and image clarity, ultimately affecting 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 display thumbnail. That is to say, in the process of displaying the shutter interaction effect, the electronic device will not refresh the display thumbnail. Therefore, if the thumbnail display speed is too fast, it will cause the electronic device to end the shutter interaction effect prematurely. At this time, the electronic device will default to 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 drop frames, which will affect the image quality of the photographed image.
[0067] In one example, if the frame output duration of the electronic device is less than the first preset duration, it indicates that the electronic device has a fast frame output speed, that is, the electronic device can quickly acquire 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 displayed thumbnail. In other words, if the frame output duration of the electronic device is less than the first preset duration, the shutter interaction effect is to display the photo flash black animation.
[0068] In another example, if 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, it indicates that the frame output speed of the electronic device is approaching the intermediate speed, that is, the electronic device is able to normally acquire photo frames. The first preset duration is less than the second preset duration. Therefore, when a user clicks on a photo control is detected, the mobile phone can process the photo control to display the processed photo control. Processing the photo control can include grayscale processing (for example, changing the color of the photo control from black to gray) or shape processing (for example, changing the shape of the photo control from a circle to a 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 for the preset display duration and the flash-to-black animation. The preset display duration can be pre-set based on 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. The first preview interface may include a preview frame and a photo control 1A. The photo control 1A is a black control. Afterwards, if the user clicks the photo control 1A in the first preview interface, the 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 display Figure 2 The first preview interface shown in (a) is shown in Figure 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 obtains the photo frame is slow. Therefore, when a user clicks on the photo control, the mobile phone can display a countdown of the preset waiting time. The countdown is used to represent the time until the electronic device obtains the photo frame. The preset waiting time can be preset according to actual conditions. For example, the preset waiting time can be 4 seconds, 5 seconds, etc., and is not specifically limited. Afterwards, when the above-mentioned countdown is 0, that is, the time until the electronic device obtains the photo frame is 0, it means that the electronic device has obtained all the photo frames, and the electronic device can display a photo flash black animation and refresh the displayed thumbnail. That is, when the frame output time of the electronic device is greater than or equal to the second preset time, the shutter interaction effect includes displaying a countdown of the preset waiting time and a photo flash black animation.
[0072] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 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 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 phone may return to displaying Figure 2 The first preview interface shown in (a) is shown in Figure 1. It can be understood that the process of the 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 photographic images and enhance the user's photographic experience, an embodiment of the present application provides a method for displaying thumbnails. In this method, an electronic device displays a shooting preview interface. The shooting preview interface includes a preview frame and a thumbnail display area. Afterwards, in a target shooting mode, in response to a user's photographing operation, the electronic device may start collecting photographic frames. The photographic frames are used to generate photographic images. Afterwards, after collecting the first photographic frame, the electronic device may determine a preview thumbnail from at least one target preview frame collected. Afterwards, the electronic device may display the preview thumbnail in the thumbnail display area according to the target display timing corresponding to the target shooting mode.
[0074] In an embodiment of the present application, the electronic device displays the preview thumbnail in the shooting preview interface only after the first frame is captured, rather than directly displaying the preview thumbnail in the shooting preview interface after detecting a shooting operation. By delaying the display of the preview thumbnail, the occurrence of incomplete capture frames due to excessively fast preview thumbnail display speed can be reduced, thereby improving the image quality of the captured image and thereby enhancing the user's shooting experience. Furthermore, since the target display timing of the preview thumbnail is determined based on the target shooting mode, different target shooting modes require different numbers of frames to be captured and the required duration for the shooting process. Consequently, different target shooting modes correspond to different target display timings. This allows the target display timing of the preview thumbnail to be determined in a targeted manner while ensuring the desired shooting effect, thereby minimizing the display time of the preview thumbnail and improving the user's shooting experience.
[0075] Furthermore, because the preview thumbnail is determined from at least one target preview frame, and this target preview frame is captured after the electronic device receives a capture operation, the capture period of the target preview frame corresponds to the capture period of the capture frame. This ensures that the display time of the preview thumbnail is closer to the time when the capture of the capture frame is completed. This ensures the image quality of the preview thumbnail, reduces the difference between the preview thumbnail and the captured image, and achieves better consistency between the preview thumbnail and the captured image, 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 computer, a laptop computer, 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 Schematic diagram of the hardware structure of the electronic device 200 is shown. 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, cameras 1-N 293, a display 294, and a subscriber identification module (SIM) card interface 1-N 295, etc.
[0078] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[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 processing unit (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). The 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] Electronic device 200 implements display functionality through a GPU, display screen 294, and an application processor. A GPU is a microprocessor for image processing that connects display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or modify 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. In some embodiments, the electronic device 200 may include one or N display screens 294, where N is a positive integer greater than 1. In embodiments of the present application, the display screen 294 may be used to display the camera application's shooting preview interface. This shooting preview interface may include a preview frame captured in real time by the camera, photo controls, and a thumbnail display area.
[0084] The electronic device 200 can implement a shooting function through an ISP, a camera 293, a video codec, a GPU, a display screen 294, and an application processor.
[0085] The ISP processes data fed back by the camera 293. For example, when an electronic device takes a photo, the shutter opens, and light passes through the lens to the camera's photosensitive element (or image sensor). The light signal is converted into an electrical signal, which is then passed to the ISP for processing and transformed into a visible image. The ISP can also perform algorithmic optimization for image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be incorporated into the camera 293. In some embodiments, the camera 293 includes a shutter. The shutter is a device in the camera that controls the duration of light exposure to 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 light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the electronic device 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] For example, 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 front camera 20. Figure 4 The interface (b) in FIG. 3 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: main camera, telephoto camera, wide-angle camera, ultra-wide-angle camera, macro camera, fisheye camera, infrared camera, depth camera and 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 the preview frame that the electronic device begins capturing 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 the photo frame that the electronic device begins capturing when it receives a photo operation.
[0091] For example, the software system of the electronic device 200 can 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 : This is a software structure block diagram of the electronic device 200 of an embodiment of the present application. The various embodiments of the present application will be discussed based on the following technical architecture. In order to facilitate the explanation of the logic, only the business logic relationship is illustrated with a schematic block diagram, without strictly expressing the specific location of the technical architecture where each business is located. In addition, the naming of each module in the software architecture diagram is an illustrative 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] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: applications, application framework, hardware abstraction layer (HAL), and 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 a camera application, a gallery application, or other applications. It is understood that the camera application can be used to trigger an electronic device to capture image frames using a camera. The gallery application can be used to trigger an electronic device to display image frames. The image frames can include preview frames and / or photo frames.
[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] The window manager manages windowed applications. It can obtain the display size, determine whether a status bar is present, lock the screen, and take screenshots. The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.
[0097] The camera service provides an API and programming framework for camera applications. In some embodiments, the camera service can be used to send a capture request to the camera HAL, triggering the HAL to begin capturing the target capture frame. In other embodiments, the camera service can also be used to send a preview request to the camera HAL, triggering the HAL to begin capturing preview frames.
[0098] The service host is part of the camera application framework and can be used to perform image algorithm processing on the preview stream and captured image frames. The preview stream consists of multiple preview frames. In some embodiments, the camera application can obtain thumbnails and captured images through the service host. The thumbnails may include preview thumbnails and / or target thumbnails. In some cases, the preview thumbnail is displayed earlier than the target thumbnail. The target thumbnail is displayed earlier than the captured 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 (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. It includes at least the display driver, camera driver, and sensor driver. The camera driver is the driver layer for camera devices and is primarily responsible for interacting with the camera hardware.
[0101] It is understandable that Figure 5 The layers in the illustrated structure 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, and each layer may include more or fewer components, and this application does not limit this.
[0102] In one implementation, in response to the user's photo-taking 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 a user's start operation. Then, in response to the user's start operation on the camera application, the camera application may submit a preview request to the camera service. Then, upon receiving the preview request sent by the camera application, the camera service sends the preview request to the camera HAL. Then, upon receiving the preview request sent by the camera service, the camera HAL begins to obtain preview frames.
[0104] Afterwards, each preview frame obtained 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. For example, the camera HAL obtains the first preview frame. Afterwards, the camera HAL can 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 can save the first preview frame so that a preview thumbnail can be selected from the preview frames 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 app in the mobile phone receives the user's photo operation. A photo operation refers to a triggering operation on the photo control in the photo preview interface. Subsequently, in response to the user's photo operation, the camera app can request to establish a photo session with the service host. Subsequently, the camera app can obtain photo information from the service host. This photo information can include the image processing algorithm corresponding to the target shooting mode. The target shooting mode refers to the shooting mode corresponding to the mobile phone when the photo operation is received. Subsequently, the camera app can submit a photo request to the camera service. This photo request carries photo information. Subsequently, upon receiving the photo request sent by the camera app, the camera service sends a photo request to the camera HAL. Subsequently, upon receiving the photo request sent by the camera service, the camera HAL begins acquiring photo frames.
[0106] When the camera HAL begins acquiring photo frames, the camera HAL may send a first-frame photo frame callback to the camera application through the camera service. This first-frame photo frame callback indicates that the camera HAL has begun acquiring the first frame. Specifically, when the camera HAL begins acquiring photo frames, the camera HAL may send a first-frame photo frame start callback to the camera service. Subsequently, upon receiving the first-frame photo frame start callback sent by the camera HAL, the camera service sends a first-frame photo frame start callback to the camera application.
[0107] In one implementation, the camera HAL may call back the onCaptureStarted() method of the first captured frame, where the onCaptureStarted() method is used to indicate that the camera HAL has started to capture the captured frame.
[0108] Furthermore, upon receiving the aforementioned photo information, the camera application may send a request to the service host for a preview thumbnail. Subsequently, upon receiving the request, the service host may select any one of the at least one received target preview frames as the preview thumbnail. The at least one target preview frame is the preview frame obtained by the camera HAL when the camera application receives the photo operation. The service host may then send the preview thumbnail to the camera application. The camera application may then refresh 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 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. 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 photo 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 complete, the camera HAL can send a callback indicating the completion of the last photo frame acquisition to the camera application through the camera service. This callback indicates that the camera HAL has completed the acquisition 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 a callback indicating the completion of the last photo frame acquisition to the camera service. Afterwards, upon receiving the callback indicating the completion of the last photo frame acquisition sent by the camera HAL, the camera service sends a callback indicating the completion of the last photo frame acquisition to the camera application.
[0111] In one implementation, the camera HAL may call back the onCaptureCompleted() method of the last captured frame, where the onCaptureCompleted() method is used to indicate that the camera HAL has finished acquiring the captured frame.
[0112] Furthermore, upon completing image frame acquisition, the camera HAL may also send a capture result to the camera service. This capture result may include at least one capture frame and capture parameters for each frame. These capture parameters may include exposure time, ISO sensitivity (ISO), focal length, and so on. Upon receiving the capture result from the camera HAL, the camera service may save the capture result to a queue buffer and send the queue buffer to the service host. Upon receiving the queue buffer from the camera service, the service host may generate a target thumbnail based on the at least one capture frame in the queue buffer. The service host may then send the target thumbnail to the camera application. The camera application may then refresh and display the target thumbnail in the capture preview interface.
[0113] At the same time, upon receiving the queue buffer from the camera service, the service host may process at least one captured frame in the queue buffer according to the image processing algorithm corresponding to the target capture mode to obtain a captured image. The service host may then send the captured image to the camera application. Upon receiving the captured image from the service host, the camera application may refresh the thumbnail of the captured image in the capture preview interface.
[0114] As can be seen, the preview thumbnail above is selected from at least one target preview frame acquired during the camera HAL's acquisition of the capture frame. This means that the camera app receives the preview thumbnail and displays it on the capture preview interface before the camera HAL has acquired all the capture frames. This can result in incomplete capture frames due to the thumbnail display speed being too fast, impacting the image quality and, in turn, 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 photo operation, the mobile phone can start collecting photo frames and target preview frames. After collecting the first photo 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 photo frame acquisition due to the preview thumbnail display speed being too fast can be reduced, the image quality of the photo image is improved, and the user's photo 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 photo operation, that is, the collection time of the target preview frame is the same as the collection time of the photo frame, 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's usage experience. For example, 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 triggers the phone's camera to capture preview frames. For example, the camera can be a front-facing camera or a rear-facing camera, without specific limitations. The phone can use one or more cameras to capture preview frames, without specific limitations.
[0118] In some embodiments, the above-mentioned opening operation can be a triggering operation for the icon of the camera application in the main interface. The triggering operation can be a click operation, etc. Specifically, when the user triggers the icon of the camera application in the main interface, 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. The main interface may include an icon of a camera application. Then, in response to a user clicking on 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 taking control 1A.
[0119] S701: In response to a user's photo-taking operation, the mobile phone starts to collect photo frames and target preview frames.
[0120] Specifically, after detecting that the user has activated the camera application, if a photo-taking operation is detected, the phone may begin capturing photo frames and target preview frames. The photo-taking operation triggers the phone's camera to capture photo frames. Exemplarily, the camera may be a front-facing camera or a rear-facing camera, without specific limitation. The phone may use one or more cameras to capture photo frames, without specific limitation.
[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. For example, see Figure 8 , the phone is displaying Figure 8 The preview interface in photo mode shown in (a) of FIG. The preview interface in photo mode may include a photo control 4A. If the user clicks the photo control 4A, it indicates that the user wants to take a photo of the current scene, that is, the user has triggered the capture operation. Therefore, the phone can capture the current scene in photo mode, triggering the camera to begin capturing the photo frame and the target preview frame.
[0122] In another case, the above-mentioned shooting operation can also be an operation in which the user clicks the photo control in the night scene mode. For example, please refer to Figure 8 , the phone is displaying Figure 8 The preview interface in night mode shown in (b) of FIG. The preview interface in night mode may include a photo control 4B. If the user clicks the photo control 4B, the phone can capture the current scene in night mode, triggering the camera to begin capturing photo frames and target preview frames.
[0123] In another case, the above-mentioned shooting operation can also be an operation in which the user clicks the photo control when the high-pixel mode is turned on. For example, see Figure 9 , the phone is displaying Figure 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 phone can display the preview frame in response to the touch operation. Figure 9 The setting interface shown in (b) of FIG. 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 phone can turn on the high pixel mode in response to the triggering operation. After the high pixel mode is turned on, the phone can display Figure 9 The preview interface in high-pixel mode is shown in (c). The preview interface in high-pixel mode may include a preview frame and a photo control 5A. Subsequently, upon detecting a user triggering control 5A, the phone may capture the current scene in high-pixel mode in response to the triggering operation, triggering the camera to begin capturing 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 the 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 the photo operation.
[0125] In one implementation, when a user's photo-taking operation is detected, the phone may display a shutter interaction effect. The shutter interaction effect is used to indicate that the phone is capturing photo frames. The shutter interaction effect can be pre-set based on its own frame output duration. Thereafter, while the shutter interaction effect is displayed, the phone may begin capturing photo frames and target preview frames. When the shutter interaction effect ends, it indicates that the phone has completed capturing photo frames, and the phone may display the preview thumbnail in the shooting preview interface.
[0126] In one example, if the phone's frame duration is less than a first preset duration, it indicates a fast frame rate, meaning the phone is able to quickly capture the photo frame. Therefore, upon detecting a user's photo operation, the phone can directly display a flash-to-black animation and refresh the preview thumbnail. In other words, if the phone's frame duration is less than the first preset duration, the shutter interaction effect is a flash-to-black animation.
[0127] In another example, if 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, it indicates that the mobile phone's frame output speed is approaching the intermediate speed, meaning that the phone is able to normally acquire photo frames. The first preset duration is less than the second preset duration. Therefore, upon detecting a user's photo operation, the mobile phone can process the photo control to display the processed photo control. Processing the photo control can include grayscale processing (for example, changing the color of the photo control from black to gray) or shape processing (for example, changing the shape of the photo control from round to square), etc. Any modification that can change the display properties of the photo control is not limited to this.
[0128] Afterwards, when the display duration of the processed photo control reaches the preset display duration, the phone can display a flash-to-black animation and refresh the preview thumbnail. In other words, when the phone's frame output duration is greater than or equal to the first preset duration and less than the second preset duration, the shutter interaction effect can include displaying the processed photo control for the preset display duration and the flash-to-black animation. The preset display duration can be pre-set based on actual conditions. For example, the preset display duration can 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. The first preview interface may include a preview frame and a photo control 1A. The photo control 1A is a black control. Afterwards, if the user clicks the photo control 1A in the first preview interface, the 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 display Figure 2 The first preview interface shown in (a) is shown in Figure 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 represent the time from the mobile phone to obtaining the photo frame. The preset waiting time can be preset according to actual conditions. For example, the preset waiting time can be 4 seconds, 5 seconds, etc., and is not specifically limited. Afterwards, when the above-mentioned 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 photo flash black animation and refresh the display thumbnail. That is to say, when the frame output time of the mobile phone is greater than or equal to the second preset time, the shutter interaction effect includes displaying a countdown of the preset waiting time and a photo flash black animation.
[0131] For example, Figure 2 As shown, the phone is displaying Figure 2 The first preview interface shown in (a) of FIG. 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 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 phone may return to displaying Figure 2 The first preview interface shown in (a) is shown in Figure 1. It can be understood that the process of the phone displaying the countdown is equivalent to the process of displaying the shutter interactive effect.
[0132] In some embodiments, when starting to capture photo frames and target preview frames, the mobile phone may determine a preview thumbnail from at least one captured 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 collecting photo frames, if the first photo frame is collected, it means that the mobile phone has started taking photos. The mobile phone can determine a preview thumbnail from at least one collected target preview frame.
[0135] It's understandable that because the preview thumbnail is determined from at least one target preview frame, and that the target preview frame is captured after the electronic device receives a photo action, the capture duration of the target preview frame is the same as the capture duration of the photo frame. This results in the preview thumbnail display time being closer to the capture completion time of the photo frame. This ensures the image quality of the preview thumbnail, reduces the difference between the preview thumbnail and the photo image, and achieves better consistency between the preview thumbnail and the photo image, 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, to improve the display quality of the preview thumbnail, or to ensure its image quality, the phone can use the first target preview frame captured after the first photo frame as the preview thumbnail. In other words, the target preview frame captured the latest is used as the preview thumbnail. This reduces the difference between the preview thumbnail and the photo image, ensuring greater consistency between the preview thumbnail and the photo image, thereby improving the user experience.
[0138] In one implementation, after determining the preview thumbnail, the mobile phone can determine a target display timing for the preview thumbnail based on an image processing algorithm corresponding to the target shooting mode. Specifically, the mobile phone can display the preview thumbnail on the shooting preview interface based on the target display timing corresponding to the target shooting mode. The target shooting mode refers to the shooting mode corresponding to the camera operation received by the mobile phone.
[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 phone can further determine whether the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm. This can determine the timing of obtaining the preview thumbnail, thereby improving the display accuracy of the preview thumbnail and ultimately enhancing the user's shooting experience.
[0142] The single-frame algorithm is an image processing algorithm that only requires a single frame as input to generate a photographic image. In other words, the single-frame algorithm is used to represent a photographic image generated from a single frame. Exemplarily, the single-frame algorithm may include a high-pixel mode remosaic algorithm, etc.
[0143] It is understood that a mobile phone can include multiple image processing algorithms. Subsequently, the phone can invoke different image processing algorithms based on different shooting modes to process the captured frames to meet the user's visual needs. For example, if the shooting mode is night scene mode, the image processing algorithm may be the ultra-night algorithm. For another example, if the shooting mode is high-pixel mode, the image processing algorithm may be the remosaic algorithm. For another example, if the shooting mode is front-facing portrait mode, the image processing algorithm may be the high dynamic range (HDR) algorithm for raw image files (RAW).
[0144] In some embodiments, if the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, this indicates that the image processing algorithm corresponding to the target shooting mode only requires one photo frame to generate a photo image, meaning that the mobile phone can quickly complete the photo frame acquisition process. Therefore, the mobile phone can execute S704, namely, determining that the target display timing is after the first photo frame is acquired. In this way, even if the user moves the phone while the phone is acquiring a photo frame, the phone will not acquire additional photo frames after the first photo frame is acquired, thereby ensuring that the acquired photo frames will not be blurry. This reduces the likelihood of the user moving the phone while the phone is acquiring a photo frame due to the phone displaying a preview thumbnail too early. This improves the accuracy of photo frame acquisition, lays the foundation for the subsequent generation of high-quality photo images, and enables the photo images to restore image detail and clarity, thereby enhancing 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 the photographic image, which means that the mobile phone needs a long time to collect the photographic frames. Therefore, the mobile phone can execute S705 to further determine the target display timing of the preview thumbnail. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the shooting effect, thereby minimizing the display time of the preview thumbnail and improving the user's shooting experience.
[0146] The multi-frame algorithm is an image processing algorithm that requires multiple frames as input to generate a photographic image. In other words, the single-frame algorithm is used to represent a photographic image generated from multiple frames. Exemplary multi-frame algorithms include the RAWHDR algorithm for front-facing portrait mode, the Ultra Night algorithm for night scene mode, and the ArcSoft algorithm for portrait mode.
[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 photo 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 is a single-frame algorithm, it means that the phone only needs to capture one frame to generate a photo image. Therefore, the phone is triggered to display the preview thumbnail only after it is determined that the first frame has been captured. This can reduce the possibility of users moving the phone while the phone is capturing a photo frame due to the phone displaying the preview thumbnail too early, improve the capture accuracy of the photo frame, and provide a foundation 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.
[0150] For example, assuming the target shooting mode is high-pixel mode, the image processing algorithm corresponding to this high-pixel mode is the remosaic algorithm, and this remosaic algorithm is a single-frame algorithm. Therefore, the mobile phone can determine that the image processing algorithm corresponding to this high-pixel mode is a single-frame algorithm. Therefore, the mobile phone can determine the target display timing of the preview thumbnail to be after the first photo frame is captured.
[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 photographed image generated by the mobile phone can achieve a moderate brightness and darkness effect, thereby enhancing 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, let's take the front-facing portrait mode as the target shooting mode. The image processing algorithm corresponding to this front-facing portrait mode is the RAWHDR algorithm, and this RAWHDR algorithm is a multi-frame algorithm. Therefore, the phone can determine that the image processing algorithm corresponding to this front-facing portrait mode is not a single-frame algorithm. Therefore, the phone can continue to determine whether the RAWHDR algorithm is an exposure compensation algorithm to further determine the target display timing for 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 photo image generated by the mobile phone will be affected by changes in ambient light, that is, the mobile phone needs more photo frames to generate a photo 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 photo frame is captured. In this way, even if the mobile phone plays the photo flash black animation during the display of the preview thumbnail, since the photo flash black animation is played after the last photo frame is captured, it can ensure that the photo frames captured by the mobile phone will not be affected by changes in ambient light. In other words, it can reduce the occurrence of the photo frames captured by the mobile phone being affected by changes in ambient light due to the photo flash black animation played when the mobile phone displays the preview thumbnail, thereby improving the capture accuracy of the photo frames, providing 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.
[0155] In some embodiments, if the image processing algorithm corresponding to the target shooting mode described above is not an exposure compensation algorithm, this indicates that the camera image generated by the mobile phone will not be affected by changes in ambient light. In other words, the mobile phone only needs a small number of frames to generate an image that is not affected by ambient light. Therefore, the mobile phone can execute S707, which determines the target display timing of the preview thumbnail based on the total number of frames of the image processing algorithm and preset rules. This ensures that the target display timing of the preview thumbnail is determined in a targeted manner while ensuring the best possible shooting effect, thereby minimizing the display time of the preview thumbnail and improving 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 target shooting mode is an exposure compensation algorithm, the phone can set the target display timing of the preview thumbnail to after the last photo frame is captured. In other words, the phone will not display the preview thumbnail in the camera application's shooting preview interface until the last photo frame is captured. This can reduce the impact of ambient light changes on the captured photo frames caused by the flashing black animation playing when the phone displays the preview thumbnail, improve the capture accuracy of the photo frames, and lay the foundation 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.
[0158] For example, let's take the front-facing portrait mode as the target shooting mode. The image processing algorithm corresponding to this front-facing portrait mode is the RAWHDR algorithm, and this RAWHDR algorithm is a compensated exposure algorithm. Therefore, the phone can determine that the image processing algorithm corresponding to this front-facing portrait mode is a compensated exposure algorithm. Therefore, the phone can determine the target display timing for the preview thumbnail to be after the last captured frame.
[0159] S707: When the image processing algorithm corresponding to the target shooting mode is not an 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 target shooting mode is not an exposure compensation algorithm, the mobile phone can determine the target shooting frame from other shooting frames based on the total number of frames of the image processing algorithm and preset rules. The other shooting frames are the shooting frames captured by the mobile phone other than the first and last shooting frames. This ensures the display quality of the preview thumbnail while minimizing the time required to obtain the preview thumbnail, thereby improving the user's shooting experience.
[0161] For example, let's take Portrait mode as the target shooting mode. The image processing algorithm for Portrait mode is the ArcSoft algorithm, and this ArcSoft algorithm is not an exposure compensation algorithm. In other words, the image processing algorithm for Portrait mode does not include an exposure compensation algorithm. Therefore, the phone can determine the target frame from other frames based on the total number of frames in the image processing algorithm and a preset rule.
[0162] It is understood that the total number of frames required by each image processing algorithm stored in the mobile phone is predetermined. For example, the total number of frames can be 12 frames, or 9 frames, etc., without specific limitation.
[0163] In some embodiments, the preset rule may be to use the Nth frame captured by the mobile phone as the target frame. N may be the ratio of the total number of frames of the image processing algorithm to a preset value, rounded to an integer. Exemplarily, the preset value may be pre-set based on the acquisition speed of the frame. For example, the preset value may be 3, 2, etc., without specific limitation. In this way, the mobile phone can be triggered to refresh the preview thumbnail while it is capturing the frame. This not only ensures the quality of the mobile phone's photography, but also minimizes the display time of the preview thumbnail, improving the user's photography experience.
[0164] For example, taking the preset value of 3 as an example, if the total number of frames is 9, the 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 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 phone can set the target display timing of the preview thumbnail to after the target photo frame is captured. In other words, the preview thumbnail will be displayed in the camera app's shooting preview interface only after the target photo frame is captured. This ensures the display quality of the preview thumbnail while minimizing the time it takes to obtain the preview thumbnail, 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 for the preview thumbnail, the mobile phone can display the preview thumbnail in the camera app's shooting preview interface based on the target display timing. This delay in displaying the preview thumbnail not only reduces the occurrence of incomplete capture frames due to the preview thumbnail displaying too quickly, but also improves the image quality of the captured image, thereby enhancing the user's photography experience. It also allows the user to trigger the phone to enter the gallery or exit the camera later, reducing the occurrence of the phone exiting the shooting scene due to not having captured all the frames. This effectively improves the efficiency of frame acquisition and lays the foundation for subsequent generation of high-quality captured images. Furthermore, since the target display timing for the preview thumbnail is determined based on the target shooting mode, different target shooting modes have different target display timings. This ensures that the target display timing for the preview thumbnail is determined in a targeted manner, minimizing the display time of the preview thumbnail and improving the user's photography experience while ensuring the best possible shooting quality.
[0169] For example, Figure 1 As shown, the phone is displaying Figure 1 The first preview interface shown in (b) of FIG. 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 preview thumbnails.
[0170] In some cases, when the phone is in front-facing shooting mode (such as 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 photo flash animation in the shooting preview interface only after the last photo frame is captured. The photo flash animation refers to a situation where a black screen quickly flashes and the shooting preview interface is redisplayed when the shooting preview interface is displayed. In this way, the preview thumbnail is refreshed and the photo flash animation is played only when the last photo frame is captured. This reduces the situation where the photo frames captured by the phone are affected by changes in ambient light when the phone plays the photo flash animation, improves the capture accuracy of the photo frames, and provides a basis for the subsequent better generation of photo images.
[0171] In other cases, when the phone is in high-resolution mode and detects a user's camera operation, the phone can refresh the preview thumbnail in the shooting preview interface only after the first frame is captured. This method only refreshes the preview thumbnail after the first frame is captured, reducing the risk of users mistakenly believing that the camera has ended and moving their electronic device due to the preview thumbnail being displayed too early. This also reduces the likelihood of blurry images generated by the phone and improves the clarity of the captured images.
[0172] In some other cases, when the mobile phone is equipped with a shutter interactive effect, after the shutter interactive effect is finished, 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 close to the completion time of the photo frame acquisition, 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 aforementioned shooting preview interface, if the phone detects that the preview thumbnail has been triggered by the user, the phone can display the preview thumbnail in the gallery app. This can reduce the possibility of significant discrepancies between the preview thumbnail and the captured image due to the user triggering the phone to immediately enter the gallery app, thereby improving the consistency between the preview thumbnail and the captured image and enhancing the user experience.
[0174] In one implementation, after displaying the preview thumbnail, if the mobile phone finishes capturing the image frame, the mobile phone can generate a target thumbnail and a photo image based on at least one captured photo frame, and display them in the shooting preview interface. Figure 10 As shown, the thumbnail display method may further include S710 to S713:
[0175] S710: When the acquisition of the photo frame is finished, the mobile phone determines a target thumbnail according to the at least one acquired photo frame.
[0176] It is understood that when the number of photo frames captured by the mobile phone reaches the total number of frames required by the aforementioned image processing algorithm, the mobile phone may stop capturing photo frames, that is, terminate the capture of photo frames. After the capture of photo frames is terminated, the mobile phone may determine a target thumbnail (or SH thumbnail) based on at least one captured photo frame. The target thumbnail is acquired later than the preview thumbnail.
[0177] In some embodiments, if the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the mobile phone may process the first captured frame to obtain the 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 may fuse at least two captured frames to obtain the 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 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 enhance the user's visual experience.
[0180] It should be noted that if the target thumbnail has been finalized but the preview thumbnail has not, the phone can directly display the target thumbnail in the camera app's shooting preview interface. In other words, if the target thumbnail is acquired earlier than the preview thumbnail's acquisition time (or finalization time), the phone can directly discard the preview thumbnail and display the target thumbnail 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 completing the acquisition of the photo frames, the mobile phone may process the at least one captured photo frame according to the image processing algorithm corresponding to the target shooting mode to obtain a photo image. The photo image is the photo frame obtained after image processing. The photo image is acquired later than 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 aforementioned photographic image, the mobile phone can display the photographic image in the shooting preview interface of the camera application. This means that the target thumbnail displayed in the shooting preview interface is replaced with a thumbnail of the photographic image. It is understandable that since the target thumbnail is a photographic frame obtained without undergoing an image processing algorithm, while the photographic image is a photographic frame obtained with an image processing algorithm, the image quality of the photographic image will be higher than that of the target thumbnail. Therefore, by replacing the target thumbnail displayed in the shooting preview interface with a thumbnail of the photographic image, the mobile phone can improve the display quality of the thumbnails, thereby enhancing the user's visual experience.
[0185] In some embodiments, because the image displayed in the shooting preview interface is a small-sized image, the mobile phone can reduce the captured image to a preset size to obtain a reduced captured image, that is, a thumbnail of the captured image. The mobile phone can then replace the target thumbnail displayed in the shooting preview interface with the thumbnail of the captured image.
[0186] In one implementation, in response to the user's photo operation, if the phone's camera application 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, thereby displaying it in the camera application's shooting preview interface. Figure 5 The structure shown and Figure 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 a user's opening operation.
[0188] The activation operation is a user triggering the camera application icon in the main interface. For example, the triggering operation may be a click operation, a long press operation, etc., as long as it satisfies the preset activation rules of the camera application.
[0189] S1102: The camera application submits a preview request to the camera service.
[0190] The preview request is used to trigger the camera service to trigger the camera HAL to acquire a preview frame, which can be displayed in the camera application's shooting preview interface.
[0191] S1103 : Upon receiving the preview request sent by the camera application, the camera service sends a preview request to the camera HAL.
[0192] S1104 : Upon receiving the preview request sent by the camera service, the camera HAL starts acquiring preview frames.
[0193] The acquisition of the preview frame refers to acquiring 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 acquire preview frames, the camera HAL can send each preview frame acquired to the camera application through the camera service and service host, so that the camera application can display the preview frame in the shooting preview interface. This allows users to easily view the real-time images captured by the mobile phone camera, improving the user experience.
[0196] S1106. When the camera service receives the preview frame sent by the camera HAL, it sends the preview frame to the service host.
[0197] S1107. Upon 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, it 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-taking operation refers to a user triggering the photo-taking control in the camera application. The photo-taking control is provided in the preview interface of the camera application. For example, the triggering operation can be a click operation, a sliding operation, etc., as long as it satisfies the preset triggering rules of the photo-taking control, and is not specifically limited.
[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 photographic information from the service host, wherein the photographic information includes an image processing algorithm corresponding to a target photographic mode.
[0205] In some embodiments, after a camera session is established between the camera application and the service host, the camera application can obtain photo information from the service host. This photo information may include an image processing algorithm corresponding to a target photo mode. The target photo mode refers to the photo mode corresponding to the mobile phone when the photo operation is received.
[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 photo information is obtained, the camera application can submit a photo request to the camera service, so that the camera service triggers the camera HAL to collect photo frames.
[0210] In one implementation, the camera application may submit a photo 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, it 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. Upon receiving the photo request sent by the camera service, the camera HAL starts acquiring photo frames.
[0214] Specifically, after receiving the photo request sent by the camera service, the camera HAL can start to obtain the photo frame. For example, the camera HAL can obtain the captured photo frame from the camera of the mobile phone.
[0215] It should be noted that each captured frame by the camera HAL includes callback methods for onCaptureStarted() and onCaptureCompleted(). The onCaptureStarted() callback method indicates the start of the current frame capture. The onCaptureCompleted() callback method indicates the completion of the current frame capture. The onCaptureCompleted() callback method carries a second flag that instructs 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 acquiring frames, it indicates that the camera HAL has started acquiring the first frame. Therefore, the camera HAL can send a first frame start callback to the camera service to notify the camera application that the acquisition of frames has started, so that the camera application can start acquiring preview thumbnails.
[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. Upon receiving 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, it sends a request to obtain a preview thumbnail to the service host.
[0221] In some embodiments, after receiving the start callback for the first photo frame sent by the service host, the camera application can determine that the camera HAL has acquired the photo frames captured by the camera. Therefore, the camera application can send a request to the service host to obtain a preview thumbnail, so that the service host can determine the preview thumbnail from at least one target preview frame. This can delay the acquisition of the preview thumbnail, reduce the occurrence of incomplete photo frame acquisition due to the preview thumbnail displaying too quickly, improve the image quality of the captured image, and thus enhance the user's photo experience.
[0222] In one implementation, upon receiving the 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 the service host receives the request for obtaining a preview thumbnail sent by the camera application, it determines a preview thumbnail from the obtained at least one 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's understandable that because the preview thumbnail is determined from at least one target preview frame, and that the target preview frame is captured after the phone receives a photo action, the capture duration of the target preview frame is the same as the capture duration of the photo frame. This makes the preview thumbnail display time closer to the capture completion time of the photo frame. This ensures the image quality of the preview thumbnail, reduces the difference between the preview thumbnail and the photo image, and achieves better consistency between the preview thumbnail and the photo image, thereby improving the user experience.
[0226] In one implementation, after receiving a request for obtaining a preview thumbnail from 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 indicates that the service host has obtained a preview thumbnail.
[0227] In some cases, the service host may use any target preview frame of the at least one target preview frame as a preview thumbnail.
[0228] In other cases, the service host may use the first target preview frame obtained after the request receiving time in the at least one target preview frame as the preview thumbnail, wherein the request receiving time is the time when the service host receives the request to obtain the preview thumbnail.
[0229] Specifically, when the service host's filter preview module receives the first target preview frame acquired after the request reception time, if the flag is at the first value, it indicates that the filter preview module has already acquired the preview thumbnail. Therefore, the service host's filter preview module can send the first target preview frame as the preview thumbnail to the camera application.
[0230] For example, the filter preview module of the service host may copy the first target preview frame and then send the copied first target preview frame as a preview thumbnail to the camera application.
[0231] S1119. When the camera HAL receives the 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 a photo request from the camera service, the camera HAL can determine the target display timing for the target shooting mode based on the image processing algorithm corresponding to the target shooting mode carried in the photo request. It will be appreciated that since the target display timing for the preview thumbnail is determined based on the image processing algorithm corresponding to the target shooting mode, the target display timing for different target shooting modes will be different. This ensures that the target display timing for the preview thumbnail is determined in a targeted manner while ensuring the best possible photo quality, minimizing the display time of the preview thumbnail and improving 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 indicates that the image processing algorithm corresponding to the target shooting mode only requires one photo frame to generate the photo image, which means that the camera HAL can quickly complete the acquisition of the photo frame. Therefore, the camera HAL can execute S1120 to send a first photo frame end callback to the camera application to notify the camera application that the first photo frame has been acquired, thereby enabling the camera application to display a preview thumbnail after the first image frame is acquired. In other words, 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 frame, thus ensuring that the captured photo frames will not be blurry. In other words, the situation where the user moves the phone while the camera HAL is capturing photo frames due to the phone displaying the preview thumbnail too early is reduced, thereby improving the capture accuracy of photo frames and providing 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.
[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 the photographic image, which means that the mobile phone needs a long time to collect the photographic frames. Therefore, the camera HAL can execute S1121 to further determine the target display timing of the preview thumbnail. In this way, the target display timing of the preview thumbnail can be determined in a targeted manner while ensuring the shooting effect, thereby minimizing the display time of the preview thumbnail and improving the user's shooting experience.
[0235] S1120: When the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, after obtaining the first photo frame, the camera HAL sends an end callback of the first photo frame to the camera service.
[0236] Specifically, after determining that the image processing algorithm corresponding to the above-mentioned target shooting mode is a single-frame algorithm, it means that the service host only needs one frame to generate a photo image. Therefore, after obtaining the first photo frame, the camera HAL can directly send the end callback of the first photo frame to the camera service. The end callback is used to indicate that the first photo frame has been obtained. In this way, the situation where the user moves the phone during the process of capturing the photo frame due to the phone displaying the preview thumbnail too early can be reduced, the capture accuracy of the photo frame is improved, and a foundation is laid for the subsequent generation of high-quality photo images, so that the photo image can restore the image details and image clarity, thereby improving the user's photo 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 can further determine whether the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm. The exposure compensation algorithm adjusts the exposure parameters of the mobile phone camera to adjust the brightness of the image frame.
[0240] In some embodiments, if the image processing algorithm corresponding to the target shooting mode is an exposure compensation algorithm, this indicates that the captured image generated by the service host is affected by ambient light variations. This means that the service host requires a larger number of frames to generate a captured image that is not affected by ambient light. Therefore, the camera HAL can execute S1122 to send a final frame completion callback to the camera application to notify the camera application that the last frame has been captured, enabling the camera application to display the preview thumbnail after the last frame has been captured. This means that the target display timing for the preview thumbnail is determined to be after the last frame has been captured. This ensures that even if the phone plays a flash-to-black animation while displaying the preview thumbnail, the flash-to-black animation plays only after the last frame has been captured. This ensures that the captured frame by the camera HAL is not affected by ambient light variations. This reduces the likelihood that the captured frame by the camera HAL will be affected by ambient light variations due to the flash-to-black animation playing while the phone displays the preview thumbnail. This improves the accuracy of the captured frame acquisition, paving the way for subsequent generation of high-quality images. This ensures that the captured image retains image detail and clarity, thereby enhancing the user's photography experience.
[0241] In other embodiments, if the image processing algorithm corresponding to the target shooting mode is not an exposure compensation algorithm, it means that the photo image generated by the service host will not be affected by changes in ambient light. In other words, 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 execute S1123, that is, based on the total number of frames of the image processing algorithm and preset rules, determine the target photo frame from other photo frames, and thus determine the target display timing of the preview thumbnail to be after the target photo frame is captured. In this way, while ensuring the shooting 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 obtaining 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 indicates 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 obtaining the first photo frame. Among them, the end callback is used to indicate that the last photo frame has been obtained, that is, the camera HAL has obtained all the photo frames. In this way, the situation where 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 frame is improved, and a basis is provided 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.
[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 is not 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.
[0246] Specifically, after determining that the image processing algorithm corresponding to the target shooting mode is not an exposure compensation algorithm, it indicates that the service host only needs a small number of photo frames to generate a photo image unaffected by ambient light. Therefore, the camera HAL can determine the target photo frame from other photo frames based on the total number of frames of the image processing algorithm and preset rules. The other photo frames refer to the photo frames obtained by the camera HAL other than the first and last photo frames.
[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. N may be the ratio of the total number of frames in the image processing algorithm to a preset value, rounded to an integer. This allows the mobile phone to refresh the preview thumbnail while capturing photo frames, ensuring the best possible photo quality while minimizing the display time of the preview thumbnail, thereby enhancing the user's photo-taking 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 acquired, the camera HAL can send a target photo frame completion callback to the camera service. This completion callback is used to indicate that the target photo frame has been acquired. In this way, the camera app can be triggered to display a preview thumbnail while the camera HAL is acquiring the photo frame. This not only ensures the phone's photo quality, but also minimizes the display time of the preview thumbnail, 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. Upon receiving the end callback sent by the camera HAL, the camera service sends an end callback to the camera application.
[0252] The second callback can be the end callback of the first photo frame when the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm. It can also be the end callback of the last photo frame when the image processing algorithm corresponding to the target shooting mode is not a single-frame algorithm but an 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, it 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 shooting 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 is 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 photo frame. In this way, the situation where the user moves the phone during the process of collecting photo frames due to the phone displaying the preview thumbnail too early 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.
[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 displayed 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 case where the shooting preview interface is displayed, and then the shooting preview interface is redisplayed after a black screen flashes quickly. 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, improving the acquisition accuracy of the photo frames, and providing a basis for the subsequent better generation of photo images.
[0256] In some cases, if the phone is equipped with a shutter interaction effect, the camera app can refresh the preview thumbnail in the shooting preview interface after the shutter interaction effect ends. In this way, by delaying the display of the preview thumbnail, the preview thumbnail display time is close to the completion time of the photo frame acquisition. This can meet the display mechanism of the shutter interaction effect, allowing the phone to display the preview thumbnail after all photo frames are acquired, reducing the possibility of photo frames being lost due to the early end of the shutter interaction effect, and providing a foundation for better display of the subsequent photo image.
[0257] It should be noted that the camera HAL sends the start callback of the first capture 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 and sends the end callback to the camera application. The process can be performed simultaneously or in sequence. For example, the mobile phone can execute steps S1114-S1118 and S1119-S1126 simultaneously.
[0258] S1127: The camera HAL finishes acquiring the photo frame.
[0259] In some embodiments, when the number of photo frames acquired by the camera HAL reaches the total number of frames of the image processing algorithm, the camera HAL may continue to acquire photo frames, that is, end acquiring photo frames.
[0260] S1128. The camera HAL sends the photo-taking result to the camera service.
[0261] Specifically, after completing the image frame acquisition, the camera HAL may send a capture result to the camera service. The capture result may include at least one capture frame and capture parameters for each capture frame. The capture 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, it 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 the 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 photographic 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 based on at least one photographic 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 target shooting mode is a single-frame algorithm, the service host may 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 service host may 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, it 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 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 area according to the image processing algorithm corresponding to the target shooting mode to obtain a photographic image.
[0274] Specifically, after receiving the queue buffer from the camera service, the service host may further process at least one photo frame in the queue buffer according to the image processing algorithm corresponding to the target shooting mode, thereby obtaining a photo image. The photo image is the photo frame obtained after image processing. The photo image is acquired later than 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 captured image sent by the service host, the camera application can display a thumbnail of the captured image in the capture preview interface, that is, replace the target thumbnail displayed in the capture preview interface with the thumbnail of the captured image. It can be understood that since the target thumbnail is an image frame obtained without undergoing an image processing algorithm, while the captured image is a captured image frame obtained through an image processing algorithm, the image quality of the captured image will be higher than that of the target thumbnail. Therefore, the camera application replaces the target thumbnail displayed in the capture preview interface with the thumbnail of the captured image, which can improve the display effect of the thumbnail and thus enhance the user's visual experience.
[0278] It should be understood that the corresponding steps executed by each module in the mobile phone can 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 can be executed by the service host, which is not limited to this.
[0279] In some embodiments, the present application provides a computer-readable storage medium including computer instructions. When the computer instructions are executed on an electronic device, the electronic device executes 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 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 this 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 merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another 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 separate, 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 places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0284] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or 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, 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 and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a 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 content is only a specific embodiment of this application, but the scope of protection of this application is not limited to this. Any changes or replacements within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A method for displaying thumbnails, characterized in that: Applied to electronic equipment, the method includes: 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 a photographed image; After acquiring the first photographic frame, the electronic device determines a preview thumbnail from the acquired at least one 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; After the electronic device finishes collecting the photo frames, it obtains a target thumbnail based on the collected at least one photo frame; The electronic device displays the target thumbnail in the shooting preview interface; 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.
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 captured; 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 photo image is generated based on multiple frames of the photo frames.
4. The method according to claim 1, wherein 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 not 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 based on 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 Nth captured photo frame as the target photo frame; wherein N is the integer of the 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 collecting photographing frames and target preview frames, including: In response to a 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 display of the shutter interaction effect, the electronic device starts to collect the photo frame and the target preview frame; The electronic device displays the preview thumbnail on a shooting preview interface according to a target display timing corresponding to the target shooting mode, including: The electronic device displays the preview thumbnail in the 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 on a shooting preview interface according to a 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 photo frames, it obtains a target thumbnail based on the collected at least one photo 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 but does not display the preview thumbnail in the shooting preview interface.
9. 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 collecting 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 a photo frame and a target preview frame; After the first photo frame is acquired, the electronic device determines a preview thumbnail from the acquired at least one 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.
10. The method according to claim 9, characterized in that The electronic device further includes a service host, and in response to the photographing operation, the camera application sends a photographing request to the camera HAL, including: In response to a photographing operation, the camera application requests the service host to create a photographing session; When 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 the camera HAL receives the photographing request sent by the camera application, it 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.
11. The method according to claim 10, characterized in that The camera HAL determines, according to an image processing algorithm corresponding to the target shooting mode carried in the photographing request, a target display timing corresponding to the target shooting mode, including: When the image processing algorithm corresponding to the target shooting mode is a single-frame algorithm, the camera HAL sends an end callback of the first frame to the camera application after acquiring the first frame; When the camera application receives the end callback of the first photo frame sent by the camera HAL, it determines that the target display timing corresponding to the target shooting mode is after the first photo frame is collected.
12. The method according to claim 10, characterized in that The camera HAL determines, according to an image processing algorithm corresponding to the target shooting mode carried in the photographing request, a target display timing corresponding to the target shooting mode, 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 obtaining 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.
13. The method according to claim 10, characterized in that The camera HAL determines, according to an image processing algorithm corresponding to the target shooting mode carried in the photographing request, a target display timing corresponding to the target shooting mode, including: In a 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 not an exposure compensation algorithm, the camera HAL determines the target shooting frame from other shooting frames based on 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 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 collected.
14. 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 code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 13.
15. 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 according to any one of claims 1 to 13.
16. 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 according to any one of claims 1 to 13.
Citation Information
Patent Citations
Shooting method and electronic equipment
CN118870186A