Image capturing method and electronic device
The double exposure and/or double focusing method solves the problem that the moon and foreground objects are difficult to be clear at the same time in the same image, and achieves the effect of neither overexposure of the moon nor underexposure of the foreground, thereby improving the beauty of the image.
Patent Information
- Application Number
- PCT/CN2025/082383
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-03-29
- Filing Date
- 2025-03-13
- Publication Date
- 2025-10-02
AI Technical Summary
When photographing the moon and foreground objects, existing technologies make it difficult to simultaneously ensure that the moon is not out of focus and not overexposed, and that the foreground objects are not underexposed, resulting in an image that lacks aesthetic appeal.
Using the double exposure and/or double focusing method, different exposure parameters are set for the moon and foreground objects respectively, and the final image is synthesized through image fusion technology to ensure that both the moon and foreground objects are clear.
The moon and foreground objects are clearly visible in the same image, improving the beauty and quality of the image.
Smart Images

Figure CN2025082383_02102025_PF_FP_ABST
Abstract
Description
Image shooting method and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of the People's Republic of China on March 29, 2024, with application number 202410394154.7 and application name "A Method for Image Shooting and Electronic Device", the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of terminal technology, and in particular to an image capturing method and electronic device. Background Art
[0004] When users use electronic devices to capture night scenes, the moon is often the subject of the photo. For users who lack professional photography skills, the resulting images often only contain the moon, resulting in a monotonous and aesthetically pleasing image. Summary of the Invention
[0005] The embodiments of the present application provide an image capturing method and an electronic device, which are used to capture clear images of the moon and foreground objects in a scene of capturing the moon and foreground objects, thereby improving the beauty of the image.
[0006] In a first aspect, an image capture method is provided, applicable to an electronic device. The electronic device may be, for example, a mobile phone. The method may include: displaying a camera preview interface, the preview interface including a first preview image; upon recognizing that the first preview image includes the moon and a foreground object, entering moon mode; setting an exposure parameter to a first exposure parameter; focusing on the moon to acquire a first image; setting an exposure parameter to a second exposure parameter, the second exposure parameter being greater than the first exposure parameter; focusing on the foreground object to acquire a second image; and fusing the first and second images to obtain a third image.
[0007] In an embodiment of the present application, in a scenario of photographing the moon and a foreground object, the electronic device may first use a smaller exposure to restore the overexposed moon, then focus on the moon to obtain a first image, then use a larger exposure to make the foreground object in the image bright and visible, and then focus on the foreground object to obtain a second image. In the third image obtained by fusing the first and second images, both the moon and the foreground object are clear.
[0008] In one possible design, focusing on the foreground object includes: focusing on the foreground object according to the second exposure parameter.
[0009] In the embodiment of the present application, the exposure parameters of the foreground object affect the focus position of the foreground object, thereby realizing the linkage between exposure and focus and improving the focus accuracy.
[0010] In one possible design, focusing on the foreground object according to the second exposure parameter includes: determining a clarity threshold of the foreground object according to the second exposure parameter; moving the lens by a camera motor, calculating the clarity of the foreground object each time it moves to find a first position at which the clarity of the foreground object reaches the clarity threshold, and focusing on the foreground object when the lens is in the first position.
[0011] In an embodiment of the present application, for foreground objects, exposure can be performed first and then focus can be performed, and the exposure and focus can be linked together, that is, the clarity threshold is determined according to the exposure, and then the focus position is found based on the clarity threshold to avoid the situation where the foreground object is not properly exposed and cannot be focused.
[0012] In one possible design, focusing on the foreground object includes: focusing on the foreground object according to a distance between the foreground object and the electronic device.
[0013] In an embodiment of the present application, the electronic device can focus on the foreground object according to the distance between the foreground object and the electronic device to avoid the foreground object being out of focus due to inappropriate exposure.
[0014] In one possible design, the electronic device includes a first camera, and setting the exposure parameter to the first exposure parameter includes: setting the exposure parameter of the first camera to the first exposure parameter; focusing on the moon to obtain a first image includes: controlling the first camera to focus on the moon so that the first camera outputs the first image; setting the exposure parameter to the second exposure parameter includes: setting the exposure parameter of the first camera to the second exposure parameter; focusing on the foreground object to obtain a second image includes: controlling the first camera to focus on the foreground object so that the first camera outputs the second image.
[0015] In an embodiment of the present application, the same camera (i.e., the first camera) on the electronic device can perform secondary exposure and secondary focusing, so that the same camera can output a moon frame (i.e., the first image) and a foreground frame (i.e., the second image), thereby reducing the difficulty of aligning the moon frame and foreground frame images and improving the efficiency of image fusion.
[0016] In one possible design, the electronic device includes a first camera and a second camera, and setting the exposure parameter to the first exposure parameter includes: setting the exposure parameter of the first camera to the first exposure parameter; focusing on the moon to obtain a first image includes: controlling the first camera to focus on the moon so that the first camera outputs the first image; setting the exposure parameter to the second exposure parameter includes: setting the exposure parameter of the second camera to the second exposure parameter; focusing on the foreground object to obtain a second image includes: controlling the second camera to focus on the foreground object so that the second camera outputs the second image.
[0017] In an embodiment of the present application, two different cameras (i.e., a first camera and a second camera) on an electronic device can each use their own exposure parameters and focus positions to capture the moon and foreground objects. For example, the first camera uses a lower exposure and focuses on the moon to obtain a moon frame (i.e., a first image), while the second camera uses a higher exposure and focuses on the foreground to obtain a foreground frame (i.e., a second image). The images output by the two cameras are fused to obtain a third image. This approach reduces frame output time, shortens system latency, and provides a better user experience because the two cameras can output frames synchronously.
[0018] In one possible design, setting the exposure parameter to the second exposure parameter includes: evaluating the brightness of the foreground object, and setting the exposure parameter to the second exposure parameter according to the brightness of the foreground object.
[0019] In an embodiment of the present application, the electronic device may expose the foreground object according to the brightness of the foreground object. For example, a larger exposure may be used when the brightness is low to avoid underexposure of the foreground object.
[0020] In one possible design, the electronic device also includes a second camera, which is used to debug the exposure parameters of the foreground object. Setting the exposure parameters of the first camera to the second exposure parameters includes: setting the exposure parameters of the first camera to the second exposure parameters according to the third exposure parameters of the second camera.
[0021] In an embodiment of the present application, the electronic device includes a first camera and a second camera, and the first camera performs secondary exposure and secondary focusing so that the first camera outputs a moon frame (i.e., a first image) and a foreground frame (i.e., a second image). Moreover, before outputting the foreground frame, the first camera can expose the foreground object according to the third exposure parameters provided by the second camera to improve efficiency and exposure accuracy.
[0022] In one possible design, the exposure parameter of the first camera is set to the second exposure parameter based on the third exposure parameter of the second camera, including: setting the exposure parameter of the first camera to the second exposure parameter based on the third exposure parameter and the exposure calibration results of the first camera and the second camera.
[0023] In an embodiment of the present application, the electronic device includes a first camera and a second camera, and the first camera performs secondary exposure and secondary focusing so that the first camera outputs a moon frame (i.e., a first image) and a foreground frame (i.e., a second image). Moreover, before outputting the foreground frame, the first camera can correct the third exposure parameter provided by the second camera according to the exposure calibration results of the two cameras, and use the corrected exposure parameter to expose the foreground object to improve the accuracy of exposure.
[0024] In an embodiment of the present application, the electronic device can focus on the foreground object according to the distance between the foreground object and the electronic device to avoid the foreground object being out of focus due to being too low in brightness, blurred and invisible.
[0025] In one possible design, the electronic device also includes a second camera, which is used to focus on the foreground object. Controlling the first camera to focus on the foreground object includes: controlling the first camera to focus on the foreground object according to the first focus position of the second camera.
[0026] In an embodiment of the present application, the electronic device includes a first camera and a second camera, and the first camera performs secondary exposure and secondary focusing so that the first camera outputs a moon frame (i.e., a first image) and a foreground frame (i.e., a second image). Moreover, before outputting the foreground frame, the first camera can focus on the foreground object according to the first focus position provided by the second camera to improve efficiency and focusing accuracy.
[0027] In one possible design, the first camera is controlled to focus on the foreground object according to the first focus position of the second camera, including: controlling the first camera to focus on the foreground object according to the first focus position and the focus position calibration results of the first camera and the second camera.
[0028] In an embodiment of the present application, the electronic device includes a first camera and a second camera, and the first camera performs secondary exposure and secondary focusing so that the first camera outputs a moon frame (i.e., a first image) and a foreground frame (i.e., a second image). Moreover, before outputting the foreground frame, the first camera can correct the first focus position provided by the second camera according to the focus position calibration results of the two cameras, and use the corrected focus position to focus on the foreground object to improve the accuracy of focusing.
[0029] In one possible design, the first exposure parameter includes at least one of a first aperture, a first exposure time, and a first ISO value; the second exposure parameter includes at least one of a second aperture, a second exposure time, and a second ISO value; and the second exposure parameter is greater than the first exposure parameter and includes at least one of the following:
[0030] The second aperture is larger than the first aperture;
[0031] The second exposure duration is longer than the first exposure duration;
[0032] The second ISO value is greater than the first ISO value.
[0033] It should be noted that several examples of exposure parameters are given above. Exposure parameters can also be described by other parameters, which is not limited in the embodiments of the present application.
[0034] In one possible design, before entering the moon mode, the method further includes: determining that the foreground object satisfies at least one of the following conditions:
[0035] The foreground object is a preset object;
[0036] The distance between the foreground object and the electronic device is less than a preset distance;
[0037] The area occupied by the foreground object in the first preview image is larger than a preset area;
[0038] The retention time of the foreground object in the first preview image is greater than a preset time.
[0039] In an embodiment of the present application, when the electronic device determines that there is a foreground object on the first preview image, it can determine whether the foreground object meets the conditions. If so, it enters the moon mode to avoid wasting resources due to mistakenly entering the moon mode.
[0040] In one possible design, the first preview image is an image output by the first camera, and the method further includes: displaying a second preview image in the preview interface, where the second preview image is an image output by the second camera.
[0041] In this embodiment of the present application, the camera's preview interface can display a preview image output by the first camera and a preview image output by the second camera. If the first camera uses a lower exposure and focuses on the moon, the moon will be clear in the preview image of the first camera in the preview interface. If the second camera uses a higher exposure and focuses on a foreground object, the foreground object will be bright and clear in the preview image of the second camera in the preview interface. In this way, through the preview interface, the user can see the final imaging effect of the moon and the foreground object, providing a better experience.
[0042] In one possible design, the second preview image is displayed floating over the first preview image, and / or at least one of the position and display area of the second preview image is adjustable. In this way, users can adjust the display position and area of the preview image according to their needs to better view the imaging effect of the moon and foreground objects, providing a better experience.
[0043] In one possible design, the method further includes: updating the first preview image to the third image.
[0044] In the embodiment of the present application, the preview image is an image obtained by using secondary exposure + secondary focus and fusion, so the user can see the imaging effect through the preview image, thereby improving the user experience.
[0045] In one possible design, when a shooting instruction is received, the third image is stored.
[0046] In this embodiment of the present application, when the electronic device receives a capture command, it stores the preview image as the captured image. Therefore, the effect the user sees through the preview image is the final captured effect, which can be understood as "what you see is what you get." Because the preview image is obtained through double exposure and double focus fusion, the moon and foreground objects in the preview image are clear. Moreover, after the user clicks the camera button, the preview image is directly stored, eliminating the need for a long wait, providing a better user experience.
[0047] In one possible design, when an operation for a shooting button is received, the exposure parameter is a first exposure parameter; the moon is focused on to obtain a fourth image; the exposure parameter is set to the second exposure parameter; the foreground object is focused on to obtain a fifth image; the fourth image and the fifth image are fused to obtain a sixth image and the sixth image is stored.
[0048] In an embodiment of the present application, the preview image is obtained by double exposure + double focusing. When the electronic device receives a shooting instruction, it obtains an image again by double exposure + double focusing and stores the image as the captured image.
[0049] In one possible design, when the first image includes only the moon and the second image includes the moon and a foreground object, fusing the first image and the second image to obtain a third image includes: filling the area where the moon is located in the second image with the background to obtain a fourth image; and fusing the fourth image with the first image to obtain a third image.
[0050] In an embodiment of the present application, the moon on the foreground frame (i.e., the second image) is filled with the background, and then the fourth image with the background filling is fused with the foreground frame (i.e., the first image). This method can avoid inaccurate fusion due to the halo on the moon on the foreground frame when the foreground frame and the moon frame are directly fused.
[0051] In a possible design, when both the first image and the second image include the moon and a foreground object, the first image and the second image are fused to obtain a third image, and the area where the foreground object is located on the first image is filled with the background to obtain a fifth image; the area where the moon is located on the second image is filled with the background to obtain a sixth image; and the fifth image and the sixth image are fused to obtain a third image.
[0052] In an embodiment of the present application, the foreground object on the moon frame (i.e., the first image) is filled with the background to obtain the fifth image, and the moon on the foreground frame (i.e., the second image) is filled with the background to obtain the sixth image, and then the fifth image and the sixth image are fused. This method can avoid inaccurate fusion due to the appearance of halo on the moon on the foreground frame when the foreground frame and the moon frame are directly fused.
[0053] In a second aspect, the present application provides an electronic device comprising modules / units for executing the method corresponding to any one of the designs in the first aspect. These modules / units may be implemented in hardware or in hardware executing corresponding software implementations.
[0054] In a third aspect, the present application provides an electronic device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes a method as described in any one of the above-mentioned first aspects.
[0055] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program. When the computer program is executed by at least one processor, the method as described in any one of the above-mentioned first aspects is implemented.
[0056] In a fifth aspect, the present application provides a computer program product, which includes a computer program. When the computer program is run on a computer, the computer can execute the method as described in any one of the above-mentioned first aspects.
[0057] In a sixth aspect, the present application provides a chip comprising a processor and an interface; the processor is configured to read instructions through the interface to execute a method as described in any one of the above-mentioned first aspects.
[0058] The beneficial effects of the design in any of the second to sixth aspects mentioned above can refer to the beneficial effects of the corresponding design in the first aspect mentioned above, and this application will not elaborate on them one by one. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] FIG1A is a schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0060] FIG1B is another schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0061] FIG2A is another schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0062] FIG2B is another schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0063] FIG3 is a schematic diagram of a flow chart of an image capturing method provided by an embodiment of the present application;
[0064] FIG4 is another schematic flow chart of an image capturing method according to an embodiment of the present application;
[0065] FIG5 is another schematic flow chart of an image capturing method according to an embodiment of the present application;
[0066] FIG6 is another schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0067] FIG7 is a schematic diagram of a flow chart of an image capturing method provided by an embodiment of the present application;
[0068] FIG8 is another schematic diagram of a flow chart of an image capturing method according to an embodiment of the present application;
[0069] FIG9 is another schematic flow chart of an image capturing method according to an embodiment of the present application;
[0070] FIG10 is another schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0071] FIG11 is a schematic diagram of a flow chart of an image capturing method provided by an embodiment of the present application;
[0072] FIG12 is another schematic flow chart of an image capturing method according to an embodiment of the present application;
[0073] FIG13 is another schematic flow chart of an image capturing method according to an embodiment of the present application;
[0074] FIG14 is another schematic diagram of a user photographing the moon using an electronic device according to an embodiment of the present application;
[0075] FIG15 is a schematic structural diagram of an electronic device provided in one embodiment of the present application;
[0076] FIG16 is another structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0077] Below, some terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0078] The at least one involved in the embodiments of the present application includes one or more; wherein, more means greater than or equal to two. In addition, it should be understood that in the description of this specification, words such as "first" and "second" are only used for the purpose of distinguishing the description, and cannot be understood as expressing or implying relative importance, nor can they be understood as expressing or implying order. For example, the first camera and the second camera do not represent the importance of the two or the order of the two, but are only for distinguishing the description. In the embodiments of the present application, "and / or" is only a description of the association relationship, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship.
[0079] The directional terms mentioned in the embodiments of the present application, such as "up", "down", "left", "right", "inside", "outside", etc., are only references to the directions in the drawings. Therefore, the directional terms used are for better and clearer explanation and understanding of the embodiments of the present application, rather than indicating or implying that the referred device or element must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the embodiments of the present application.
[0080] References to "one embodiment," "in some examples," or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the specification. Thus, phrases such as "in some examples," "in one embodiment," "in some other embodiments," and "in other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.
[0081] The image capture method provided in the embodiments of the present application can be applied to electronic devices. The electronic device can be any device with an image capture function. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a personal computer (PC), an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc.; or, it can also be a wearable device such as a watch or a bracelet; or, it can also be a vehicle-mounted device, such as various types of vehicles or a shooting device mounted on a vehicle; of course, the vehicle can also be replaced by other vehicles or transportation such as trains, aircraft, mobile platforms, etc., and this application does not limit this; or, the electronic device can also be a virtual reality (VR) device, an augmented reality (AR) device, a mixed reality (MR) device, etc. In short, the embodiments of the present application do not limit the specific type of electronic device.
[0082] The following uses a mobile phone as an example to illustrate the image capturing method provided by the embodiment of the present application in conjunction with the accompanying drawings.
[0083] When users use their mobile phones to shoot night scenes, the moon is often the subject of the photo. Optionally, users can use the following two shooting methods to shoot the moon using their mobile phones.
[0084] One shooting method is to only shoot the moon. For example, after the user starts the camera application on the mobile phone, by adjusting the shooting angle, magnification, etc., the camera preview image only includes the moon. For example, as shown in Figure 1A, the camera preview image only includes the moon. In order to capture a clear moon, the mobile phone can focus on the moon. Moreover, since the moon itself is relatively bright, in order to prevent the moon from being overexposed, a low exposure method can be used for shooting. In this way, the captured image only includes the moon, and the moon is not out of focus or overexposed, and the brightness is appropriate and relatively clear. However, such an image is relatively monotonous, empty, and lacks a sense of atmosphere and beauty.
[0085] Another shooting method is to shoot the moon and the foreground object. For example, after the user starts the camera application in the mobile phone, by adjusting the shooting angle, magnification, etc., the camera's preview image includes both the moon and the foreground object. The foreground object can be any object, such as plants, animals, people, buildings, etc. For example, as shown in Figure 1B, the camera's preview image includes the moon and leaves. In order to capture a clear moon, the mobile phone can focus on the moon, and in order to prevent the moon from being overexposed, a low exposure method can be used to shoot. In this way, the moon in the captured image is not out of focus or overexposed, and the moon and the foreground object can interact with each other, enhancing the atmosphere and beauty.
[0086] It should be noted that in the second shooting method mentioned above, in order to prevent the moon in the image from being out of focus or overexposed, the mobile phone focuses on the moon and shoots with a low exposure. However, in this case, the foreground object in the image will be underexposed and out of focus. For example, in Figure 1B, the foreground object is underexposed and out of focus. Underexposure will cause the foreground object to be very dark and not bright enough, and out of focus will cause the foreground object to be blurred and unclear. The specific reasons may include at least one of the following two items.
[0087] (1) To prevent the moon from being overexposed, the phone uses a low exposure for shooting. However, if the exposure is too low and the environment is too dark, the foreground object will be underexposed, which will cause the foreground object to be darker and not bright enough to be visible in the image. Of course, the user can increase the exposure to enhance the brightness of the foreground object, but after increasing the exposure, the moon will be overexposed. In other words, in the scene of shooting the moon and the foreground object, the moon requires a smaller exposure, while the foreground object requires a larger exposure. The exposure requirements of the two are quite different and cannot be met at the same time.
[0088] (2) In order to prevent the moon from being out of focus, the mobile phone focuses on the moon to shoot. However, when focusing on the moon, the focus position of the moon and the focus position of the foreground object are very different, resulting in the inability to focus on the foreground object, causing the foreground object to be out of focus. Of course, the mobile phone can also focus on the foreground object, but when focusing on the foreground object, the focus position of the moon and the focus position of the foreground object are also very different, resulting in the inability to focus on the moon. In other words, in the scene of shooting the moon and the foreground object, the moon and the foreground object cannot be focused at the same time. Among them, the reason why the focus position of the moon and the focus position of the foreground object are very different is that in the real scene, the moon is at an infinite distance, and the distance between the moon and the foreground object is very far. For the mobile phone camera, the difference between the focus position of the moon and the focus position of the foreground object is very large.
[0089] In summary, the shooting method described above allows you to capture an image in which both the moon and the foreground object are not out of focus, and the moon is not overexposed, and the foreground is not underexposed.
[0090] In view of this, an embodiment of the present application provides an image shooting method, in which, when a mobile phone shoots the moon and a foreground object, double exposure and / or double focusing can be used for shooting. Double exposure can include using a lower exposure for the moon and a higher exposure for the foreground object, and the images obtained by the double exposure are fused to obtain a shot image, so that the moon in the image is not overexposed and the foreground object is not underexposed. Double focusing can include focusing on the moon once and focusing on the foreground object once, and the images obtained by the double focusing are fused to obtain a shot image, so that neither the moon nor the foreground object in the image is out of focus. Therefore, the technical solution provided by the embodiment of the present application can improve the quality of the captured image in the scenario of shooting the moon and foreground objects.
[0091] As an example, please refer to Figure 2A, which is a schematic diagram of the process of a user using a mobile phone to shoot the moon according to an embodiment of the present application. As shown in (a) of Figure 2A, the mobile phone displays a graphical user interface (GUI), which is the mobile phone desktop. The mobile phone desktop includes an icon 201 of the camera application. When the mobile phone receives an operation for icon 201, a preview interface 202 as shown in (b) of Figure 2A is displayed. The preview interface 202 includes a preview image. The preview image includes the moon and foreground objects (for example, leaves). In this example, the preview image is obtained through the technical solution provided by the embodiment of the present application, so the moon and foreground objects in the preview image are relatively clear. When the mobile phone receives an operation for the camera button, an image is captured, and the moon and foreground objects in the image are relatively clear. In this example, the user can feel the final film effect through the preview image, which is a good experience.
[0092] It should be noted that in (b) of FIG2A , when the mobile phone displays the preview image, the technical solution provided by the embodiment of the present application has been activated, and the preview image is obtained through the technical solution provided by the embodiment of the present application. In other embodiments, considering that the user may not take a photo or wait for a long time before taking a photo after opening the preview image of the camera, if the technical solution provided by the embodiment of the present application is activated when the preview image is displayed, a large amount of calculation will be generated, resulting in a waste of resources. Therefore, as another example, when the mobile phone displays the preview image, there is no need to activate the technical solution provided by the embodiment of the present application. When the mobile phone receives an operation for the camera button, the technical solution provided by the embodiment of the present application is activated to take a photo, ensuring that the moon and the foreground object in the captured image are clear.
[0093] As an example, please refer to Figure 2B, which is another schematic diagram of the process of a user using a mobile phone to photograph the moon according to an embodiment of the present application. As shown in (a) of Figure 2B, the mobile phone displays a GUI, which is the mobile phone desktop. The mobile phone desktop includes an icon 201 for the camera application. When the mobile phone receives an operation on icon 201, a preview interface 202 as shown in (b) of Figure 2B is displayed. The preview interface 202 includes a preview image. In this example, the preview image is not obtained using the technical solution provided by the embodiment of the present application. For example, the moon in the preview image is clear, while the foreground object is blurred and out of focus. When the mobile phone receives an operation on the camera button, the image is captured and stored using the technical solution provided by the embodiment of the present application. For example, the interface shown in (c) of Figure 2B is displayed, which includes a thumbnail 203 of the captured image. When the mobile phone receives an operation on the thumbnail 203, the interface shown in (d) of Figure 2B is displayed, which includes an image captured using the technical solution provided by the embodiment of the present application, in which both the moon and the foreground object are clear. In this example, although the moon and the foreground object are clear in the preview image, both the moon and the foreground object are clear in the final captured image. Moreover, since the technical solution provided in the embodiment of the present application is not activated during the display of the preview image, the amount of calculation can be saved and waste of resources can be avoided.
[0094] The technical solutions provided by the embodiments of the present application are described in detail below. As mentioned above, in the technical solutions provided by the embodiments of the present application, when a mobile phone shoots the moon and foreground objects, double exposure and / or double focus can be used for shooting. Therefore, the embodiments of the present application include three solutions: the first solution, double exposure; the second solution, double focus; the third solution, double exposure + double focus. These three solutions are described below respectively. It should be noted that any technical feature in any of the three solutions below can be applied to the other two solutions. In order to save space, the technical features described in one solution will not be repeated in the other two solutions.
[0095] The first option is double exposure
[0096] In this solution, when the mobile phone shoots the moon and the foreground object, a double exposure can be performed. For example, a lower exposure is used for the moon and a higher exposure is used for the foreground object. The double exposure images are fused to obtain the captured image, so that the moon is not overexposed and the foreground object is not underexposed. It should be noted that the focus position can remain unchanged during the double exposure process of this solution, for example, the moon is always in focus. As mentioned above, when the moon is in focus, the foreground object cannot be in focus. It should be noted that in this solution, although the foreground object is not in focus, the problem of underexposure of the foreground object is solved through double exposure, which improves the brightness and visibility of the foreground object in the image and improves the image quality.
[0097] For example, see FIG3 , which is a flow chart of an image capture method provided in one embodiment of the present application. This method can be applied to electronic devices, such as mobile phones. As shown in FIG3 , the process includes:
[0098] S301, determine whether there is a moon in the preview image; if yes, execute S302, otherwise execute S301.
[0099] It is understandable that, before S301 , the following may also be included: the mobile phone starts a camera application and displays a preview image.
[0100] As an example, the mobile phone may include an image semantic recognition function that can recognize various objects in the preview image. The present embodiment of the present application does not elaborate on the image semantic recognition process.
[0101] S302, determine whether there is a foreground object in the preview image; if so, execute S304, otherwise, execute S303.
[0102] The embodiment of the present application does not limit the type of foreground object. For example, the foreground object may include any type of object such as a person, an animal, a plant, or a building. Optionally, when the mobile phone determines that a foreground object exists in the preview image, it may also determine whether the foreground object meets a condition. If so, step S304 is executed; if not, step S303 is executed. As an example, the condition may include at least one of the following:
[0103] (1) The foreground object is a preset object. Preset objects can include various types of objects such as people, animals, plants, and buildings. As an example, the preset objects can be stored in the mobile phone in advance. In other words, if the foreground object is not a preset object, there is no need to use the secondary focus shooting method.
[0104] (2) The distance between the foreground object and the phone is less than a preset distance. The preset distance may be 5m, 10m, 20m, etc., and the specific value is not limited in this embodiment of the application. For example, if the distance between the foreground object and the phone is very far, for example, the foreground object is a distant mountain, there is no need to use the secondary focus shooting method.
[0105] (3) The area occupied by the foreground object in the preview image is larger than a preset area; or, the ratio of the area occupied by the foreground object in the preview image to the total area of the preview image is larger than a preset value. The preset value may be, for example, 30%, 50%, etc. In other words, if the area occupied by the foreground object in the preview image is very small, it means that the user may not have adjusted the shooting angle properly, causing the foreground object to mistakenly enter the shooting range of the lens. In this case, there is no need to use the secondary focus shooting method. On the contrary, if the area occupied by the foreground object in the preview image is relatively large, it means that the foreground object is the object that the user wants to shoot, and the secondary focus shooting method can be used.
[0106] (4) The retention time of the foreground object in the preview image is longer than the preset time. The retention time can also be called the dwell time, the stable time, etc., or the time the foreground object exists in the preview image is longer than the preset time. It should be understood that if the foreground object appears briefly in the preview image, it means that the user may not have adjusted the shooting angle properly, causing the foreground object to mistakenly enter the shooting range of the lens. In this case, there is no need to use the secondary focus shooting method. On the contrary, if the foreground object stays in the preview image for a long time, it means that the foreground object is the object that the user wants to shoot, and the secondary focus shooting method can be used.
[0107] S303, enter the first moon mode.
[0108] In this embodiment, the first moon mode may include: a mode for photographing the moon using low exposure. Optionally, the first moon mode may also include: focusing on the moon.
[0109] As an example, after S303, the method may further include: outputting a first prompt message, where the first prompt message is used to prompt that the first moon mode has been entered. For example, the first prompt message may be a text message displayed in the preview interface of the camera.
[0110] S304, enter the second moon mode.
[0111] In this embodiment, the second moon mode may include: first photographing the moon with a low exposure to obtain a moon frame (i.e., a first image), then photographing a foreground object with a high exposure to obtain a foreground frame (i.e., a second image), and then fusing the moon frame and foreground frame; or first photographing a foreground object with a high exposure to obtain a foreground frame (i.e., a second image), then photographing the moon with a low exposure to obtain a moon frame (i.e., a first image), and then fusing the moon frame and foreground frame. Optionally, the second moon mode may further include: focusing on the moon.
[0112] As an example, after S304, the method may further include: outputting a second prompt message, the second prompt message being used to prompt that the second moon mode has been entered. For example, the second prompt message may be a text message displayed in the preview interface of the camera.
[0113] S305: Setting the exposure parameter to a first exposure parameter. For example, the first exposure parameter is relatively small, adapted to the moon, and can prevent the moon from being overexposed.
[0114] S306: Obtain a first image. It should be understood that the moon is not overexposed in the first image.
[0115] S307: Setting the exposure parameter to a second exposure parameter. The second exposure parameter is greater than the first exposure parameter. For example, the second exposure parameter is relatively large, adapted to the foreground object, and can make the foreground object in the image bright and visible.
[0116] In the embodiment of the present application, the first exposure parameter may include at least one of a first aperture, a first exposure time, and a first ISO value; the second exposure parameter includes at least one of a second aperture, a second exposure time, and a second ISO value. The second exposure parameter is greater than the first exposure parameter and includes at least one of the following:
[0117] (1) The second aperture is larger than the first. The aperture can be understood as the diameter of the hole that allows light to enter. The larger the aperture, the more light enters per unit time, and the greater the exposure. Because the shooting environment is dark, a smaller aperture can be used when shooting the moon. When shooting foreground objects, a larger aperture can be used to increase the brightness of the foreground object.
[0118] (2) The second exposure time is longer than the first exposure time. It should be understood that the longer the exposure time, the greater the amount of light entering and the greater the exposure. Since the shooting environment is dark, a shorter exposure time can be used when shooting the moon. When shooting foreground objects, the exposure time can be increased to increase the brightness of the foreground objects.
[0119] (3) The second ISO value is greater than the first ISO value. The ISO value is used to express the sensitivity of the photosensitive element. The larger the ISO value, the stronger the photosensitive element and the brighter the image. Conversely, the smaller the ISO value, the weaker the photosensitive element and the smaller the image brightness. Therefore, when photographing the moon, the camera can use a sensor with a smaller ISO value, while when photographing foreground objects, the camera can use a sensor with a larger ISO value.
[0120] In this embodiment of the present application, a second exposure parameter is used for the foreground object. Setting the exposure parameter to the second exposure parameter in S307 can be performed in a variety of ways, including but not limited to Method A and Method B. Method A uses the brightness evaluation result of the foreground object to set the exposure parameter to the second exposure parameter. Method B uses two cameras in the mobile phone, with the first camera outputting the first image and the second image, and the second camera debugging the exposure parameter of the foreground object. The first camera can set the exposure parameter to the second exposure parameter based on the exposure parameter provided by the second camera. Methods A and B will be described in detail later.
[0121] S308: Obtain a second image. It should be understood that the foreground object in the second image is not underexposed.
[0122] S309: Fusing the first image and the second image to obtain a third image.
[0123] In some embodiments, before S309 , the process may further include: registering the first image and the second image. The specific registration method is not limited in this embodiment of the application, and for example, binocular registration may be used.
[0124] In some embodiments, taking the example of keeping the moon in focus during the double exposure process, the first image may only include the moon (for example, the first image is obtained by a telephoto camera), and the moon is not overexposed or out of focus. The second image includes the moon and a foreground object (for example, the second image is obtained by a wide-angle camera), the foreground object is not underexposed, but the moon is out of focus and overexposed. In this case, one possible fusion method is that, since the first image does not contain the foreground object, and the foreground object is not underexposed in the second image, the mobile phone can outline the edge of the area where the foreground object is located in the second image, and copy or cut the area to fill it into the first image. Another possible fusion method is that, since the foreground object is not underexposed in the second image and the moon is overexposed, the mobile phone can fill the area where the moon is located in the second image with the background to obtain a fourth image, so that the moon disappears in the fourth image, and then fuse the fourth image with the first image. Alternatively, after obtaining the fourth image, the mobile phone can also outline the edge of the area where the moon is located in the first image, and copy or cut the area to fill it into the fourth image. It should be noted that considering that the moon in the second image has a halo due to overexposure, the area of the moon will be larger than the normal moon. Therefore, when the mobile phone uses the background fill in the area where the moon is located in the second image, the entire out-of-focus area of the moon can be filled with the background, so that the moon and the halo disappear in the fourth image.
[0125] In other embodiments, taking the example of maintaining focus on the moon during the double exposure process, the first image may include the moon and a foreground object (e.g., the first image is captured by a wide-angle camera). The moon is neither overexposed nor out of focus in the first image, but the foreground object is out of focus and underexposed. The second image may include the moon and a foreground object (e.g., the second image is captured by a wide-angle camera). The foreground object is not underexposed in the second image, but the moon is overexposed. In this case, one possible fusion method is for the phone to fill the area of the foreground object in the first image with background fill to obtain a fifth image, thereby eliminating the foreground object in the fifth image; fill the area of the moon in the second image with background fill to obtain a sixth image, thereby eliminating the moon in the sixth image; and then fuse the fifth and sixth images. Alternatively, after obtaining the fifth image, the phone may not need to perform background fill on the second image, but instead outline the edges of the area of the foreground object in the second image and copy or cut this area to fill the fifth image. Alternatively, the phone may not need to perform background fill on the first image, but instead outline the edges of the area of the moon in the first image and copy or cut this area to fill the sixth image.
[0126] As an example, the mobile phone can store the third image. Optionally, the mobile phone can also store the first image and / or the second image for the user to view and compare.
[0127] [Corrected on 20.05.2025 according to Rule 91] It should be noted that, in the embodiment shown in FIG3 , exposure to the moon is taken as an example, followed by exposure to the foreground object. It is understandable that exposure to the foreground object may also be taken as the first exposure, followed by exposure to the moon. In short, the order of the two exposures is not limited.
[0128] As an example, the process shown in Figure 3 can be executed immediately after the mobile phone launches the camera application. For example, after the mobile phone launches the camera application, S301 is immediately executed. When the third image is obtained through S301-S309, the third image can be used as the new preview image. In other words, the preview image of the mobile phone is the image obtained through double exposure. As another example, the process shown in Figure 3 can also be executed when the mobile phone receives an operation of the user clicking the camera button. For example, when the mobile phone receives an operation of the user clicking the camera button, S301 is executed. After the third image is obtained through S301-S309, the third image is stored as the captured image. As another example, the mobile phone can execute S301 immediately after launching the camera application. When the third image is obtained through S301-S309, the third image is used as the new preview image. Thereafter, if the mobile phone receives an operation for the camera button, there are two ways to handle it. First, the mobile phone can use zero shutter lag (ZSL) to obtain the captured image, storing the current preview image (i.e., the third image) as the captured image. In other words, the effect the user sees through the preview image is the final captured effect, which can be understood as "what you see is what you get." Second, when the mobile phone receives an operation on the camera button, it can execute S305-S309 again to obtain a new image, and store the new image as the captured image.
[0129] In some embodiments, the double exposure shown in Figure 3 can be two exposures performed by the same camera. For example, the mobile phone includes a first camera, and the double exposure is performed through the first camera. Exemplarily, the first camera can be a telephoto camera in the mobile phone. Of course, the first camera can also be other cameras, such as a main camera, a sub-main camera, a wide-angle camera, etc. The embodiment of the present application does not limit the type of the first camera. The double exposure process of the first camera may include: the first camera uses a first exposure parameter to shoot the moon to obtain a first image, and the first camera uses a second exposure parameter to shoot the foreground object to obtain a second image.
[0130] In the embodiment of the present application, before the first camera uses the second exposure parameter to capture the foreground object, the mobile phone needs to set the exposure parameter of the first camera to the second exposure parameter. The specific setting method may include at least one of the following methods A and B:
[0131] In method A, the phone can evaluate the brightness of the foreground object (e.g., RGB brightness) and set the exposure parameter of the first camera to the second exposure parameter based on the brightness of the foreground object. For example, if the foreground object is relatively bright, a larger exposure parameter can be used to prevent underexposure of the foreground object.
[0132] In method B, the mobile phone also includes a second camera, and the second camera is used to debug the exposure parameters of the foreground object. The mobile phone can set the exposure parameters of the first camera to the second exposure parameters according to the third exposure parameters of the second camera. Among them, the shooting ranges of the second camera and the first camera overlap, for example, the second camera and the first camera are both rear cameras, or both are front cameras, etc. As an example, the second camera can be a wide-angle camera, of course, it can also be other cameras, such as a main camera, a sub-main camera, a telephoto camera, an ordinary camera, etc. Optionally, the second camera and the first camera can be cameras of the same type, or cameras of different types, which is not limited in the embodiment of the present application. For the implementation process of method B, please refer to Figure 4. As shown in Figure 4, it is another flow chart of the image capture method provided in an embodiment of the present application. This method can be applicable to electronic devices, such as mobile phones. As shown in Figure 4, the process includes:
[0133] S401, determine whether there is a moon in the preview image. If yes, execute S402, otherwise continue to execute S401.
[0134] S402: Determine whether there is a foreground object in the preview image. If yes, execute S404; otherwise, execute S403.
[0135] S403, enter the first moon mode.
[0136] S404, enter the second moon mode.
[0137] Regarding the implementation principles of S401 to S404, please refer to S301 to S304 in Figure 3 above, and no further details will be given.
[0138] S405: The exposure parameter of the first camera is set to a first exposure parameter.
[0139] S406: The first camera obtains a first image.
[0140] S407: The second camera adjusts the exposure parameters of the foreground object to find an exposure parameter suitable for the foreground object.
[0141] S408: Provide the first camera with a third exposure parameter of the second camera. The third exposure parameter may be an exposure parameter adjusted by the second camera to capture a foreground object that is neither underexposed nor overexposed.
[0142] S409: Setting the exposure parameter of the first camera to the second exposure parameter according to the third exposure parameter of the second camera.
[0143] As an example, the third exposure parameter of the second camera is directly used as the second exposure parameter of the first camera. In other words, the third exposure parameter is the same as the second exposure parameter.
[0144] As another example, considering the differences between different cameras, when the third exposure parameter of the second camera is directly used as the second exposure parameter of the first camera, it may cause improper exposure of the first camera. To improve accuracy, the mobile phone can determine the second exposure parameter of the first camera based on the third exposure parameter of the second camera and the exposure calibration result between the first camera and the second camera, so that the foreground object in the image captured by the first camera based on the second exposure parameter is properly exposed and neither underexposed nor overexposed. Optionally, the exposure calibration result between the first camera and the second camera can be stored in the mobile phone in advance, for example, it can be configured when the mobile phone leaves the factory.
[0145] S410: The first camera obtains a second image.
[0146] S411: The first image and the second image are fused to obtain a third image.
[0147] Regarding the implementation principle of S411, please refer to S309 in FIG3 above, which will not be repeated here.
[0148] In the above embodiment, the moon frame (i.e., the first image) and the foreground frame (i.e., the second image) are respectively output through the same camera (i.e., the first camera). In this way, since the first image and the second image come from the same camera, they are naturally aligned and do not require additional alignment, which reduces the difficulty of alignment and improves efficiency.
[0149] In other embodiments, the double exposure process shown in Figure 3 can also be that two different cameras are exposed once respectively. For example, a mobile phone includes a first camera and a second camera. The first camera obtains a first image with a first exposure parameter, and the second camera obtains a second image with a second exposure parameter, that is, the two cameras are exposed separately and the exposure parameters are different, completing two exposures. The types of the first camera and the second camera can be found in the above description and will not be repeated here. For example, please refer to Figure 5, which is another flow chart of the image capture method provided in one embodiment of the present application. This method can be applied to electronic devices, such as mobile phones. As shown in Figure 5, the process includes:
[0150] S501, determine whether there is a moon in the preview image. If yes, execute S502, otherwise continue to execute S501.
[0151] S502: Determine whether there is a foreground object in the preview image. If yes, execute S504; otherwise, execute S503.
[0152] S503, enter the first moon mode.
[0153] S504, enter the second moon mode.
[0154] S505: The exposure parameter of the first camera is a first exposure parameter.
[0155] S506: The first camera obtains a first image.
[0156] S507: The exposure parameter of the second camera is a second exposure parameter, which is greater than the first exposure parameter.
[0157] S508: The second camera obtains a second image.
[0158] S509: Fusing the first image and the second image to obtain a third image.
[0159] Regarding the implementation principles of S501 to S509, please refer to S301 to S309 in Figure 3 above, and no further details will be given.
[0160] In the embodiment shown in FIG5 , dual cameras are used for separate exposure and shooting. Since the dual cameras can synchronously output frames, the frame output time is short, and the user does not need to wait for a long time, thereby improving the shooting experience.
[0161] In some embodiments, in the dual-camera scenario shown in FIG. 4 or FIG. 5 , the mobile phone can display preview images from both cameras separately within the camera preview interface. For example, as shown in FIG. 6 (a), when the mobile phone receives an operation on the camera application icon 201, it displays a preview interface 202 as shown in FIG. 6 (b). Preview interface 202 includes a primary preview image 601 and a secondary preview image 602. The primary preview image 601 and the secondary preview image 602 can be images output by the first camera and the second camera, respectively. For example, the primary preview image 601 can be an image output by the first camera based on a first exposure parameter (low exposure), with the moon in the primary preview image 601 not overexposed. Optionally, the moon in the primary preview image 601 can be in focus. The secondary preview image 602 can be an image output by the second camera based on a second exposure parameter (high exposure), with the foreground object in the secondary preview image 602 not underexposed and relatively bright.
[0162] As an example, the auxiliary preview image 602 can be displayed floating on the main preview image 601. The display position, display area, etc. of the auxiliary preview image 602 are not limited in the embodiments of the present application. Exemplarily, by default, the auxiliary preview image 602 is located in the upper left corner of the main preview image 601 and occupies 1 / 4 of the total area of the main preview image 601. Optionally, at least one of the display position and display area of the auxiliary preview image 602 can be adjusted. For example, when the mobile phone receives an operation for adjusting the display position of the auxiliary preview image 602 (for example, a long press and drag operation on the auxiliary preview image 602), the display position of the auxiliary preview image 602 is adjusted. For example, when the mobile phone receives an operation for changing the display area of the auxiliary preview image 602 (for example, a zoom-in or zoom-out operation on the auxiliary preview image 602), the display area of the auxiliary preview image 602 is adjusted.
[0163] As another example, the display positions of the primary preview image 601 and the auxiliary preview image 602 may be swapped. For example, when the mobile phone receives a switching operation (e.g., a user clicks on the auxiliary preview image 602), the auxiliary preview image 602 swaps display positions with the primary preview image 60.
[0164] In some embodiments, the fields of view (FOV) of the first camera and the second camera may not be exactly the same. For example, if the first camera is a telephoto camera and the second camera is a wide-angle camera, the field of view (FOV) of the first camera may be smaller than that of the second camera. Therefore, the shooting range corresponding to the main preview image 601 is smaller than the shooting range corresponding to the auxiliary preview image 602. For example, in (b) of Figure 6, the main preview image 601 only includes the moon and does not include the foreground object. The auxiliary preview image 602 includes both the moon and the foreground object.
[0165] In other embodiments, the magnifications of the first camera and the second camera may be the same or different. For example, the magnifications of the first camera and the second camera may be different. For example, the magnification of the first camera may be higher than that of the second camera. For example, in FIG6(b), the primary preview image 601 is an image output by the first camera at a larger magnification, which includes only the moon and does not include the foreground object. The auxiliary preview image 602 is an image output by the second camera at a smaller magnification, which includes both the moon and the foreground object.
[0166] Therefore, in Figure 6(b), the user can see the photographic effects of the moon and foreground object through the main preview image 601 and auxiliary preview image 602, respectively. When the phone receives an operation for the press key, the interface shown in Figure 6(c) is displayed, which includes a thumbnail 603 of the captured image. When the phone receives an operation for thumbnail 603, the interface shown in Figure 6(d) is displayed, which includes the captured image. In this image, the moon is clear and the foreground object is relatively bright, without the foreground object being dark and invisible due to underexposure.
[0167] The second option, secondary focus
[0168] In this solution, when the mobile phone shoots the moon and the foreground object, it can perform a second focus, where one focus is on the moon and the other focus is on the foreground object. The images obtained by the second focus are fused to obtain the captured image, so that both the moon and the foreground object in the image are not out of focus. It should be noted that the exposure can remain unchanged during the second focus process of this solution, for example, a low exposure adapted to the moon is always used. As mentioned above, although the moon is not overexposed at low exposure, the foreground object is prone to underexposure. It should be noted here that in this solution, although the foreground object is prone to underexposure, the problem of the foreground object being out of focus is solved through the second focus, which improves the clarity of the foreground object in the image and improves the image quality to a certain extent.
[0169] For example, see FIG7 , which is a flow chart of an image capturing method provided in one embodiment of the present application. This method can be applied to electronic devices, such as mobile phones. As shown in FIG7 , the process includes:
[0170] S701, determine whether there is a moon in the preview image; if so, execute S702, otherwise continue to execute S701.
[0171] S702, determine whether there is a foreground object in the preview image; if so, execute S704, otherwise, execute S703.
[0172] S703, enter the first moon mode.
[0173] In this embodiment, the first moon mode may include: a shooting mode focusing on the moon. Optionally, the first moon mode may also include adopting low exposure.
[0174] S704, enter the second moon mode.
[0175] In this embodiment, the second moon mode may include: first focusing on the moon to obtain a moon frame (i.e., a first image), then focusing on a foreground object to obtain a foreground frame (i.e., a second image), and then fusing the moon frame and foreground frame; or first focusing on a foreground object to obtain a foreground frame (i.e., a second image), then focusing on the moon to obtain a moon frame (i.e., a first image), and then fusing the moon frame and foreground frame. Optionally, the second moon mode may also include using a low exposure.
[0176] S705, focus on the moon.
[0177] As an example, the mobile phone can use the camera motor to push the lens to a corresponding position so that the lens can focus on the moon at that position to take a clear picture of the moon.
[0178] S706: Obtain a first image. It should be understood that the moon is not out of focus in the first image.
[0179] S707, focusing on the foreground object.
[0180] As an example, the mobile phone can use a camera motor to push the lens to a corresponding position, so that the lens can focus on the foreground object at the position to obtain a clear foreground object.
[0181] In the embodiments of the present application, focusing on a foreground object can be performed in a variety of ways, including but not limited to Method C and Method B. Method C focuses on the foreground object using the distance measured by the ranging unit. Method D involves a mobile phone including two cameras, with the first camera configured to output a first image and a second image, and the second camera configured to focus on the foreground object. The first camera can focus on the foreground object based on the focus position provided by the second camera. Methods C and D will be described in detail later.
[0182] As mentioned above, a low exposure can be used throughout the secondary focusing process to prevent overexposure of the moon. It should be noted that, generally, when the exposure is low, the foreground object in the image will be underexposed, which makes focusing on the foreground object difficult. In this embodiment, the foreground object can be focused using Methods C and D, so even if the foreground object is underexposed, it can still be accurately focused on.
[0183] S708: Obtain a second image. It should be understood that the foreground object in the second image is not out of focus.
[0184] S709: Fusing the first image and the second image to obtain a third image. In the third image, both the moon and the foreground object are clear.
[0185] Regarding the implementation principle of S709, please refer to S309 in FIG3 above, which will not be repeated here.
[0186] In some embodiments, the secondary focus shown in FIG7 may be performed twice using the same camera. For example, a mobile phone includes a first camera, and secondary focus is performed using the first camera. For details about the type of the first camera, please refer to the previous description. The secondary focus process of the first camera may include: after the first camera focuses on the moon to obtain a first image, adjusting the lens position to focus on the foreground object to obtain a second image.
[0187] In the embodiment of the present application, the manner in which the first camera focuses on the foreground object may include at least one of the following manners C and D:
[0188] Method C, the mobile phone includes a ranging unit, which is used to measure the distance between the foreground object and the mobile phone, and control the first camera to focus on the foreground object based on the distance. For example, a corresponding relationship is stored in the mobile phone, and the corresponding relationship includes different distances between the shooting object and the mobile phone, and the focus position corresponding to each distance. After the mobile phone obtains the distance between the foreground object and the mobile phone, it can determine the focus position of the foreground object based on the distance and the corresponding relationship, and then control the first camera to focus on the foreground object based on the determined focus position. Exemplarily, the corresponding relationship can be configured in the mobile phone when it leaves the factory. As an example, the ranging unit can be based on at least one of a variety of ranging technologies such as laser ranging, ultrasonic ranging, radar ranging, and time of flight (TOF).
[0189] In method D, the mobile phone also includes a second camera, which is used to focus on the foreground object. The mobile phone can control the first camera to focus on the foreground object based on the focus position of the second camera. For the implementation process of method D, please refer to Figure 8. As shown in Figure 8, another flow chart of the image capture method provided in an embodiment of the present application is shown. This method can be applied to electronic devices, such as mobile phones. As shown in Figure 8, the process includes:
[0190] S801, determine whether there is a moon in the preview image; if so, execute S802, otherwise continue to execute S801.
[0191] S802, determine whether there is a foreground object in the preview image; if so, execute S804, otherwise, execute S803.
[0192] S803, enter the first moon mode.
[0193] S804, enter the second moon mode.
[0194] Regarding the implementation principles of S801 to S804, please refer to S301 to S304 in Figure 3 above, which will not be repeated here.
[0195] S805, the first camera focuses on the moon.
[0196] S806: The first camera obtains a first image.
[0197] S807 , the second camera focuses on the foreground object.
[0198] S808: Provide the first focus position of the second camera to the first camera. The first focus position may be the focus position of the second camera when focusing on the foreground object, and the focus position may be, for example, the position of the lens of the second camera.
[0199] S809: Control the first camera to focus on the foreground object according to the first focus position of the second camera.
[0200] As an example, the first focus position of the second camera can be directly used as the focus position of the first camera. For example, if the first focus position of the second camera is position A, the first camera can move the lens so that the focus position of the first camera is adjusted to position A.
[0201] As another example, considering the differences between different cameras, when the first focus position of the second camera is directly used as the focus position of the first camera, the first camera may not be able to accurately focus on the foreground object. To improve accuracy, the mobile phone can determine the focus position of the first camera based on the first focus position of the second camera and the focus position calibration result between the first camera and the second camera, so that the first camera can accurately focus on the foreground object based on the determined focus position. Optionally, the focus position calibration result between the first camera and the second camera can be stored in the mobile phone in advance, for example, configured when the mobile phone leaves the factory.
[0202] S810: The first camera obtains a second image.
[0203] S811: Fuse the first image and the second image to obtain a third image.
[0204] Regarding the implementation principle of S811, please refer to S309 in FIG3 above, which will not be repeated here.
[0205] In the above embodiment, the moon frame (i.e., the first image) and the foreground frame (i.e., the second image) are respectively output through the same camera (i.e., the first camera). In this way, since the first image and the second image come from the same camera, they are naturally aligned and do not require additional alignment, which reduces the difficulty of alignment and improves efficiency.
[0206] In other embodiments, the secondary focus shown in FIG7 can also be achieved by two different cameras focusing once respectively. For example, a mobile phone includes a first camera and a second camera. The first camera focuses on the moon to obtain a first image, and the second camera focuses on the foreground object to obtain a second image, that is, the two cameras focus once each, completing two focuses. The types of the first camera and the second camera can be found in the previous description and will not be repeated here. For example, please refer to FIG9, which is another flow chart of the image capture method provided in one embodiment of the present application. This method can be applied to electronic devices, such as mobile phones. As shown in FIG9, the process includes:
[0207] S901, determine whether there is a moon in the preview image; if so, execute S902, otherwise continue to execute S901.
[0208] S902, determine whether there is a foreground object in the preview image; if so, execute S904, otherwise, execute S903.
[0209] S903, enter the first moon mode.
[0210] S904, enter the second moon mode.
[0211] S905, the first camera focuses on the moon.
[0212] S906: The first camera obtains a first image.
[0213] S907 , the second camera focuses on the foreground object.
[0214] S908: The second camera obtains a second image.
[0215] S909: Fusing the first image and the second image to obtain a third image.
[0216] In the embodiment shown in FIG9 , the moon and the foreground object are focused on respectively by dual cameras. Since the dual cameras can synchronously output frames, the frame output time is short and the user does not need to wait for a long time, thereby improving the shooting experience.
[0217] In some embodiments, in the dual-camera scenario shown in FIG8 or FIG9 , the mobile phone can display preview images of the two cameras separately within the camera preview interface. For example, as shown in FIG10( a ), when the mobile phone receives an operation on the camera application icon 201 , it displays a preview interface 202 as shown in FIG10( b ). Preview interface 202 includes a primary preview image 1001 and a secondary preview image 1002 . The primary preview image 1001 and the secondary preview image 1002 can be images output by the first camera and the second camera, respectively. For example, the primary preview image 1001 can be the image output by the first camera after focusing on the moon, so that the moon in the primary preview image 1001 is not out of focus. Optionally, the primary preview image 1001 can be obtained using a low exposure. The secondary preview image 1002 can be the image output by the second camera after focusing on the foreground object, so that the foreground object in the secondary preview image 1002 is not out of focus.
[0218] As an example, the auxiliary preview image 1002 may be displayed in a floating manner above the main preview image 1001. Optionally, at least one of a display position and a display area of the auxiliary preview image 1002 may be adjustable.
[0219] As another example, the display positions of the primary preview image 1001 and the auxiliary preview image 1002 may be swapped. For example, when the mobile phone receives a switching operation (e.g., a user clicks on the auxiliary preview image 1002), the auxiliary preview image 1002 swaps display positions with the primary preview image 1001.
[0220] In some embodiments, the field of view (FOV) of the first camera and the second camera may not be exactly the same. Alternatively, the magnifications of the first camera and the second camera may be the same or different.
[0221] Therefore, in Figure 10(b), the user sees the photographic effects of the moon and foreground object through the main preview image 1001 and auxiliary preview image 1002, respectively. When the mobile phone receives an operation for the press key, the interface shown in Figure 10(c) is displayed, which includes a thumbnail 1003 of the captured image. When the mobile phone receives an operation for thumbnail 1003, the interface shown in Figure 10(d) is displayed, which includes the captured image, in which the moon and foreground object are both clear.
[0222] The third option is double exposure + double focus.
[0223] For example, let's consider a phone using only the first solution (double exposure) mentioned above. Assuming the focus position remains unchanged during the double exposure, focusing on the moon, while the double exposure brightens the foreground object, the image still lacks clarity because the foreground object is out of focus. Therefore, this solution adds a double focus to the first solution.
[0224] For example, consider a phone using only the second method (i.e., secondary focus) described above. Assuming the exposure remains constant during secondary focus, using a low exposure tailored to the moon, secondary focus improves the clarity of the foreground object. However, the low exposure results in a less bright foreground object in the image. Therefore, this solution adds secondary exposure to the second method.
[0225] Therefore, in this solution, when the mobile phone shoots the moon and the foreground object, a second exposure and a second focus can be performed so that the moon and the foreground object are not out of focus in the captured image, and the moon is not overexposed and the foreground object is not underexposed.
[0226] It should be noted that in this solution, the order of exposure and focus is not limited. You can focus first and then expose, or you can expose first and then focus. Taking focus first and then expose as an example, this can include first focusing on the moon and then shooting at a low exposure, then focusing on the foreground object and then shooting at a high exposure; or first focusing on the foreground object and then shooting at a high exposure, then focusing on the moon and then shooting at a low exposure. Taking exposure first and then focus as an example, this can include first setting a low exposure and then focusing on the moon and shooting, then setting a high exposure and then focusing on the foreground object and shooting; or first setting a high exposure and then focusing on the foreground object and shooting, then setting a low exposure and then focusing on the moon and shooting.
[0227] In some embodiments, improper exposure can affect focus accuracy. For example, if the moon is overexposed, it will appear haloed and much larger than normal, making it impossible to accurately focus on it. Another example is if the foreground object is underexposed, it will appear too dark, making it impossible to accurately focus on it. Therefore, this solution can use an exposure-first, focus-later approach to improve focus accuracy.
[0228] For example, FIG11 is a flow chart of an image capturing method provided in an embodiment of the present application. The method can be applied to electronic devices, such as mobile phones. As shown in FIG11 , the process includes:
[0229] S1101, determine whether there is a moon in the preview image. If yes, execute S1102, otherwise continue to execute S1101.
[0230] S1102: Determine whether there is a foreground object in the preview image. If yes, execute S1104; otherwise, execute S1103.
[0231] S1103, enter the first moon mode.
[0232] In this embodiment, the first moon mode may include: a shooting mode using low exposure and focusing on the moon.
[0233] S1014, enter the second moon mode.
[0234] In this embodiment, the second moon mode may include: first using low exposure and focusing on the moon to obtain a moon frame (i.e., the first image), then using high exposure and focusing on the foreground object to obtain a foreground frame (i.e., the second image), and then fusing the moon frame and the foreground frame; or, first using high exposure to focus on the foreground object to obtain a foreground frame (i.e., the second image), then using low exposure to focus on the moon to obtain a moon frame (i.e., the first image), and then fusing the moon frame and the foreground frame.
[0235] S1105: Set the exposure parameter to the first exposure parameter.
[0236] S1106, focus on the moon.
[0237] S1107: Obtain a first image. It should be understood that the moon in the first image is neither overexposed nor out of focus.
[0238] S1108: Set the exposure parameter to a second exposure parameter. The second exposure parameter is greater than the first exposure parameter.
[0239] Optionally, there are multiple ways to set the exposure parameter to the second exposure parameter, including but not limited to the following ways:
[0240] Method 1: Using the brightness of the foreground object, the exposure parameter is set to the second exposure parameter. It should be noted that Method 1 can be an iterative process (referred to as an exposure iteration process), in which relatively accurate exposure parameters are ultimately determined by continuously adjusting the exposure. For example, if the brightness of the foreground object in the image is too low, the exposure parameter is increased, and then the degree to which the brightness of the foreground object increases after the increase in the exposure parameter is determined. If the brightness is still low, the exposure parameter is further increased. If the brightness is too high, the exposure parameter is reduced until the brightness of the foreground object is appropriate (for example, the brightness is within a preset brightness range).
[0241] Method 2: The mobile phone includes two cameras. The first camera is used to output the first and second images, and the second camera is used to adjust the exposure parameters of the foreground object. The first camera can set the exposure parameters to the second exposure parameters based on the exposure parameters provided by the second camera. For details about Method 2, refer to Method B in the first solution above and will not be repeated here. Optionally, Method 1 can also be used when adjusting the exposure of the second camera.
[0242] S1109, focusing on the foreground object.
[0243] Optionally, the method of focusing on the foreground object may include any of the following:
[0244] Method three is to focus on the foreground object according to the exposure parameter of the foreground object (ie, the second exposure parameter). In other words, the exposure parameter of the foreground object affects the focus position of the foreground object.
[0245] It should be noted that, in general, the image focusing process includes: pushing the lens to move position through the camera motor, calculating the clarity once for each position moved, until a certain position is found, so that when the lens is in this position, the clarity of the image reaches the clarity threshold. It should be understood that if the clarity threshold is not set appropriately, it will be difficult to find the lens focus position. Assume that in the scene of shooting the moon and foreground objects, a unified clarity threshold is set, and in order to shoot a clear moon, the clarity threshold is set high. Then, when shooting at low exposure, the moon is normally exposed and the foreground object is underexposed. Based on the clarity threshold, the focus position of the moon can be found, but the focus position of the foreground object cannot be found, because when the foreground object is underexposed, the foreground object on the image is too dark, and the clarity threshold is high, making it difficult to find a lens position that meets the clarity threshold.
[0246] Therefore, the third method may include: determining a sharpness threshold value based on the second exposure parameter, assuming it is threshold value 1, and using the camera motor to move the lens. Each time the lens is moved, the sharpness of the foreground object is calculated until a first position is found, such that when the lens is in the first position, the sharpness of the foreground object reaches threshold value 1. This process may be an iterative process (referred to as a focus iteration process), in which the lens position is continuously adjusted to ultimately focus on the foreground object.
[0247] It should be noted that if the exposure parameters of the foreground object (i.e., the second exposure parameter) are different, the clarity threshold is different, and the lens focus position determined based on the clarity threshold is different. In some embodiments, in the case of underexposure or overexposure, the clarity threshold can be set lower to avoid finding the focus position. In the case of neither underexposure nor overexposure, the clarity threshold can be set higher to find the accurate focus position. As an example, the mobile phone can store the correspondence between different exposure parameters and clarity thresholds, and determine the corresponding clarity threshold based on the second exposure parameter and the correspondence. As another example, the mobile phone can also store the correspondence between different brightness and clarity thresholds, determine the brightness of the foreground object based on the second exposure parameter, and then determine the clarity threshold based on the brightness of the foreground object and the correspondence.
[0248] It should be noted that, generally speaking, focusing and exposure are two independent processes. You can focus first and then expose, or you can expose first and then focus. In other words, there is no specific correlation between exposure and focus. In the embodiment of the present application, for the foreground object, the method of first exposing and then focusing is adopted, and the exposure and focus are linked. That is, focusing is performed according to the exposure of the foreground object (i.e., method three), which improves focus accuracy.
[0249] Method 4: Use the rangefinder to focus on the foreground object. For more information on Method 4, please refer to Method C in the second solution above.
[0250] Method 5: The mobile phone includes two cameras. The first camera outputs the first and second images, and the second camera focuses on the foreground object. The first camera can focus on the foreground object based on the focus position provided by the second camera. For details about Method 5, please refer to Method D in the second solution above. Optionally, in Method 5, while the second camera focuses on the foreground object, Method 3 or Method 4 can be used.
[0251] S1110: Obtain a second image. It should be understood that the foreground object in the second image is neither underexposed nor out of focus.
[0252] S1111: Fuse the first image and the second image to obtain a third image.
[0253] Regarding the implementation principle of S1111, please refer to S309 in FIG3 above, which will not be repeated here.
[0254] In some embodiments, the double exposure + double focus process shown in Figure 11 can be completed by the same camera. For example, the mobile phone includes a first camera, and the double exposure + double focus is performed by the first camera. For the type of the first camera, please refer to the above description. The double exposure + double focus process of the first camera may include: using a smaller exposure (i.e., a first exposure parameter), focusing on the moon, obtaining a first image, and then increasing the exposure (i.e., a second exposure parameter), focusing on the foreground object, and obtaining a second image.
[0255] In some embodiments, before the mobile phone uses the second exposure parameter to shoot the foreground object, it is necessary to set the exposure parameter of the first camera to the second exposure parameter. The specific setting method includes at least one of the following methods 1 and 2:
[0256] In a first approach, the mobile phone may evaluate the brightness of the foreground object (eg, RGB brightness), and set the exposure parameter of the first camera to the second exposure parameter according to the brightness of the foreground object.
[0257] In a second method, the mobile phone further includes a second camera, which is used to adjust the exposure parameter of the foreground object. The mobile phone can set the exposure parameter of the first camera to the second exposure parameter based on the third exposure parameter of the second camera.
[0258] In some embodiments, the first camera focuses on the foreground object in at least one of the following three ways:
[0259] Method three: Use the second exposure parameter to focus on the foreground object.
[0260] In a fourth method, the mobile phone includes a distance measuring unit, which is used to measure the distance between the foreground object and the mobile phone, and control the first camera to focus on the foreground object according to the distance.
[0261] In a fifth method, the mobile phone further includes a second camera, which is used to focus on a foreground object. The mobile phone can control the first camera to focus on the foreground object based on the focus position of the second camera.
[0262] Regarding the above-mentioned methods 1 to 5, please refer to the above description and will not be repeated. Taking the above-mentioned methods 2 and 5 as an example, the implementation process of a mobile phone is shown in Figure 12. As shown in Figure 12, another flow chart of the image capture method provided by an embodiment of the present application is shown. This method can be applied to electronic devices, such as mobile phones. As shown in Figure 12, the process includes:
[0263] S1201, determine whether there is a moon in the preview image. If yes, execute S1202, otherwise continue to execute S1201.
[0264] S1202: Determine whether there is a foreground object in the preview image. If yes, execute S1204; otherwise, execute S1203.
[0265] S1203, enter the first moon mode.
[0266] S1204, enter the second moon mode.
[0267] S1205: The exposure parameter of the first camera is set to a first exposure parameter.
[0268] S1206, the first camera focuses on the moon.
[0269] S1207: The first camera obtains a first image.
[0270] S1208: Adjust exposure parameters of the second camera.
[0271] Optionally, when adjusting the exposure parameters of the second camera, method 1 or method 2 described above may be used.
[0272] S1209: The second camera focuses on the foreground object.
[0273] Optionally, when the second camera focuses on the foreground object, the above-mentioned method 3 or method 4 can be used.
[0274] S1210: Provide the third exposure parameter and the first focus position of the second camera to the first camera.
[0275] In the embodiment of the present application, the third exposure parameter may be an exposure parameter adjusted by the second camera to capture the foreground object without underexposure or overexposure. The first focus position is the focus position when the second camera focuses on the foreground object.
[0276] S1211: Set the exposure parameter of the first camera to the second exposure parameter according to the third exposure parameter of the second camera.
[0277] [Corrected 20.05.2025 according to Rule 91] Optional, for the implementation principle of S1211, please refer to the implementation principle of S409 in Figure 4 above, which will not be repeated.
[0278] S1212: Control the first camera to focus on the foreground object according to the first focus position of the second camera.
[0279] [Corrected 20.05.2025 according to Rule 91] Optional, for the implementation principle of S1212, please refer to the implementation principle of S809 in Figure 8 above, which will not be repeated.
[0280] S1213: The first camera obtains a second image.
[0281] S1214: The first image and the second image are fused to obtain a third image.
[0282] In other embodiments, the secondary focus + secondary focus shown in Figure 11 can be performed separately by two different cameras. For example, a mobile phone includes a first camera and a second camera. The first camera uses the first exposure parameter and focuses on the moon to obtain a first image. The second camera uses the second exposure parameter and focuses on the foreground object to obtain a second image, that is, the two cameras are exposed and focused separately, completing two focuses + secondary focus. The types of the first camera and the second camera can be found in the previous description and will not be repeated here. For example, please refer to Figure 13, which is another flow chart of the image capture method provided in one embodiment of the present application. This method can be applied to electronic devices, such as mobile phones. As shown in Figure 13, the process includes:
[0283] S1301, determine whether there is a moon in the preview image. If yes, execute S1302, otherwise continue to execute S1301.
[0284] [Corrected 20.05.2025 according to Rule 91] S1302, determine whether there is a foreground object in the preview image. If so, execute S1304, otherwise execute S1303.
[0285] S1303, enter the first moon mode.
[0286] S1304, enter the second moon mode.
[0287] S1305: The exposure parameter of the first camera is set to the first exposure parameter.
[0288] S1306, the first camera focuses on the moon.
[0289] S1307: The first camera obtains a first image.
[0290] S1308: The exposure parameter of the second camera is set to a second exposure parameter, where the second exposure parameter is greater than the first exposure parameter.
[0291] Optionally, when the second camera sets the exposure parameter to the second exposure parameter, the above-mentioned method 1 or method 2 may be used.
[0292] S1309: The second camera focuses on the foreground object.
[0293] Optionally, when the second camera focuses on the foreground object, the above-mentioned method 3 or method 4 can be used.
[0294] S1310: The second camera obtains a second image.
[0295] S1311: Fuse the first image and the second image to obtain a third image.
[0296] In some embodiments, in the dual-camera scenario shown in FIG. 12 or FIG. 13 , the mobile phone can display preview images from both cameras separately within the camera preview interface. For example, as shown in FIG. 14 (a), when the mobile phone receives an operation on the camera application icon 201, it displays a preview interface 202 as shown in FIG. 14 (b). Preview interface 202 includes a primary preview image 1401 and a secondary preview image 1402. Primary preview image 1401 and secondary preview image 1402 can be images output by the first camera and the second camera, respectively. For example, primary preview image 1401 can be the image output by the first camera using a first exposure parameter (low exposure) and focusing on the moon, so that the moon in primary preview image 1401 is not overexposed or out of focus. Secondary preview image 1402 can be the image output by the second camera using a second exposure parameter (high exposure) and focusing on a foreground object, so that the foreground object in secondary moon image 1402 is not underexposed or out of focus.
[0297] As an example, the auxiliary preview image 1402 can be displayed floating above the main preview image 1401. Optionally, at least one of the display position and display area of the auxiliary preview image 1402 can be adjusted. The display positions of the main preview image 1401 and the auxiliary preview image 1402 can be swapped.
[0298] As another example, the field of view (FOV) of the first camera and the second camera may not be exactly the same. The magnifications of the first camera and the second camera may be the same or different.
[0299] Therefore, in Figure 14(b), the user sees the photographic effects of the moon and foreground object through primary preview image 1401 and auxiliary preview image 1402, respectively. When the mobile phone receives an operation for the press key, the interface shown in Figure 14(c) is displayed, which includes a thumbnail 1403 of the captured image. When the mobile phone receives an operation for thumbnail 1403, the interface shown in Figure 14(d) is displayed, which includes the captured image, in which both the moon and foreground object are clear.
[0300] Please refer to Figure 15, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device can be the mobile phone mentioned above. As shown in Figure 15, the electronic device 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 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.
[0301] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may serve as the nerve center and command center of the electronic device. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution. The processor 110 may also include memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a high-speed cache memory. This memory may store instructions or data that have just been used or are being recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces the processor 110's waiting time, and thus improves system efficiency.
[0302] In some embodiments, the image capture method provided in the embodiments of the present application can be implemented by the processor 110. For example, the processor 110 can identify whether the moon and foreground objects are present in the preview image, and if so, enter moon mode. The processor 110 can perform double exposure and / or double focus to capture a clear image of the moon and foreground objects.
[0303] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0304] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.
[0305] The I2S interface can be used for audio communication. In some embodiments, the processor 110 can include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface, enabling the function of answering calls through a Bluetooth headset.
[0306] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via a PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0307] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface, enabling the function of playing music through Bluetooth headphones.
[0308] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.
[0309] The GPIO interface can be configured via software. The GPIO interface can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to the camera 193, display 194, wireless communication module 160, audio module 170, sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.
[0310] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.
[0311] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0312] The wireless communication function of the electronic device can be implemented using antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, a modem processor, and a baseband processor. Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In other embodiments, the antenna can be used in conjunction with a tuning switch.
[0313] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied in electronic devices. 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, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.
[0314] The wireless communication module 160 can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module 160 can be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.
[0315] In some embodiments, antenna 1 of the electronic device is coupled to mobile communication module 150 , and antenna 2 is coupled to wireless communication module 160 , so that the electronic device can communicate with the network and other devices through wireless communication technology.
[0316] The display screen 194 is used to display the display interface of the application, etc. The display screen 194 includes a display panel. In some embodiments, the electronic device may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0317] The electronic device 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, etc. Among them, the ISP is used to process the data fed back by the camera 193.
[0318] In some embodiments, camera 193 may include one or more cameras. For example, camera 193 may be the first camera mentioned above, which can perform double exposure and / or double focus. For example, camera 193 may include two cameras, such as the first and second cameras mentioned above. The first and second cameras can perform double exposure and / or double focus.
[0319] The internal memory 121 can be used to store computer executable program code, which includes instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, and the software code of at least one application, etc. The data storage area can store data (such as images, videos, etc.) generated during the use of the electronic device. 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 memory, etc.
[0320] 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 electronic device. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as pictures and videos can be stored on the external memory card.
[0321] The electronic device can implement audio functions such as music playback and recording through the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone jack 170D, and the application processor.
[0322] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.
[0323] The speaker 170A, also called a "speaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or listen to external speaker scenarios such as hands-free calls through one or more speakers 170A.
[0324] The receiver 170B, also called "earpiece", can be one or more and is used to convert audio electrical signals into sound signals. When the electronic device 100 receives a call or voice message, the voice can be heard by placing the receiver 170B close to the human ear.
[0325] Microphone 170C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals.
[0326] The headphone jack 170D is used to connect a wired headphone.
[0327] The pressure sensor 180A is used to sense the pressure signal and convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A can be disposed on the display screen 194 .
[0328] The gyro sensor 180B can be used to determine the motion posture of the electronic device. In some embodiments, the gyro sensor 180B can be used to determine the angular velocity of the electronic device around three axes (i.e., the x, y, and z axes). The gyro sensor 180B can also be used for anti-shake photography.
[0329] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.
[0330] The magnetic sensor 180D includes a Hall sensor, and the electronic device can use the magnetic sensor 180D to detect the opening and closing of the flip cover.
[0331] The acceleration sensor 180E can detect the magnitude of the electronic device's acceleration in various directions (generally three axes) and the magnitude and direction of gravity when the electronic device is stationary.
[0332] The distance sensor 180F is used to measure distance. The electronic device can measure distance using infrared or laser.
[0333] The proximity light sensor 180G may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light through the light emitting diode. The electronic device uses the photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, the electronic device can determine that there is no object near the electronic device.
[0334] The ambient light sensor 180L is used to sense the brightness of the ambient light. The electronic device can adaptively adjust the brightness of the display screen 194 according to the sensed ambient light brightness.
[0335] The fingerprint sensor 180H is used to collect fingerprints.
[0336] The temperature sensor 180J is used to detect temperature.
[0337] The touch sensor 180K, also known as a "touch panel," can be mounted on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen." The touch sensor 180K is used to detect touch operations applied to or near it. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event.
[0338] The bone conduction sensor 180M can obtain a vibration signal. In some embodiments, the bone conduction sensor 180M can obtain a vibration signal of a vibrating bone in a human vocal part.
[0339] The buttons 190 include a power button, a volume button, etc. The button 190 can be a mechanical button. It can also be a touch button. The electronic device can receive button input and generate key signal input related to the user settings and function control of the electronic device. The motor 191 can generate a vibration prompt. The motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. The indicator 192 can be an indicator light, which can be used to indicate the charging status, power changes, messages, missed calls, notifications, etc. The SIM card interface 195 is used to connect the SIM card. The SIM card can be connected to and separated from the electronic device by inserting it into the SIM card interface 195 or pulling it out from the SIM card interface 195.
[0340] It is understood that the components shown in FIG15 do not constitute a specific limitation on the electronic device. The electronic device in the embodiment of the present invention may include more or fewer components than those shown in FIG15. In addition, the combination / connection relationship between the components in FIG15 can also be adjusted and modified.
[0341] [Corrected 20.05.2025 according to Rule 91] Figure 16 is a schematic diagram of the structure of an electronic device 1600 provided in an embodiment of the present application. The electronic device 1600 may be the mobile phone mentioned above. As shown in Figure 16, the electronic device 1600 may include: one or more processors 1601; one or more memories 1602; a communication interface 1603, and one or more computer programs 1604, and the above-mentioned devices may be connected via one or more communication buses 1605. The one or more computer programs 1604 are stored in the above-mentioned memory 1602 and are configured to be executed by the one or more processors 1601, and the one or more computer programs 1604 include instructions. For example, when the electronic device 1600 is the mobile phone mentioned above, the instruction can be used to execute the relevant steps of the mobile phone in any of the embodiments in the corresponding Figures 1A to 14 above. The communication interface 1603 is used to realize communication between the electronic device 1600 and other devices, for example, the communication interface can be a transceiver.
[0342] In the embodiments provided in the present application above, the method provided in the embodiment of the present application is introduced from the perspective of an electronic device (e.g., a mobile phone) as an execution subject. In order to implement the various functions in the method provided in the embodiment of the present application above, the electronic device may include a hardware structure and / or a software module to implement the above functions in the form of a hardware structure, a software module, or a hardware structure plus a software module. Whether a function of the above functions is executed in the form of a hardware structure, a software module, or a hardware structure plus a software module depends on the specific application and design constraints of the technical solution.
[0343] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)). In the absence of conflict, the solutions of the above embodiments can be used in combination.
[0344] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0345] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or box in the flow chart and / or block diagram, as well as the combination of the flow chart and / or box in the flow chart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flow charts and / or one or more boxes in the block diagram.
[0346] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0347] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0348] Obviously, those skilled in the art may make various changes and modifications to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include these modifications and variations.
Claims
1. An image capturing method, characterized in that: Applied to electronic equipment, the method includes: Displaying a preview interface of the camera, wherein the preview interface includes a first preview image; Entering a moon mode when recognizing that the first preview image includes the moon and a foreground object; Set the exposure parameter to the first exposure parameter; focusing on the moon to acquire a first image; Setting the exposure parameter to a second exposure parameter, where the second exposure parameter is greater than the first exposure parameter; focusing on the foreground object to acquire a second image; The first image and the second image are fused to obtain a third image.
2. The method according to claim 1, characterized in that The focusing on the foreground object includes: The foreground object is focused according to the second exposure parameter.
3. The method according to claim 2, characterized in that Focusing the foreground object using the second exposure parameter includes: determining a clarity threshold of the foreground object according to the second exposure parameter; The camera motor drives the lens to move position, and calculates the clarity of the foreground object each time it moves to find the first position where the clarity of the foreground object reaches the clarity threshold. When the lens is in the first position, the foreground object is focused.
4. The method according to claim 1, wherein The focusing on the foreground object includes: The foreground object is focused according to a distance between the foreground object and the electronic device.
5. The method according to claim 1, wherein The electronic device includes a first camera, The setting the exposure parameter as the first exposure parameter includes: setting the exposure parameter of the first camera as the first exposure parameter; The focusing on the moon to obtain the first image includes: controlling the first camera to focus on the moon so that the first camera outputs the first image; The setting the exposure parameter to the second exposure parameter includes: setting the exposure parameter of the first camera to the second exposure parameter; The focusing on the foreground object to obtain the second image includes: controlling the first camera to focus on the foreground object so that the first camera outputs the second image.
6. The method according to claim 1, wherein The electronic device includes a first camera and a second camera, The setting the exposure parameter as the first exposure parameter includes: setting the exposure parameter of the first camera as the first exposure parameter; The focusing on the moon to obtain the first image includes: controlling the first camera to focus on the moon so that the first camera outputs the first image; The setting the exposure parameter to the second exposure parameter includes: setting the exposure parameter of the second camera to the second exposure parameter; The focusing on the foreground object to obtain the second image includes: controlling the second camera to focus on the foreground object so that the second camera outputs the second image.
7. The method according to claim 5, characterized in that The electronic device further includes a second camera, the second camera being used to adjust the exposure parameters of the foreground object. The step of setting the exposure parameter of the first camera to a second exposure parameter includes: The exposure parameter of the first camera is set to the second exposure parameter according to the third exposure parameter of the second camera.
8. The method according to claim 7, characterized in that Setting the exposure parameter of the first camera to the second exposure parameter according to the third exposure parameter of the second camera includes: According to the third exposure parameter and exposure calibration results of the first camera and the second camera, the exposure parameter of the first camera is set to the second exposure parameter.
9. The method according to claim 5, characterized in that The electronic device further includes a second camera, the second camera being configured to focus on the foreground object. Controlling the first camera to focus on the foreground object includes: The first camera is controlled to focus on the foreground object according to the first focus position of the second camera.
10. The method according to claim 9, characterized in that Controlling the first camera to focus on the foreground object according to the first focus position of the second camera includes: According to the first focus position and the focus position calibration results of the first camera and the second camera, the first camera is controlled to focus on the foreground object.
11. The method according to any one of claims 1 to 10, characterized in that The first exposure parameter includes at least one of a first aperture, a first exposure time, and a first ISO value. The second exposure parameter includes at least one of a second aperture, a second exposure time, and a second ISO value. The second exposure parameter is greater than the first exposure parameter, including at least one of the following: The second aperture is larger than the first aperture; The second exposure duration is longer than the first exposure duration; The second ISO value is greater than the first ISO value.
12. The method according to any one of claims 1 to 11, characterized in that Before entering Moon Mode, this also includes: Determine that the foreground object satisfies at least one of the following conditions: The foreground object is a preset object; The distance between the foreground object and the electronic device is less than a preset distance; The area occupied by the foreground object in the first preview image is larger than a preset area; The retention time of the foreground object in the first preview image is greater than a preset time.
13. The method according to claim 6, characterized in that The first preview image is an image output by the first camera, and the method further includes: A second preview image is displayed in the preview interface, where the second preview image is an image output by the second camera.
14. The method according to claim 13, wherein: The second preview image is displayed in a floating manner on the first preview image, and / or at least one of a position and a display area of the second preview image is adjustable.
15. The method according to any one of claims 1 to 14, characterized in that When the first image includes only the moon and the second image includes the moon and a foreground object, fusing the first image and the second image to obtain a third image includes: Fill the area where the moon is located in the second image with the background to obtain a fourth image; The fourth image is fused with the first image to obtain a third image.
16. The method according to any one of claims 1 to 14, characterized in that When both the first image and the second image include the moon and a foreground object, fusing the first image and the second image to obtain a third image includes: Filling the area where the foreground object is located on the first image with the background to obtain a fifth image; Fill the area where the moon is located in the second image with the background to obtain a sixth image; The fifth image and the sixth image are fused to obtain a third image.
17. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method according to any one of claims 1 to 16 is implemented.
18. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 16 is implemented.
19. A computer program product, characterized in that The computer program product comprises a computer program, which, when run on a computer, causes the computer to perform the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Moon shooting method and electronic equipment
CN110913131A
Shooting method and equipment
CN113905182A
Moon shooting method and device, storage medium and shooting equipment
CN115379075A
Focusing method and apparatus, photographing device, movable platform and storage medium
WO2021134179A1
Image capturing method and related device
WO2023071948A1