Image display method, electronic device and storage medium

By displaying images carrying shooting parameters in electronic devices, the problem of insufficient images in multi-frame shooting scenes is solved, the user experience and image quality are improved, and different shooting modes are adapted to, and the dependence on the chip is reduced.

CN117479002BActive Publication Date: 2024-12-17HONOR DEVICE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202311205543.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-15
Publication Date
2024-12-17
Estimated Expiration
2043-09-15

AI Technical Summary

Technical Problem

In multi-frame shooting scenes, the prior art is difficult to effectively improve the user's shooting experience, especially in HDR mode and night view mode. The effect after image synthesis is not clear enough, and too bright or too dark areas lead to low image clarity.

Method used

By introducing an image display method in an electronic device, a shooting operation is received and a shooting request carrying shooting information is generated, a target number of image frames and shooting information are obtained, and a target image carrying shooting parameters is synthesized and displayed, including focal length and aperture. , shutter speed and sensitivity parameters.

Benefits of technology

It improves the user's shooting experience, provides clearer and more vivid image effects, adapts to different shooting modes, reduces the dependence of multi-frame shooting process on the chip, and improves the efficiency of image synthesis and the user's sense of professionalism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117479002B_ABST
    Figure CN117479002B_ABST
Patent Text Reader

Abstract

The present application provides an image display method, an electronic device and a storage medium, and relates to the field of terminal technology. The method includes: receiving a shooting operation, the shooting operation is used to trigger a target application to generate at least one shooting request, and the first shooting request in the at least one shooting request carries an indicator, and the indicator is used to indicate the target number of image frames collected by the electronic device in one shooting. In response to at least one shooting request, a target number of image frames and shooting information for display are obtained, and a target image carrying the shooting information is further displayed. The target image is synthesized from a target number of multiple image frames. In this way, the electronic device can display the shooting information in the target image to enhance the user's shooting experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of terminal technology, and in particular to an image display method, an electronic device, and a storage medium. Background Art

[0002] Electronic devices usually have a shooting function. As people's demand for the shooting effect of electronic devices continues to increase, the shooting functions of electronic devices are becoming more and more abundant.

[0003] The shooting function of electronic devices has multiple shooting modes. For example, portrait mode, night scene mode, high dynamic range imaging (HDR) mode, etc. In some shooting modes, in order to present a clear image to the user, the electronic device will continuously capture multiple image frames, synthesize the multiple image frames, and finally present a composite image of the multiple image frames to the user. This shooting method can be called multi-frame shooting.

[0004] In multi-frame shooting scenarios, how to further improve the user's shooting experience is a problem that needs to be solved. Summary of the invention

[0005] The embodiments of the present application provide an image display method, an electronic device, and a storage medium, which can carry shooting information in the shot image to improve the user's shooting experience.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, an image display method is provided, which is applied to an electronic device, wherein the electronic device includes a target application with a shooting function, and the method includes: receiving a shooting operation, wherein the shooting operation is used to trigger the target application to generate at least one shooting request, and the first shooting request in the at least one shooting request carries an indication mark, and the indication mark is used to indicate the target number of image frames collected by the electronic device in one shooting. In response to the at least one shooting request, a target number of image frames and shooting information for display are obtained, and a target image carrying the shooting information is further displayed.

[0008] In the method, the target image is synthesized from a target number of image frames. The electronic device can display at least one shooting parameter included in the shooting information while displaying the target image. In this way, the user's shooting experience can be improved.

[0009] In a possible implementation manner of the first aspect, in response to at least one shooting request, shooting information of at least one image frame among the target number of image frames is obtained. Based on the shooting information of the at least one image frame, shooting information for display is obtained.

[0010] In this implementation, during a shooting operation of the electronic device, the electronic device can obtain shooting information displayed in the target image based on shooting information of at least one image frame. In this way, the electronic device can display at least one shooting parameter more accurately in the target image, thereby improving the user's shooting experience.

[0011] In another possible implementation of the first aspect, shooting information of one image frame in at least one image frame is used as shooting information for display; or, an average value or a median value of the shooting information of at least one image frame is used as shooting information for display.

[0012] In this implementation, the electronic device can select the shooting information of one image frame from the shooting information of at least one image frame as the shooting information for display, thereby quickly obtaining at least one shooting parameter for display. Alternatively, the electronic device can use the average value or median value of the shooting information of at least one image frame as the shooting information for display, thereby synthesizing the shooting information of at least one image frame to obtain more accurate shooting information for display.

[0013] In another possible implementation of the first aspect, the electronic device further includes a camera hardware abstraction layer HAL module, which receives at least one shooting request and obtains a target number of image frames and shooting information for display in response to the at least one shooting request.

[0014] In this implementation, the electronic device receives at least one shooting request sent by the camera application through the camera HAL module in the HAL layer, and obtains a target number of image frames and at least one shooting parameter included in the shooting information for display.

[0015] In another possible implementation of the first aspect, the electronic device further includes a service host SH module. In response to a first shooting request in at least one shooting request, the camera HAL module reports shooting information for display to the target application. The target application synthesizes image data carrying the shooting information for display and sends the image data to the SH module. The SH module obtains a target number of image frames from the camera HAL module, synthesizes the image data and the target number of image frames, and obtains a target image carrying the shooting information.

[0016] In this implementation, an SH module is provided in the electronic device. The SH module can perform part of the functions of the camera HAL module, that is, synthesize a target image with shooting information for display. In this way, the electronic device can implement a multi-frame shooting process more flexibly and reduce the dependence of the multi-frame shooting process on the chip.

[0017] In another possible implementation of the first aspect, the first shooting request is a first shooting request of at least one shooting request. In response to the first shooting request of the at least one shooting request, if the number of acquired image frames reaches a preset number, the camera HAL module reports shooting information for display to the target application.

[0018] In this implementation, the camera HAL module of the electronic device responds to the first shooting request in a shooting, and when the number of image frames reaches a preset number, the camera HAL module of the electronic device reports the shooting information for display to the target application. The preset number is less than the target number. In this way, when the number of acquired image frames does not reach the target number, the camera HAL module of the electronic device reports the shooting information for display to the target application, thereby reducing the time the target application waits for the camera HAL module to report the shooting information, and improving the efficiency of target image synthesis.

[0019] In another possible implementation of the first aspect, the first shooting request is a first shooting request among the at least one shooting request. In response to the first shooting request among the at least one shooting request, if a first image frame is acquired, the camera HAL module reports shooting information for display to the target application.

[0020] In this implementation, the camera HAL module of the electronic device immediately reports the shooting information for display to the target application in response to the first shooting request in a shooting session. In this way, the time for the target application to wait for the camera HAL module to report the shooting information can be minimized, and the efficiency of target image synthesis can be improved.

[0021] In another possible implementation of the first aspect, the electronic device further includes a camera hardware abstraction layer HAL module, the camera HAL module receives at least one shooting request, and in response to the at least one shooting request, the camera HAL module obtains a target number of image frames and shooting information of each image in the target number of image frames. Further, the camera HAL module reports the shooting information of each image frame in the target number of image frames to a target application, and the target application obtains shooting information for display based on the shooting information of each image frame.

[0022] In this implementation, the camera HAL module of the electronic device responds to at least one shooting request sent by the camera application, reports the shooting information of each image frame to the target application, and the camera application determines the target shooting parameters for display. This method is simple and easy to operate.

[0023] In another possible implementation manner of the first aspect, the method further includes: setting the number of targets according to a shooting mode indicated by the shooting operation.

[0024] In this implementation, the number of targets indicated by the indicator is related to the shooting mode, so that the electronic device can set the number of targets indicated by the indicator according to the current shooting mode to adapt to multi-frame shooting scenes of different shooting modes.

[0025] In another possible implementation of the first aspect, the shooting information includes one or more shooting parameters of focal length, aperture, shutter speed, and sensitivity. In this way, the electronic device can display one or more shooting parameters of focal length, aperture, shutter speed, and sensitivity in the target image to improve the user's shooting experience.

[0026] In a second aspect, the present application provides an electronic device, which includes: a memory and one or more processors. The memory is coupled to the processor. 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 performs the following steps: receiving a shooting operation, wherein the shooting operation is used to trigger a target application to generate at least one shooting request, and the first shooting request in the at least one shooting request carries an indication mark, and the indication mark is used to indicate the target number of image frames collected by the electronic device in one shooting, and the target number is an integer greater than 1; in response to at least one shooting request, obtaining a target number of image frames and shooting information for display; wherein the shooting information for display includes at least one shooting parameter; displaying a target image carrying the shooting information; wherein the target image is synthesized by the target number of image frames.

[0027] In a possible implementation of the second aspect, when the above-mentioned computer instructions are executed by a processor, the electronic device further performs the following steps: in response to at least one shooting request, obtaining shooting information of at least one image frame among a target number of image frames; and obtaining shooting information for display based on the shooting information of at least one image frame.

[0028] In another possible implementation of the second aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: using the shooting information of one image frame in at least one image frame as the shooting information for display; or, using the average value or median value of the shooting information of at least one image frame as the shooting information for display.

[0029] In another possible implementation of the second aspect, the electronic device also includes a camera hardware abstraction layer HAL module. When the above-mentioned computer instructions are executed by the processor, the electronic device also performs the following steps: the camera HAL module receives at least one shooting request; in response to at least one shooting request, obtains a target number of image frames and shooting information for display, including: the camera HAL module obtains a target number of image frames and shooting information for display in response to at least one shooting request.

[0030] In another possible implementation of the second aspect, the electronic device also includes a service host SH module; when the above-mentioned computer instructions are executed by the processor, the electronic device also performs the following steps: in response to a first shooting request in at least one shooting request, the camera HAL module reports shooting information for display to the target application; the target application synthesizes image data carrying the shooting information for display, and sends the image data to the SH module; the SH module obtains a target number of image frames from the camera HAL module, synthesizes the image data and the target number of image frames, and obtains a target image carrying the shooting information.

[0031] In another possible implementation of the second aspect, the first shooting request is the first shooting request among at least one shooting request; when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: in response to the first shooting request among the at least one shooting request, if the number of acquired image frames reaches a preset number, the camera HAL module reports the shooting information for display to the target application, wherein the preset number is less than the target number.

[0032] In another possible implementation of the second aspect, the first shooting request is the first shooting request among at least one shooting request; the first shooting request is the first shooting request among at least one shooting request; when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: in response to the first shooting request among at least one shooting request, if the first image frame is acquired, the camera HAL module reports the shooting information for display to the target application.

[0033] In another possible implementation of the second aspect, the electronic device also includes a camera hardware abstraction layer HAL module. When the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: the camera HAL module receives at least one shooting request; in response to at least one shooting request, the camera HAL module obtains a target number of image frames and shooting information of each image in the target number of image frames; the camera HAL module reports the shooting information of each image frame in the target number of image frames to the target application; the target application obtains shooting information for display based on the shooting information of each image frame.

[0034] In another possible implementation manner of the second aspect, when the above-mentioned computer instructions are executed by the processor, the electronic device further performs the following steps: setting the target quantity according to the shooting mode indicated by the shooting operation.

[0035] In another possible implementation manner of the second aspect, the shooting information includes one or more shooting parameters of focal length, aperture, shutter speed, and sensitivity.

[0036] 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 in the first aspect and any possible implementation thereof.

[0037] In a fourth aspect, the present application provides a computer program product including program instructions, which, when executed on a computer, enables the computer to execute the method described in the first aspect and any possible implementation thereof. For example, the computer may be the electronic device described above.

[0038] In a fifth aspect, the present application provides a chip system, which is applied to an electronic device. The chip system includes an interface circuit and a processor. The interface circuit and the processor are interconnected by a line. The interface circuit is used to receive a signal from a memory and send a signal to the processor, the signal including a computer instruction stored in the memory. When the processor executes the computer instruction, the electronic device executes the method described in the first aspect and any possible implementation thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A schematic diagram of an example of a shooting interface provided in an embodiment of the present application;

[0040] Figure 2 A schematic diagram of an example of a multi-frame shooting software architecture provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of an example of a target image provided in an embodiment of the present application;

[0042] Figure 4 A hardware structure block diagram of a mobile phone 100, an example of an electronic device provided in an embodiment of the present application;

[0043] Figure 5 A software structure block diagram of a mobile phone 100, an example of an electronic device provided in an embodiment of the present application;

[0044] Figure 6 A schematic diagram of another example of a multi-frame shooting software architecture provided in an embodiment of the present application;

[0045] Figure 7 A flowchart of an example of an image display method provided in an embodiment of the present application;

[0046] Figure 8 An example diagram of an image display method provided in an embodiment of the present application;

[0047] Fig. 9 An example diagram of a request queue example provided in an embodiment of the present application. DETAILED DESCRIPTION

[0048] As the shooting functions of electronic devices become more and more abundant, in order to improve the shooting effect and user experience of electronic devices, in some shooting modes, such as HDR mode, night scene mode and other shooting modes, the electronic device continuously captures multiple image frames to present an image synthesized by these image frames to the user.

[0049] For example, Figure 1 As shown, the electronic device is provided with multiple shooting modes in the shooting interface, including aperture, night scene, portrait, photo, video, and HDR. In the HDR shooting mode, the electronic device continuously captures multiple image frames in response to a shooting operation by the user clicking the shooting button. Afterwards, the electronic device synthesizes the captured multiple image frames into one image. In the display interface of the electronic device, the electronic device can display an image synthesized by multiple image frames to the user.

[0050] In a multi-frame shooting scene, an image synthesized from multiple image frames has richer color and light and dark details than a single image frame, and the image is more vivid and lifelike, which can provide users with better visual effects. In a single-frame shooting scene (i.e., a shooting scene in which one image frame is captured and displayed), the image frames captured by the electronic device may have too bright or too dark image areas due to the high light level in the shooting environment, resulting in low image clarity. In a multi-frame shooting scene (i.e., a shooting scene in which multiple image frames are captured and synthesized to display one image), the electronic device captures multiple image frames with a different set of shooting parameters. Even if one of the image frames has too bright or too dark image areas, the electronic device can provide the content of these image areas through other image frames, so that the image synthesized from multiple image frames looks clearer and softer. It can be seen that in a multi-frame shooting scene, the electronic device can provide images with better effects and improve the user experience.

[0051] In order to further enhance the user's shooting experience in a multi-frame shooting scenario, an embodiment of the present application provides an image display method, which can not only display a target image synthesized by multiple image frames to the user in a multi-frame shooting scenario, but also provide a set of shooting parameters corresponding to the target image in the displayed target image.

[0052] First, a process of providing shooting parameters under a multi-frame shooting software architecture provided in an embodiment of the present application is introduced.

[0053] In one embodiment of the present application, the multi-frame shooting software architecture of the electronic device includes a camera application and a camera HAL module. The multi-frame shooting software architecture may be referred to as a SIT architecture. The interaction between the camera application and the camera HAL module involved in the SIT architecture is as follows: Figure 2 shown.

[0054] The electronic device receives a shooting operation in which a user clicks a shooting button once in a camera application interface. In response to the shooting operation, the camera application of the electronic device sends a shooting request to the camera HAL module. In response to the shooting request sent by the camera application, the camera HAL module of the electronic device instructs the camera driver to control the camera to collect multiple image frames. The camera HAL module obtains multiple image frames collected by the camera and multiple shooting information corresponding to the multiple image frames. Further, the camera HAL module of the electronic device determines a shooting information for display according to the multiple shooting information corresponding to the multiple image frames, and reports the shooting information for display to the camera application. After receiving the camera HAL module, the camera application synthesizes the image data carrying the shooting information and transmits the image data carrying the shooting information to the camera HAL module. The camera HAL module synthesizes the multiple image frames collected by the camera and the image data carrying the shooting information into a target image. The format of the synthesized target image may be a JPG (Joint Photographic Experts Group) format. Further, if the electronic device receives a viewing operation of the user to view the target image, the electronic device displays the synthesized target image on the display screen of the electronic device in response to the viewing operation. In this way, the electronic device can display the target image carrying the shooting information on the display screen.

[0055] In the embodiment of the present application, in the multi-frame shooting solution provided by the SIT architecture, the camera application of the electronic device sends a shooting request to the camera HAL module. The camera HAL module identifies the current shooting mode based on the shooting request and determines the number of image frames required to be collected in one shooting in the current shooting mode. In response to a shooting request of the camera application, the camera HAL module can obtain the target number of image frames corresponding to the HDR mode.

[0056] However, in the SIT architecture, since the HAL layer has a strong dependence on the processor chip, the functions performed by the HAL layer are difficult to flexibly change or set. In order to improve the flexibility of the shooting function, the SH architecture is set to realize multi-frame shooting. The SH architecture includes a camera application, a service host (ServiceHost, SH) process and a camera HAL module. Compared with the SIT architecture, the SH architecture of the mobile phone sets the SH process in the application framework layer. The SH process is used to synthesize the target image. The SH process can execute some image processing functions of the camera HAL module in the SIT architecture. For example, the SH process can process and synthesize the target image. Since the HAL layer has a strong dependence on the processor chip, the functions performed by the HAL layer are difficult to flexibly change or set. By setting the SH process in the application framework layer, the mobile phone can more flexibly implement the multi-frame shooting process and reduce the dependence of the multi-frame shooting process on the chip.

[0057] However, in the multi-frame shooting solution provided by the SH architecture, since the SH process can synthesize multiple image frames into a target image according to the current shooting mode, the camera HAL module no longer recognizes the current shooting mode, and it is difficult for the camera HAL module to determine the number of image frames required for one shooting, so it is difficult for the camera HAL module to respond to a shooting request from the camera application to obtain a certain number of multiple image frames and determine when to report shooting information to the camera application. In other embodiments of the present application, a solution for displaying shooting information in a multi-frame shooting scenario is also provided.

[0058] To solve the above technical problems, in the method provided in an embodiment of the present application, an electronic device receives a shooting operation of a user, and in response to the shooting operation, a target application (such as a camera application) of the electronic device generates at least one shooting request corresponding to the shooting operation. The first shooting request in the at least one shooting request carries an indicator, which is used to indicate the number of image frames corresponding to the shooting operation, and one image frame corresponds to one shooting request. A target number of image frames and shooting information for display are obtained. Furthermore, the electronic device displays a target image synthesized by a target number of image frames, and the target image carries a set of shooting parameters included in the shooting information. In this way, the electronic device can carry a set of shooting parameters in a target image synthesized by multiple image frames in a multi-frame shooting scene, so as to provide users with a more professional shooting experience and meet the diverse shooting needs of users.

[0059] In some implementations, the number of image frames that the electronic device needs to collect in one shooting corresponds to the shooting mode of the electronic device. The shooting modes of the electronic device include shooting modules such as HDR mode, night shooting mode, day shooting mode, and different shooting modes correspond to different numbers. Specifically, the electronic device can determine the shooting mode according to the user's shooting operation, and then determine the target number of image frames collected for this shooting according to the shooting mode. The target number is an integer greater than 1. For example, in HDR mode, the number of image frames collected in one shooting is 6. In night scene mode, the number of image frames collected in one shooting is 3. In this way, the electronic device can determine the target number of image frames collected in one shooting according to the current shooting mode, and then set an indication mark based on the determined number, and carry the set indication mark in the shooting request to adapt to multi-frame shooting scenes of different shooting modes.

[0060] Here, the indicator can be set according to the actual application scenario or requirements. For example, the indicator can be set to English characters or numeric characters corresponding to the target quantity. For example, the indicator can be numeric characters such as "3" and "6". Indicators corresponding to different target quantities are different.

[0061] In the method provided in the embodiment of the present application, the electronic device has one or more cameras. For example, the electronic device may include a rear camera and a front camera. The electronic device may capture images through the camera to achieve a shooting function.

[0062] In the embodiment of the present application, the target application is an application installed in the electronic device. The target application can trigger the shooting function of the electronic device. In some examples, the target application is a camera application. For example, Figure 1 As shown, the electronic device receives a shooting operation of a user clicking a shooting button in the camera application interface. In response to the shooting operation, the electronic device captures an image through the rear camera to achieve shooting.

[0063] In other examples, the target application is an application with a shooting function. For example, the target application is a chat application, a code scanning application, etc. Taking the chat application as an example, the electronic device receives a shooting operation of the user clicking a shooting button in the shooting interface of the chat application. In response to the shooting operation, the electronic device captures an image through the front camera to achieve shooting.

[0064] In the embodiment of the present application, the shooting information may be some auxiliary information when the image is shot (or may be understood as relevant information when the image is shot). For example, the shooting information may include one or more shooting parameters of focal length, aperture, shutter speed, and sensitivity. The electronic device may display the shooting information while displaying the image, presenting the user with other additional information in addition to the image, so as to improve the user experience.

[0065] The focal length is the distance from the focal point of the camera to the center of the lens of the camera (i.e., the optical center). An electronic device includes one or more cameras, and the electronic device collects images through the camera. The lens of the camera is usually a group of lenses. Light passing through the lens can converge to the focal point. The distance between the focal point and the center of the lens can be called the focal length.

[0066] Aperture, shutter speed and sensitivity are three shooting parameters related to exposure.

[0067] The aperture is used to control the exposure area. The larger the aperture, the more light enters the camera. The aperture can be expressed in F. For example, the aperture is F / 1.2, F / 4, F / 5.6, etc.

[0068] Shutter speed (also referred to as shutter) is used to control the exposure time. The greater the shutter speed, the shorter the exposure time. For example, the shutter speed is 1 / 100 second, 2 / 100 second, etc.

[0069] The sensitivity is also called ISO (International Organization for Standardization) value, which is used to indicate the sensitivity of the photosensitive element to light. The higher the sensitivity, the faster the photosensitive element can form an image, and the smaller the exposure required for the electronic device to form a clear image. For example, the sensitivity can be ISO 100, ISO 800, etc.

[0070] For example, taking the shooting information including the shooting parameters such as focal length, aperture, shutter speed and sensitivity as an example, the image displayed by the electronic device is as follows: Figure 3 As shown. It can be seen that the shooting information "36mm f / 1.9 1 / 100s ISO250" is marked in the lower right corner of the image. The shooting information includes that the focal length corresponding to the image is 36 mm, the aperture is 1.9, the shutter is 1 / 100 seconds, and the sensitivity is 250. In this way, the electronic device can carry one or more shooting parameters of the focal length, aperture, shutter speed and sensitivity corresponding to the image in the displayed image, which can enhance the professional sense of image shooting and provide users with a better shooting experience.

[0071] In the embodiment of the present application, each of the multiple image frames collected by the electronic device corresponds to a shooting information (i.e., a set of shooting parameters). The shooting information corresponding to different image frames may be different. In the embodiment of the present application, the electronic device may determine the shooting information carried by the target image based on the shooting information of at least one image frame in the multiple image frames.

[0072] In some implementations, the electronic device may use the shooting information of one of the multiple image frames as the shooting information for display. For example, the electronic device may use the shooting information of the first image frame collected from the multiple image frames as the shooting information for display.

[0073] In other implementations, the electronic device may use the average value of the shooting information of at least one image frame among the multiple image frames as the shooting information for display. Take the example of an electronic device continuously collecting 6 (the above target number example) image frames to synthesize a target image. In one example, the electronic device may calculate the average value of the shooting information of the 6 image frames, and use the average value of the shooting information of the 6 image frames as the shooting information for display. In another example, the electronic device may select a certain number of image frames from the 6 image frames, such as 4 image frames. Then calculate the average value of the shooting information of the 4 image frames, and use the average value of the shooting information of the 4 image frames as the shooting information corresponding to the target image for display. In another example, the electronic device may use the average value of the shooting information of the first 4 captured image frames among the 6 image frames as the shooting information corresponding to the target image for display.

[0074] It is understandable that if the shooting information of different image frames includes only one shooting parameter, the electronic device calculates the average value of the shooting parameter of at least one image frame to obtain the shooting information for display. The shooting information for display also only includes the shooting parameter. If the shooting information of different image frames includes multiple shooting parameters, the electronic device can calculate the average value of each shooting parameter of at least one image frame respectively to obtain each shooting parameter in the shooting information for display. The shooting information for display includes these multiple shooting parameters.

[0075] In other implementations, the electronic device may use the middle value of each shooting parameter in the shooting information of at least one image frame among the multiple image frames as the corresponding shooting parameter in the shooting information for display. Also, take the example that the electronic device continuously collects 6 (the above-mentioned target number example) image frames to synthesize a target image. In one example, for a shooting parameter in the shooting information, the electronic device uses the middle value of the shooting parameters of the 6 image frames as the corresponding shooting parameter in the shooting information for display. In another example, the electronic device may select a certain number of image frames, such as 4 image frames, from the 6 image frames. Then, the middle value of the shooting parameters of the 4 image frames is used as the corresponding shooting parameter in the shooting information for display. In another example, the electronic device may use the middle value of the shooting parameters of the first 4 captured image frames among the 6 image frames as the corresponding shooting parameter in the shooting information for display.

[0076] In an embodiment of the present application, the electronic device may provide the user with a target image carrying shooting information, thereby improving the user's shooting experience. In order to reduce the impact of the shooting information on the shooting picture corresponding to the actual scene, in some implementations, the electronic device may set the shooting information in the first preset image area of ​​the target image. For example, the first preset image area may be the lower left corner area, lower right corner area, bottom area, or top area of ​​the target image. Figure 3 As shown, the shooting information is located in the lower right corner area of ​​the target image, that is, the first preset image area is the lower right corner area of ​​the target image.

[0077] In order to provide users with a better shooting experience, in some implementations, in addition to carrying the above shooting information in the target image, the electronic device may also add personalized information to the target image. For example, the electronic device may also add weather information, shooting location, device model, shooting date, shooting time, shooting location, and other personalized information to the target image.

[0078] In one example, the electronic device may set personalized information in a second preset image area of ​​the target image. The second preset image area may be the same as or different from the first preset image area. For example, the second preset image area may be the lower left corner area, the lower right corner area, the bottom area, or the top area of ​​the target image. For example, the personalized information includes the shooting time. Figure 3 As shown, the shooting time is set in the lower right corner area of ​​the target image, below the shooting information. The second preset image area is consistent with the first preset image area, which is the lower right corner area of ​​the target image.

[0079] As described above, the method provided in the embodiment of the present application can set shooting information and personalized information in a specific image area of ​​the target image. In other examples, the electronic device can determine to carry the shooting information and personalized information in the target image according to the user's selection operation. For example, the target application of the electronic device can provide an image configuration page to the user. The image configuration page is provided with setting options for shooting information and setting options for personalized information. The user can select the shooting information and personalized information carried in the target image through user operations in the setting options for shooting information and the setting options for personalized information according to personal preferences. The electronic device can determine the shooting information and personalized information carried in the target image according to the user's selection operation. In this way, the electronic device can display the shooting information and personalized information in the target image according to the user's personal preferences, thereby improving the user's shooting experience.

[0080] In other examples, the electronic device may also add an electronic photo frame to the target image. The above-mentioned shooting information and personalized information for display may be set in the electronic photo frame. Figure 3 As shown, an electronic photo frame is provided at the bottom area of ​​the target image. The electronic photo frame includes shooting information "6mm f / 1.9 1 / 100s ISO250" and personalized information "2023.02.02". The personalized information indicates that the shooting date of the target image is February 2, 2023.

[0081] In this way, in a multi-frame shooting scene, the electronic device can not only provide the user with a clear target image, but also add an electronic photo frame with shooting information and personalized information to the target image. The user can choose according to personal preferences, which can improve the user's shooting experience.

[0082] For example, the electronic device described in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) / virtual reality (VR) device, a media player, a wearable device, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

[0083] In the embodiment of the present application, the electronic device is a mobile phone 100 as an example, and the hardware structure of the electronic device is introduced through the mobile phone 100. Figure 4 As shown, the mobile phone 100 may include: a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc.

[0084] Among them, the processor 110 may include one or more processing units, for example: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a memory, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and / or a neural network processor (neural-network processing unit, NPU), a driver processor, etc. Among them, different processing units can be independent devices or integrated in one or more processors. The processor 110 can be the nerve center and command center of the mobile phone 100. The processor 110 can generate an operation control signal according to the instruction opcode and the timing signal to complete the control of fetching and executing instructions.

[0085] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0086] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the mobile phone 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement a data storage function. For example, files such as music and videos are stored in the external memory card. In some implementations, images captured by the mobile phone 100 can be stored in the external memory card.

[0087] The internal memory 121 may be used to store computer executable program codes, which include instructions. The processor 110 executes various functional applications and data processing of the mobile phone 100 by running the instructions stored in the internal memory 121. For example, in an embodiment of the present application, the processor 110 may execute the instructions stored in the internal memory 121, and the internal memory 121 may include a program storage area and a data storage area.

[0088] The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), a configuration file of the motor 191, etc. The data storage area may store data created during the use of the mobile phone 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

[0089] The charging management module 140 is used to receive charging input from a charger. The charger can be a wireless charger or a wired charger. While the charging management module 140 charges the battery 142, it can also power the mobile phone 100 through the power management module 141.

[0090] The wireless communication function of the mobile phone 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor. In some embodiments, the antenna 1 of the mobile phone 100 is coupled with the mobile communication module 150, and the antenna 2 is coupled with the wireless communication module 160, so that the mobile phone 100 can communicate with the network and other devices through wireless communication technology.

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

[0092] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G, etc., applied to the mobile phone 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

[0093] The wireless communication module 160 can provide wireless communication solutions for application in the mobile phone 100, including wireless local area networks (WLAN) (such as Wi-Fi networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication technology (NFC), infrared technology (IR), etc.

[0094] In the embodiment of the present application, the mobile phone 100 can send the captured target image to other electronic devices through the mobile communication module 150 or the wireless communication module 160.

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

[0096] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), MiniLED, MicroLED, Micro-OLED, quantum dot light-emitting diodes (QLED), etc. After shooting, the mobile phone 100 can show the target image obtained after shooting to the user on the display screen 194.

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

[0098] For example, the mobile phone 100 may receive a photographing operation through the touch sensor 180K. In response to the photographing operation, the mobile phone 100 activates a target application and photographs a target image.

[0099] The mobile phone 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194 and the application processor. The ISP is used to process the data fed back by the camera 193. The camera 193 is used to capture a static image or a video. In some embodiments, the mobile phone 100 may include one or more cameras 193. For example, the one or more cameras 193 included in the mobile phone 100 may be a front camera or a rear camera.

[0100] It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device. In other embodiments, the electronic device may also include more or fewer modules than those provided in the above embodiments, and different interface connection methods in the above embodiments may be used between the modules, or a combination of multiple interface connection methods. The hardware structure of the electronic device provided in the embodiments of the present application can also refer to the hardware structure of the mobile phone 100 as shown in the figure. The methods in the following embodiments can all be implemented in an electronic device having the above hardware structure.

[0101] In the embodiment of the present application, the software system of the electronic device may adopt a layered architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture or a cloud architecture. Figure 5 As shown, in the embodiment of the present application, the electronic device is the above-mentioned mobile phone 100, and the software system of the electronic device adopts the layered architecture of the Android system as an example to illustrate the software structure of the electronic device.

[0102] The layered architecture divides the software into several layers, and the layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, namely, the application layer, the application framework layer, the system runtime layer, the hardware abstraction layer (HAL) and the kernel layer.

[0103] The application layer can include a series of application packages, including gallery, calendar, map, camera, music, SMS, call, navigation, Bluetooth, video and other applications.

[0104] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions. The application framework layer may include a window manager, an activity manager, an input manager, a resource manager, a notification manager, a view system, and a SH process.

[0105] The system runtime layer includes the Android runtime (ART) and native C / C++ libraries. The system runtime layer is also called the native service layer (native layer).

[0106] The Android runtime includes the core library and the virtual machine. The Android runtime is responsible for converting source code into machine code. The Android runtime mainly uses the ahead of time (AOT) compilation technology and the just in time (JIT) compilation technology.

[0107] The core library is mainly used to provide basic Java class library functions, such as basic data structures, mathematics, IO, tools, databases, networks, etc. The core library provides an API for users to develop Android applications.

[0108] The application layer and the application framework layer run in a virtual machine. The virtual machine executes the Java files of the application layer and the application framework layer as binary files. The virtual machine is used to perform functions such as object life cycle management, stack management, thread management, security and exception management, and garbage collection.

[0109] The native C / C++ library can include multiple functional modules, such as surface manager, media framework, etc.

[0110] The hardware abstraction layer runs in user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer. For example, the HAL layer may include a display HAL module, an audio HAL module, a camera HAL module, a Bluetooth HAL module, etc.

[0111] The kernel layer is the layer between hardware and software. The kernel layer includes drivers and operating system programs. The kernel layer includes display drivers, camera drivers, audio drivers, Bluetooth drivers, etc.

[0112] The following is an illustrative description of the workflow of the software and hardware of the mobile phone 100 in conjunction with the shooting scenario.

[0113] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, timestamp of the touch operation and other information). The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. Taking the control corresponding to the input event as the control corresponding to the camera application as an example, the application framework layer notifies the camera application of the input event. The camera application starts, and then starts the camera 193 by calling the camera driver of the kernel layer. The mobile phone 100 captures images or videos through the camera 193.

[0114] In the following embodiments, the method provided in the embodiments of the present application is introduced by taking the electronic device being a mobile phone and the target application being a camera application as an example.

[0115] In the embodiment of the present application, the multi-frame shooting software architecture of the mobile phone includes a camera application, a service host (SH) process and a camera HAL module. The multi-frame shooting software architecture can be referred to as the SH architecture. The interaction between the camera application, the SH process and the camera HAL module involved in the SH architecture is as follows: Figure 6As shown, the SH process is located at the application framework layer and is used to synthesize the target image.

[0116] In one implementation of this embodiment, the mobile phone receives a shooting operation of a user clicking a shooting button in a camera application interface. In response to the shooting operation, the camera application of the mobile phone sends at least one shooting request to the camera HAL module. The first shooting request in the at least one shooting request carries the number of image frames required to be collected in one shooting. In response to the at least one shooting request sent by the camera application, the camera HAL module of the mobile phone instructs the camera driver to control the camera to collect multiple image frames. The camera HAL module obtains multiple image frames collected by the camera and the shooting information corresponding to each image frame. Further, the camera HAL module of the mobile phone transfers the obtained multiple image frames to the SH process of the mobile phone. The camera HAL module of the mobile phone also determines the shooting information for display according to the multiple shooting information corresponding to the multiple image frames, and reports the shooting information for display to the camera application. After receiving the shooting information reported by the camera HAL module, the camera application synthesizes the image data carrying the shooting information and transfers the image data carrying the shooting information to the SH process. The SH process synthesizes the target image with the multiple image frames collected by the camera and the image data carrying the shooting information. The format of the synthesized target image is JPG format. Furthermore, if the mobile phone receives a viewing operation of the user to view the target image, the mobile phone displays the synthesized target image on the display screen of the mobile phone in response to the viewing operation. In this way, the mobile phone can display the target image carrying the shooting information on the display screen.

[0117] In an embodiment of the present application, in the multi-frame shooting solution provided by the SH architecture, it is difficult for the camera HAL module to identify the current shooting mode and determine the number of image frames required for one shooting. As a result, it is difficult for the camera HAL module to respond to a shooting request from the camera application to obtain a certain number of multiple image frames and determine when to report the shooting information to the camera application.

[0118] In one example, the camera application of the mobile phone enables the camera HAL module to obtain a certain number of multiple image frames by sending multiple shooting requests to the camera HAL module. One shooting request corresponds to one image frame. The number of multiple shooting requests is the same as the target number corresponding to the HDR mode. For example, taking the case where the mobile phone captures 3 image frames in one shooting in HDR mode as an example, in response to the shooting operation of the user clicking the shooting button once, the camera application of the mobile phone sends 3 shooting requests to the camera HAL module. If the user clicks the shooting button again, in response to the shooting operation of the user clicking the shooting button again, the camera application of the mobile phone sends 3 shooting requests to the camera HAL module again. In response to the multiple shooting requests of the camera application, the camera HAL module can sequentially obtain the target number of multiple image frames. Among them, the camera HAL module responds to the first shooting request among the multiple shooting requests, and can report the shooting information for display to the camera application.

[0119] In another example, the camera application of the mobile phone sends a shooting request to the camera HAL module, so that the camera HAL module acquires a certain number of multiple image frames. The shooting request carries an indicator, which is used to indicate the target number of image frames collected by the mobile phone. For example, take the example of capturing 3 image frames with a single shooting of the mobile phone in HDR mode. In response to the shooting operation of the user clicking the shooting button once, the camera application of the mobile phone sends a shooting request to the camera HAL module. The shooting request carries the indicator "3". In response to the shooting request of the camera application, the camera HAL module can sequentially acquire the target number of multiple image frames and report the shooting information for display to the camera application once.

[0120] In another implementation of this embodiment, the camera HAL module of the mobile phone can transmit the multiple shooting information corresponding to the multiple image frames to the camera application. The camera application of the mobile phone determines the shooting information for display according to the multiple shooting information corresponding to the multiple image frames. The other shooting processes of the mobile phone can refer to the previous implementation of this embodiment, which will not be repeated here.

[0121] It is understandable that the camera HAL module of the mobile phone reports the shooting information of each image frame to the camera application of the mobile phone, which can simplify the processing flow of the camera HAL module. The camera HAL module of the mobile phone reports a shooting information to the camera application of the mobile phone, which can reduce the amount of data transmitted between the camera HAL module of the mobile phone and the camera application, and has less impact on the memory and performance of the mobile phone. These two different implementation methods have their own focuses, and the appropriate implementation method can be selected according to the actual application scenario or needs.

[0122] In the embodiment of the present application, compared with the SIT architecture, the SH architecture of the mobile phone sets the SH process in the application framework layer. The SH process is used to synthesize the target image carrying the shooting information. The SH process can execute part of the image processing functions of the camera HAL module in the SIT architecture. For example, the SH process can process and synthesize the target image. Since the HAL layer has a strong dependence on the processor chip, the functions performed by the HAL layer are difficult to flexibly change or set. By setting the SH process in the application framework layer, the mobile phone can more flexibly implement the multi-frame shooting process and reduce the dependence of the multi-frame shooting process on the chip.

[0123] The following uses the above SH architecture as an example to introduce the method provided by the embodiment of the present application. In the example, the camera application of the mobile phone generates multiple shooting requests, and each shooting request triggers the mobile phone to capture an image frame. Figure 7 As shown, the method provided in the embodiment of the present application includes the following steps:

[0124] S701, in response to a shooting operation, a camera application of a mobile phone sends a plurality of shooting requests to a camera HAL module.

[0125] The mobile phone is provided with a camera application. The mobile phone can display the application interface of the camera application to the user. The mobile phone receives a shooting operation in the application interface of the camera application. The shooting operation is used to instruct the mobile phone to shoot an image.

[0126] For example, a plurality of shooting modes and shooting buttons may be set in the application interface of the camera application. The mobile phone receives a shooting operation of the user clicking the shooting button in a shooting mode in the application interface of the camera application.

[0127] It is understandable that in a multi-frame shooting scenario, the shooting operation received by the mobile phone can trigger the mobile phone to collect multiple image frames. After the mobile phone collects multiple image frames, it synthesizes the multiple image frames into one image and provides it to the user. For the user, the mobile phone performs one shooting under the control of the shooting operation and obtains one image.

[0128] In response to the shooting operation, the camera application of the mobile phone can determine the number of image frames corresponding to the shooting mode of the mobile phone (which can be called the target number). The target number can represent the number of image frames required to be obtained in the current shooting mode in one shooting. Further, the camera application of the mobile phone sends multiple shooting requests to the camera HAL module of the mobile phone. Each shooting request is used to indicate the acquisition of an image frame. The number of multiple shooting requests is the same as the target number.

[0129] For example, if the shooting mode selected by the user is HDR mode, the number of image frames corresponding to HDR mode is 6, which means that the mobile phone collects 6 image frames in one shooting and synthesizes the 6 image frames to display the target image to the user. Figure 8As shown, in response to two consecutive shooting operations by the user, the camera application of the mobile phone sends 12 shooting requests to the camera HAL module of the mobile phone, wherein every 6 shooting requests correspond to one shooting.

[0130] Exemplarily, the camera module of the mobile phone can send multiple shooting requests to the camera HAL module of the mobile phone in sequence at preset time intervals. The preset time interval can be set according to the actual application scenario or demand. For example, the preset time interval can be a value such as 5 milliseconds, 10 milliseconds, etc. The embodiment of the present application is not limited to this. Alternatively, the camera module of the mobile phone can also send multiple shooting requests to the camera HAL module of the mobile phone concurrently.

[0131] In an embodiment of the present application, the multiple shooting requests sent by the camera application of the mobile phone to the camera HAL module include a first shooting request. The first shooting request is any one of the multiple shooting requests. The first shooting request carries an indicator, which is used to indicate the target number of image frames collected by the mobile phone. As described above, it is difficult for the camera HAL module in the SH architecture to identify the current shooting mode, so that it is difficult for the camera HAL module to perceive the start and end of a shooting. The first shooting request sent by the camera application to the camera HAL module carries an indicator, which can indicate the number of image frames (i.e., the target number) required for one shooting in the current shooting mode. The indicator is also used to indicate the acquisition of a set of shooting parameters for display. After receiving the indicator carried in the first shooting request, the camera HAL module can return a set of shooting parameters for display (i.e., shooting information for display) to the camera application.

[0132] S702, the camera HAL module of the mobile phone responds to multiple shooting requests, obtains multiple image frames and multiple shooting information, and sends the multiple image frames to the SH process.

[0133] The camera HAL module of the mobile phone receives multiple shooting requests sent by the camera application. Each time the camera HAL module of the mobile phone receives a shooting request sent by the camera application, it notifies the camera driver of the mobile phone to capture an image frame to obtain an image frame captured by the camera of the mobile phone and the shooting information of the image frame. In response to multiple shooting requests, the camera HAL module of the mobile phone will sequentially obtain an image frame captured by the camera of the mobile phone and the shooting information of the image frame. If a shooting request received by the camera HAL module of the mobile phone carries an indication mark, then the shooting request is the first shooting request.

[0134] Multiple shooting requests sent by the camera application can be stored in the request queue. The camera HAL module of the mobile phone can sequentially obtain the shooting requests in the request queue for processing. For example, if one shooting corresponds to 6 shooting requests, Fig. 9As shown, there are three shooting requests corresponding to the shooting in the request queue, one arrow represents one shooting request, and multiple arrows corresponding to the same box represent multiple shooting requests corresponding to one shooting. In each of the three shootings, the camera HAL module receives a shooting request carrying the indicator "6" in the first shooting request, and the shooting request is the first shooting request.

[0135] S703, the camera HAL module of the mobile phone reports shooting information for display to the camera application in response to the first shooting request among the multiple shooting requests.

[0136] The camera HAL module of the mobile phone responds to the first shooting request among multiple shooting requests, can determine the shooting information for display based on the shooting information of at least one image frame among the multiple image frames obtained, and report the shooting information for display to the camera application.

[0137] Exemplarily, the first shooting request is the i-th shooting request among multiple shooting requests. i is a positive integer less than or equal to the target number. The camera HAL module of the mobile phone responds to the first shooting request, and determines the shooting information for display based on the shooting information of the first i image frames. For example, the camera HAL module can determine the average value or median value of the shooting information of the first i image frames as the shooting information for display. After determining the shooting information for display, the camera HAL module of the mobile phone reports the shooting information for display to the camera application of the mobile phone.

[0138] It is understandable that the camera application of the mobile phone can pre-agree with the camera HAL module on the order i of the first shooting request among multiple shooting requests in a shooting. The image frame obtained by the camera HAL module after receiving the i-th shooting request (i.e., the first shooting request) is the i-th image frame. The camera HAL module of the mobile phone can confirm the first image frame (the i-1th image frame before the current image frame) and the last image frame (the (target number - 1)th image frame after the current image frame) corresponding to this shooting based on the order i of the first shooting request among multiple shooting requests.

[0139] When the camera HAL module of the mobile phone receives the i-th shooting request and has not received the i+1-th shooting request, the camera of the mobile phone collects i image frames. The camera HAL module of the mobile phone can only obtain the shooting parameters of these i image frames. Generally, it is difficult for the camera HAL module of the mobile phone to obtain the shooting information of the image frames that are not collected by the camera of the mobile phone.

[0140] In some implementations, the first shooting request is the first shooting request among the multiple shooting requests. In this way, the camera HAL module of the mobile phone can determine the start of a shooting session when it receives the first shooting request. In addition, the first shooting request also carries an indicator, which is used to indicate the target number of image frames collected by the mobile phone. The camera HAL module of the mobile phone continuously obtains the target number of image frames and shooting information starting from the first shooting request, which belongs to one shooting session.

[0141] In order to improve the efficiency of a mobile phone in completing a shooting, in an example of the implementation method, the camera HAL module of the mobile phone responds to the first shooting request, and if the number of acquired image frames reaches a preset number, the shooting information for display is reported to the camera application.

[0142] For example, the target quantity is 6 and the preset quantity is 3. Figure 8 As shown, the camera HAL module of the mobile phone receives shooting requests corresponding to two shots. The first shooting request is the first shooting request in each shooting. The shooting request carries the indicator "6". In response to the first shooting request, the camera HAL module of the mobile phone starts to count the number of image frames obtained. If the number of image frames obtained by the camera HAL module of the mobile phone reaches 4, the camera HAL module of the mobile phone determines the shooting information for display based on the shooting information of these 4 image frames, and reports the shooting information for display to the camera application. In these two shots, the camera HAL module of the mobile phone can report 1 shooting information to the camera application in each shot, that is, report 1 shooting information in the first shot and report 1 shooting information in the second shot.

[0143] Here, the preset number is less than the target number. When the number of image frames reaches the preset number, the camera HAL module of the mobile phone reports the shooting information for display to the camera application. In this way, the camera HAL module of the mobile phone can return the shooting information for display to the camera application before obtaining the last image frame of a shot for use by the camera application, which can reduce the time the camera application waits for the camera HAL module to report the shooting information. Since the synthesis of the target image requires the shooting information provided by the camera application, if the camera HAL module of the mobile phone reports the shooting information for display to the camera application after obtaining the target number of image frames, then this will increase the time it takes for the mobile phone to synthesize the target image. It can be seen that the camera HAL module of the mobile phone reports the shooting information for display to the camera application when the number of image frames reaches the preset number, which can shorten the time it takes for the mobile phone to synthesize the target image and improve the efficiency of the mobile phone in completing a shot.

[0144] In another example of this implementation, the camera HAL module of the mobile phone responds to the first shooting request and reports shooting information for display to the camera application if the first image frame is acquired.

[0145] For example, the target number is 6. The first shooting request is the first shooting request in a shooting session. The camera HAL module of the mobile phone responds to the first shooting request and obtains an image frame and shooting information of the image frame. The image frame is the first image frame captured by the camera of the mobile phone in the current shooting. The mobile phone further determines the shooting information of the image frame as shooting information for display, and reports the shooting information for display to the camera application.

[0146] Here, the camera HAL module of the mobile phone responds to the first shooting request, that is, reports the shooting information for display to the camera application, which can shorten the time the camera application waits for the camera HAL module to report the shooting information to the greatest extent, thereby improving the efficiency of the mobile phone in completing a shooting.

[0147] S704, the camera application of the mobile phone sends image data carrying shooting information to the SH process.

[0148] After receiving the shooting information sent by the camera HAL module, the camera application of the mobile phone can generate image data carrying the shooting information. For example, the camera application of the mobile phone converts the shooting information into a bitmap image (bitmap) to obtain the image data carrying the shooting information. After the camera application obtains the image data carrying the shooting information, it sends the image data carrying the shooting information to the SH process in the application framework layer.

[0149] In some implementations, after receiving the shooting information sent by the camera HAL module, the camera application of the mobile phone can also combine the personalized information pre-selected by the user and the style of the electronic photo frame to synthesize an electronic photo frame in a bitmap image format. The electronic photo frame carries the shooting information and the personalized information.

[0150] Here, the camera application of the mobile phone can provide the user with electronic photo frames of various styles. The style parameters such as color, shape, text layout, etc. corresponding to the electronic photo frames of different styles can be different. The camera application of the mobile phone can add shooting information and personalized information to the electronic photo frame of the style pre-selected by the user, and obtain an electronic photo frame carrying the shooting information and personalized information. In this way, the mobile phone can provide the user with target images of electronic photo frames with various styles, thereby improving the user's shooting experience.

[0151] S705, the SH process of the mobile phone synthesizes multiple image frames and image data carrying shooting information to obtain a target image.

[0152] The SH process of the mobile phone obtains the image data carrying the shooting information from the camera application and obtains multiple image frames from the camera HAL module. The number of these multiple image frames is equal to the target number. After the SH process of the mobile phone obtains the image data carrying the shooting information and the multiple image frames, it can synthesize the image data carrying the shooting information and the multiple image frames to obtain the synthesized target image.

[0153] Here, the SH process of the mobile phone can also obtain the indicator carried in the first shooting request from the camera HAL module, so that the SH process can determine the number of image frames to be synthesized (equal to the target number indicated by the indicator) through the indicator, and then synthesize multiple image frames of the target number with the image data carrying the shooting information.

[0154] Exemplarily, the SH process of the mobile phone may first synthesize multiple image frames to obtain an original image, and then the SH process of the mobile phone synthesizes the original image and the image data carrying the shooting information to obtain a target image.

[0155] In the example, the SH process of the mobile phone can superimpose the image data carrying the shooting information on the original image during the synthesis of the original image and the image data carrying the shooting information. In this way, the shooting information can be presented in the synthesized target image for the user to view. When the user controls the mobile phone to view the target image, the mobile phone displays the target image carrying the shooting information. Through the target image, the user can view the captured scene and the shooting information corresponding to the target image.

[0156] In order to meet the user's need to view the original image, in some implementations, the mobile phone can save the original image after synthesizing multiple image frames through the SH process to obtain the original image. The original image does not carry the shooting information. If the mobile phone finishes shooting this time (that is, the target image is synthesized), it may also receive a viewing operation of the user to view the original image. In response to the user's viewing operation of viewing the original image, the mobile phone displays the original image shot this time to the user.

[0157] In some examples of this implementation, in order to reduce the impact of the original image on the storage space of the mobile phone, the mobile phone can also delete the original image when the storage time of the original image reaches a preset time, thereby releasing the storage space occupied by the original image.

[0158] Here, the preset duration can be set according to the actual application scenario or demand. For example, taking the preset duration as 30 days as an example, when the storage duration of an original image reaches 30 days, the mobile phone deletes the original image. In this way, the memory space of the mobile phone can be saved.

[0159] In some other examples of this implementation, the mobile phone can also count the cumulative time that an original image has not been viewed. The cumulative time can start from the moment the original image is generated. Alternatively, the cumulative time can start from the moment the user finishes viewing the original image after the mobile phone displays the original image in response to the user's viewing operation. If the cumulative time reaches a preset time, such as 30 days, the mobile phone can delete the original image to release the storage space occupied by the original image.

[0160] Here, if the mobile phone displays the original image to the user in response to the user's viewing operation, the mobile phone can clear the accumulated time corresponding to the original image. After the user finishes viewing the original image, the mobile phone re-counts the accumulated time corresponding to the original image.

[0161] In the method provided by the embodiment of the present application, in a multi-frame shooting scenario, the camera application of the mobile phone sends multiple shooting requests to the camera HAL module. One of the multiple shooting requests carries an indicator, which indicates the number of image frames collected by the mobile phone in one shooting. In this way, the camera HAL module can sense the number of image frames collected in one shooting, so that a set of shooting parameters (i.e., shooting information for display) can be returned to the camera application in one shooting, so as to realize the display of shooting parameters under the SH architecture.

[0162] In some other embodiments of the present application, an electronic device is provided, including: a memory and one or more processors. The memory is coupled to the processor. The memory stores a computer program code, which includes computer instructions. When the computer instructions are executed by the processor, the electronic device can perform each function or step in the above method embodiment. Of course, the electronic device can also include other hardware structures. For example, the electronic device also includes hardware structures such as a camera and a display screen. The structure of the terminal can refer to Figure 4 The structure of the mobile phone 100 is shown.

[0163] The embodiment of the present application also provides a chip system, which is applied to an electronic device. The chip system includes at least one processor and at least one interface circuit. The processor and the interface circuit can be interconnected by lines. For example, the interface circuit can be used to receive signals from other devices (such as memory). For another example, the interface circuit can be used to send signals to other devices (such as processors). Exemplarily, the interface circuit can read instructions stored in the memory and send the instructions to the processor. When the instruction is executed by the processor, the electronic device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which are not specifically limited in the embodiment of the present application.

[0164] An embodiment of the present application also provides a computer-readable storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step in the above-mentioned method embodiment.

[0165] The embodiment of the present application also provides a computer program product, when the computer program product is run on a computer, the computer is enabled to perform each function or step in the above method embodiment. For example, the computer may be the above electronic device.

[0166] 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.

[0167] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0168] The units described as separate components may or may not be physically separated, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0169] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0170] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform 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.

[0171] The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. An image display method, characterized in that: Applied to an electronic device, the electronic device includes a target application with a shooting function, a camera hardware abstraction layer HAL module and a service host SH module; the method includes: Receive a shooting operation, wherein the shooting operation is used to trigger the target application to generate at least one shooting request, a first shooting request in the at least one shooting request carries an indication mark, the indication mark is used to indicate a target number of image frames collected by the electronic device in one shooting, and the target number is an integer greater than 1; the first shooting request is the i-th shooting request agreed upon by the target application and the camera HAL module; The camera HAL module receives the at least one shooting request; The camera HAL module obtains the target number of image frames in the one shooting and the shooting information for display in response to the at least one shooting request; The camera HAL module responds to a first shooting request among the at least one shooting request, if the number of acquired image frames reaches a preset number, or if the first image frame is acquired, reporting the shooting information for display to the target application; wherein the preset number is less than the target number; The target application synthesizes the image data carrying the shooting information for display, and sends the image data to the SH module; The SH module obtains the target number of image frames in the one shooting from the camera HAL module, synthesizes the image data and the target number of image frames, and obtains the target image carrying the shooting information; A target image carrying the shooting information is displayed; wherein the target image is synthesized from the target number of image frames.

2. The method according to claim 1, characterized in that In response to the at least one shooting request, acquiring shooting information for display includes: In response to the at least one shooting request, acquiring shooting information of at least one image frame among the target number of image frames; The shooting information for display is acquired according to the shooting information of the at least one image frame.

3. The method according to claim 2, characterized in that The acquiring the shooting information for display according to the shooting information of the at least one image frame includes: Using the shooting information of one image frame in the at least one image frame as the shooting information for display; or, An average value or a middle value of the shooting information of the at least one image frame is used as the shooting information for display.

4. The method according to claim 1, characterized in that The first shooting request is a first shooting request among the at least one shooting request.

5. The method according to claim 1, characterized in that The step of acquiring the target number of image frames and the shooting information for display in response to the at least one shooting request includes: In response to the at least one shooting request, the camera HAL module acquires the target number of image frames and shooting information of each image in the target number of image frames; The camera HAL module reports the shooting information of each image frame of the target number of image frames to the target application; The target application obtains the shooting information for display according to the shooting information of each image frame.

6. The method according to any one of claims 1 to 5, characterized in that The method further comprises: The target number is set according to a shooting mode indicated by the shooting operation.

7. The method according to any one of claims 1 to 5, characterized in that The shooting information includes one or more shooting parameters of focal length, aperture, shutter speed and sensitivity.

8. An electronic device, characterized in that: The electronic device comprises: a memory and one or more processors; the memory is coupled to the processor; The memory is used to store computer program codes, and the computer program codes include computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that: The method comprises computer instructions, which, when executed on an electronic device, cause the electronic device to execute the method as claimed in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Reproduction method, creation method, reproduction device, creation device, and recording medium

    CN109792504A

  • Image processing method and device

    CN111461950A

  • Image processing method, intelligent terminal and storage medium

    CN114298883A