Method for photographing moon, and electronic device

WO2026218652A1PCT designated stage Publication Date: 2026-10-22HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/143618
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-04-18
Filing Date
2025-12-18
Publication Date
2026-10-22

Smart Images

  • Figure CN2025143618_22102026_PF_FP_ABST
    Figure CN2025143618_22102026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of terminals, and provides a method for photographing the moon, and an electronic device, capable of obtaining a captured image in which both the moon and a landscape are clear, thereby reducing the out-of-focus phenomenon of the moon or the landscape, improving the aesthetics of the captured image, and satisfying user requirements. In the method, during a preview stage, the electronic device can complete one camera focusing operation and present a preview image obtained by fusing images having different exposure times, wherein in the preview image, details of the moon are clear and the brightness of the landscape is appropriate; and during a photographing stage, the electronic device performs the camera focusing operation again to switch a focus target, obtains an image in which the current focus target is relatively clear, and fuses the image in which the current focus target is relatively clear with an image in which the focus target before switching is relatively clear, so as to obtain a captured image in which both the moon and the landscape are clear and have appropriate brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Methods and electronic devices for photographing the moon

[0001] This application claims priority to Chinese patent application filed on April 18, 2025, with application number 202510491836.4 and entitled "Method and Electronic Device for Photographing the Moon", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of terminal technology, and in particular to a method and electronic device for photographing the moon. Background Technology

[0003] Currently, more and more users are using their mobile phones to photograph the moon. In order to present a clear image of the moon, mobile phones typically focus the camera on the foreground or landscape, making the foreground or landscape clear in the photo. Then, the moon is enlarged and pasted into the photo. While this makes the moon clear, the overall photo does not look realistic or aesthetically pleasing, failing to meet the user's needs. Summary of the Invention

[0004] This application provides a method and electronic device for photographing the moon, which can produce clear images of both the moon and the landscape, reducing the possibility of the moon or landscape being out of focus, making the images more aesthetically pleasing and meeting user needs.

[0005] To achieve the above objectives, the embodiments of this application provide the following technical solutions:

[0006] Firstly, a method for photographing the moon is provided. This method can be applied to an electronic device including a camera. In this method, the electronic device displays a preview interface of the camera; wherein the preview interface is used to display a preview image including the moon and a landscape; the preview image is generated based on a first moon image at a first exposure time and a first landscape image at a second exposure time, with the camera focused on a first object; the first object is either the moon or the landscape; the first exposure time is less than the second exposure time. Subsequently, in response to a shooting operation, the electronic device performs a focus switching operation between the moon and the landscape, and with the camera focused on a second object, obtains a second image; wherein the second image is either a second moon image at the first exposure time or a second landscape image at the second exposure time; and the second object is different from the first object. Finally, the electronic device merges the second image with the first moon image or the first landscape image to obtain a third image.

[0007] In the above method, the electronic device can perform a camera focusing operation during the preview stage, presenting a preview image fused from images with different exposure times. In the preview image, the moon's texture is clear, and the brightness of the landscape is moderate. During the shooting stage, the electronic device performs a camera focusing operation again, switching the focus object to obtain a clearer image of the current focus object. This clearer image of the current focus object is then fused with the clearer image of the focus object before the switch, resulting in a final image where both the moon and the landscape are clear and the brightness is moderate.

[0008] In one possible implementation of the first aspect, the moon in the preview image has a clear texture, and the brightness of both the moon and the landscape is within a preset brightness range, which indicates that the brightness of both the moon and the landscape is moderate.

[0009] In one possible implementation of the first aspect, the moon texture and the landscape in the third image are clear, and the brightness of both the moon and the landscape is within a preset brightness range.

[0010] In one possible implementation of the first aspect, the first object is the moon, the second object is a landscape, the second image is a second landscape image under a second exposure time, and the third image is obtained by fusing the second landscape image with the first moon image.

[0011] In the above embodiments, during the preview stage, the electronic device obtains a moon image and a landscape image focused on the moon. In both the landscape and moon images, the moon is clearer than the landscape, and both the moon and the landscape have moderate brightness. During the shooting stage, the electronic device can perform secondary focusing on the camera to obtain a second landscape image focused on the landscape. In this second landscape image, the landscape is clearer than the moon, and the brightness is moderate. Therefore, in the third image resulting from the fusion of the second landscape image and the first moon image, both the moon and the landscape are clear and have moderate brightness.

[0012] In one possible implementation of the first aspect, the electronic device, in response to a shooting operation, performs a focus switching operation between the moon and the landscape, and obtains a second image when the camera is focused on the second object, including: the electronic device, in response to the shooting operation, acquires a first moon image; then, after the first moon image, the electronic device inserts a transition image; within the time range corresponding to the transition image, the electronic device performs a focus switching operation between the moon and the landscape, and controls the camera to focus on the landscape; finally, the electronic device obtains a second landscape image at a second exposure duration.

[0013] In the above embodiments, the purpose of inserting a transition image is to reserve a certain amount of operation time for the focus switching operation. In some examples, within the time range corresponding to the transition image, the electronic device can drive the motor to complete the camera focus switching, thereby completing the action of switching from focusing on the moon to focusing on the landscape within the transition frame.

[0014] In one possible implementation of the first aspect, while the camera is focused on the first object, the electronic device continuously acquires multiple frames of the first moon image over a first exposure duration; subsequently, the electronic device fuses the multiple frames of the first moon image to obtain a third moon image. Additionally, the electronic device fuses the second landscape image with the third moon image to obtain a third image.

[0015] In the above embodiment, multiple frames of the first moon image are fused to obtain a first moon image with better image quality compared to a single frame of the first moon image, or referred to as a third moon image. Then, during the shooting stage, after acquiring a second landscape image, the electronic device fuses the second landscape image with the better-quality first moon image (or third moon image) to obtain a third image with even better image quality.

[0016] In one possible implementation of the first aspect, the first object is a landscape, the second object is the moon, the second image is a second moon image under a first exposure time, and the third image is obtained by fusing the second moon image and the first landscape image.

[0017] In the above embodiments, during the preview stage, the electronic device obtains both a moon image and a landscape image focused on the landscape. In both the landscape and moon images, the landscape is clearer than the moon, and both the moon and the landscape have moderate brightness. During the shooting stage, the electronic device can perform secondary focusing on the camera to obtain a second moon image focused on the moon. In this second moon image, the moon is clearer than the landscape, and the brightness of the second moon image is moderate. This results in both the moon and the landscape being clear and having moderate brightness in the third image obtained by fusing the second moon image and the first landscape image.

[0018] In one possible implementation of the first aspect, the electronic device, in response to a shooting operation, performs a focus switching operation between the moon and the landscape, and obtains a second image when the camera is focused on the second object, including: in response to the shooting operation, the electronic device acquires a first landscape image; then, after the first landscape image, the electronic device inserts a transition image; within the time range corresponding to the transition image, the electronic device performs a focus switching from the landscape to the moon, and controls the camera to focus on the moon; finally, the electronic device obtains a second moon image at a first exposure duration.

[0019] In the above implementation, the purpose of inserting a transition image is to reserve a certain amount of time for the focus switching operation. In some examples, within the time range corresponding to the transition image, the electronic device can drive the motor to complete the camera focus switching, thereby completing the action of switching from focusing on the landscape to focusing on the moon within the transition frame.

[0020] In one possible implementation of the first aspect, while the camera is focused on the first object, the electronic device continuously acquires multiple frames of the first landscape image over a second exposure duration; subsequently, the electronic device fuses the multiple frames of the first landscape image to obtain a third landscape image. Furthermore, the electronic device fuses the second moon image with the third landscape image to obtain a third image.

[0021] In the above implementation, multiple frames of the first landscape image are fused to obtain a first landscape image with better image quality compared to a single frame of the first landscape image, or a third landscape image. Then, during the shooting stage, after acquiring the second moon image, the electronic device fuses the second moon image with the better-quality first landscape image (or the third landscape image) to obtain a third image with even better image quality.

[0022] In one possible implementation of the first aspect, in response to a triggering operation on the first object in the preview image, the electronic device controls the camera to focus on the first object; or, if the preview image includes the first object, the electronic device controls the camera to focus on the first object.

[0023] In the above implementation, the electronic device can determine the focus object in the preview stage in a variety of ways, thus meeting the user's needs in many aspects.

[0024] In one possible implementation of the first aspect, in response to an operation of viewing a third image, an album interface is displayed, wherein the album interface is used to display the third image, and the album interface includes editing controls. Subsequently, in response to an operation triggering the editing controls, the electronic device displays adjustment controls for adjusting the size of the moon. Finally, in response to an operation on the adjustment controls, the electronic device adjusts the size of the moon in the third image.

[0025] In the above implementation, users can edit the third image, such as making the moon in the image bigger or smaller (adjusting the magnification of the moon), etc. Users can participate in the process of generating the final image independently, which makes them feel more involved.

[0026] In a second aspect, an electronic device is provided, including a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method of photographing the moon as described in the first aspect and any implementation thereof.

[0027] Thirdly, a computer-readable storage medium is provided, including computer instructions that, when executed on an electronic device, cause the electronic device to perform a method for photographing the moon as described in the first aspect and any implementation thereof.

[0028] Fourthly, a computer program product is provided that, when run on a computer, causes the computer to perform a method for photographing the moon as described in the first aspect and any implementation thereof.

[0029] The beneficial effects that the electronic device provided in the second aspect, the computer-readable storage medium provided in the third aspect, and the computer program product provided in the fourth aspect can achieve are similar to the beneficial effects that can be achieved in the first aspect and any of its implementations, and will not be repeated here. Attached Figure Description

[0030] Figure 1 is a schematic diagram of an image including the moon provided in an embodiment of this application;

[0031] Figure 2 is a schematic diagram of an image including the moon provided in an embodiment of this application;

[0032] Figure 3 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;

[0033] Figure 4 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;

[0034] Figure 5 is a schematic diagram of various images obtained in the preview stage according to the embodiments of this application;

[0035] Figure 6 is a flowchart of a method for photographing the moon provided in an embodiment of this application;

[0036] Figure 7 is a schematic diagram comparing the frame exposure time of the transition image and the first moon image provided in the embodiment of this application;

[0037] Figure 8 is a flowchart of the method for photographing the moon provided in an embodiment of this application;

[0038] Figure 9 is a flowchart of the method for photographing the moon provided in an embodiment of this application;

[0039] Figure 10 is a schematic diagram comparing the frame exposure time of the transition image and the first landscape image provided in the embodiment of this application;

[0040] Figure 11 is a flowchart of the method for photographing the moon provided in an embodiment of this application;

[0041] Figure 12 is a schematic diagram of the third image provided in an embodiment of this application;

[0042] Figure 13 is a schematic diagram of the album interface provided in an embodiment of this application;

[0043] Figure 14 is a schematic diagram of editing a third image provided in an embodiment of this application;

[0044] Figure 15 is a schematic diagram of the structure of the electronic device provided in the embodiment of this application. Detailed Implementation

[0045] The technical solutions of the embodiments of this application will be described below with reference to the accompanying drawings. In the description of this application, unless otherwise stated, " / " indicates that the objects before and after are in an "or" relationship. For example, A / B can represent A or B. "And / or" in this application is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, and B alone, where A and B can be singular or plural. Furthermore, in the description of this application, unless otherwise stated, "multiple" refers to two or more. "At least one of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can represent: a, b, c, ab, ac, bc, or abc, where a, b, and c can be single or multiple. Furthermore, to facilitate a clear description of the technical solutions in the embodiments of this application, the terms "first" and "second" are used in the embodiments of this application to distinguish identical or similar items with substantially the same function and effect. Those skilled in the art will understand that the terms "first" and "second" do not limit the quantity or execution order, and that "first" and "second" are not necessarily different. Meanwhile, in the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is being used as an example, illustration, or description. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design schemes. Specifically, the use of terms such as "exemplary" or "for example" is intended to present related concepts in a concrete manner for ease of understanding.

[0046] Furthermore, the business scenarios described in the embodiments of this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided in the embodiments of this application. As those skilled in the art will know, with the emergence of new business scenarios, the technical solutions provided in the embodiments of this application are also applicable to similar technical problems.

[0047] When a mobile phone photographs the moon, it can use a moon-themed algorithm to produce a bright and clear image of the moon. Some current moon-photography methods allow for lowering the exposure during the moon's preview stage (or when the phone displays the camera's preview interface) to highlight the moon without overexposing it. This results in a relatively clear moon in the preview image, but the landscape is blurry or invisible, as shown in Figure 1(a). Later, the landscape is restored in the final image; however, the restored landscape is still not very sharp, as shown in Figure 1(b).

[0048] Alternatively, you can focus the camera on the moon or at infinity. In this way, the moon will be clearer in the final image, but the landscape will be blurry, as shown in Figure 1(c).

[0049] In other methods of photographing the moon, the exposure is not reduced during the preview stage. This results in an overexposed moon in the preview image, but the landscape is brighter and clearer, as shown in Figure 2(a). The moon is then pasted into the final image. However, in this method, since the moon in the final image is not the real moon, it will obscure the halo around the real moon, as shown in Figure 2(b).

[0050] Alternatively, you can focus the camera on the landscape and then enlarge and texture the moon in the final image. However, in this method, the moon will also obscure the halo and even part of the landscape, as shown in Figure 2(c).

[0051] It is clear that regardless of the method used to photograph the moon, the final image of the moon is neither aesthetically pleasing nor realistic, failing to meet user needs and negatively impacting the user's visual experience.

[0052] Based on the above, this application provides a method for photographing the moon, which can be applied to electronic devices including cameras. During the preview stage, the electronic device performs a camera focusing operation, presenting a preview image fused from images with different exposure times. In the preview image, the moon's texture is clear, and the brightness of the landscape is moderate. During the shooting stage, the electronic device performs the camera focusing operation again, switching the focus object to obtain a clearer image of the currently focused object. This clearer image is then fused with the clearer image of the previously focused object, resulting in a final image where both the moon and the landscape are clear and the brightness is moderate.

[0053] In some embodiments, in the above-described moon-shooting method, the electronic device first displays a camera preview interface; wherein the preview interface is used to display a preview image including the moon and a landscape; the preview image is generated based on a first moon image at a first exposure time and a first landscape image at a second exposure time, with the camera focused on a first object; the first object is either the moon or a landscape; the first exposure time is less than the second exposure time. Then, in response to a shooting operation, the electronic device performs a focus switching operation between the moon and the landscape, and obtains a second image when the camera focuses on a second object; wherein the second image is either a second moon image at the first exposure time or a second landscape image at the second exposure time; the second object is different from the first object; finally, the electronic device merges the second image with the first moon image or the first landscape image to obtain a third image.

[0054] In the above method, during the preview stage, the first moon image has a shorter exposure time, so the moon in the first moon image will not be overexposed, resulting in a more suitable moon brightness and clearer moon texture. The first landscape image has a longer exposure time, so the landscape brightness in the first landscape image is more suitable. The preview image generated based on the first moon image and the first landscape image will also present the user with a relatively clear moon texture and a landscape with moderate brightness.

[0055] Furthermore, during the preview stage, if the camera focuses on the moon, the electronic device will switch the focus object during the shooting stage, refocusing the camera on the landscape to obtain a second landscape image with clear and appropriate brightness. The second landscape image will then be merged with the first moon image to obtain a final image with clear moon texture, clear landscape, and moderate brightness for both the moon and the landscape, which is the third image.

[0056] Alternatively, during the preview stage, if the camera focuses on the landscape, the electronic device will switch the focus object during the shooting stage, refocusing the camera on the moon to obtain a second image of the moon with a clear and suitable brightness. The second moon image will then be merged with the first landscape image to obtain a final image with clear moon texture, clear landscape, and moderate brightness for both the moon and the landscape, i.e., the third image.

[0057] In the third image above, the landscape and the moon are realistic, both are relatively clear and have moderate brightness. The third image will look beautiful when displayed, with fewer out-of-focus issues, providing users with a better visual experience.

[0058] In some embodiments, the structure of the above-mentioned electronic device can be seen in FIG3. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a battery 140, antenna 1, antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a sensor module 180, buttons 190, a motor 191, a camera 192, a display screen 193, etc.

[0059] It is understood that the structures illustrated in the embodiments of this application do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements.

[0060] Processor 110 may include one or more processing units, such as: application processor (AP), modem processor, graphics processing unit (GPU), image signal processor (ISP), controller, memory, video codec, digital signal processor (DSP), baseband processor, and / or neural network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0061] The controller can be the nerve center and command center of the electronic device 100. The controller can generate operation control signals according to the instruction opcode and timing signals to complete the control of fetching and executing instructions.

[0062] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0063] In some possible implementations, the electronic device 100 implements the method for photographing the moon in the embodiments of this application through the processor 110.

[0064] In some embodiments, the processor 110 may include one or more interfaces. The USB interface 130 is a USB standard-compliant interface, specifically a Mini USB interface, Micro USB interface, USB Type-C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used for data transfer between the electronic device 100 and peripheral devices. It can also be used to connect headphones for audio playback. This interface can also be used to connect other electronic devices, such as AR devices.

[0065] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0066] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals.

[0067] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0068] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, 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), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0069] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time-Division Code Division Multiple Access (TD-CDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0070] Electronic device 100 implements display functions through a GPU, a display screen 193, and an application processor. The GPU is a microprocessor for image processing, connected to the display screen 193 and the application processor. The GPU is used to perform mathematical and geometric calculations and for graphics rendering. Processor 110 may include one or more GPUs, which execute program instructions to generate or modify display information.

[0071] The display screen 193 is used to display images, videos, etc. In some embodiments, the electronic device 100 may include one or N display screens 193, where N is a positive integer greater than 1.

[0072] In some potential applications, the display screen 193 can show a camera preview interface, which includes a preview image. The user can interact with an object on the preview interface, such as by clicking, thereby causing the electronic device 100 to control the camera to focus on that object.

[0073] Taking a scene of shooting the moon as an example, the preview image can include the moon and the landscape (or foreground) other than the moon. Users can choose to click on the moon in the preview image to make the camera focus on the moon, or they can click on the landscape in the preview image to make the camera focus on the landscape.

[0074] After the user performs a shooting operation on the electronic device 100, the display screen 193 can also display the finished product.

[0075] Electronic device 100 can perform shooting functions through ISP, camera 192, video codec, GPU, display 193 and application processor.

[0076] The ISP (Image Signal Processor) is used to process data fed back from the camera 192. For example, when taking a picture, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing, transforming it into an image visible to the naked eye. The ISP can also perform algorithmic optimizations on image noise, brightness, etc. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be integrated into the camera 192.

[0077] Camera 192 is used to capture still images or videos. An object is projected onto a photosensitive element by generating an optical image through the lens. The photosensitive element can be a charge-coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, which is then passed to an ISP for conversion into a digital image signal. The ISP outputs the digital image signal to a DSP for processing. The DSP converts the digital image signal into image signals in standard RGB, YUV, or other formats. In some embodiments, the electronic device 100 may include one or N cameras 192, where N is a positive integer greater than 1.

[0078] In some possible application scenarios, the camera 192 on the electronic device 100 may include at least one of an ultra-wide-angle lens, a wide-angle lens, a standard lens, a medium telephoto lens, and a telephoto lens.

[0079] The camera 192 may include basic lens components, advanced lens components, and special lens components. Among them, basic lens components include lens groups, lens barrels, and apertures; advanced lens components include image stabilization components, focusing components, and dust and water resistant components; and special lens components include zoom components.

[0080] In some possible application scenarios, one camera 192 or a combination of multiple cameras 192 can be referred to as a "camera". The electronic device 100 includes a camera application. After the camera application is turned on, the electronic device 100 can use one camera 192 or multiple cameras 192 to preview and capture images, and display the camera preview interface.

[0081] During the preview phase, the electronic device 100 can respond to the user's selection of a first object (such as the moon or landscape) on the preview image by focusing the camera onto the first object using a focusing component or the like. In this case, the electronic device 100 acquires long-exposure frames (long exposure time) and short-exposure frames (short exposure time) for the same shooting scene through the camera, and then merges them before displaying them on the preview interface to present the preview image. It can be understood that during the preview phase, the camera continuously acquires multiple image groups (including long-exposure frames and short-exposure frames), and the electronic device 100 continuously merges the image frames in each image group before displaying them to continuously show the preview image on the preview interface.

[0082] During the shooting phase, the electronic device 100 can respond to the user's shooting operation by performing a focus switching operation on the camera through the focusing component, etc., and switching the focus object to a second object. In this case, the electronic device 100 acquires a long exposure frame or a short exposure frame in the shooting scene through the camera, and merges the long exposure frame acquired during the shooting phase with the short exposure frame when focusing on the first object, or merges the short exposure frame acquired during the shooting phase with the long exposure frame when focusing on the first object, thereby obtaining the final image.

[0083] The external storage 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 100. The external memory card communicates with the processor 110 through the external storage interface 120 to perform data storage functions. For example, music, videos, and photos taken by a camera can be stored on the external memory card.

[0084] Internal memory 121 can be used to store computer executable program code, which includes instructions. Processor 110 executes various functional applications and data processing of electronic device 100 by running the instructions stored in internal memory 121. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Alternatively, electronic device 100 may also store images taken by a camera in internal memory 121.

[0085] Electronic device 100 can implement audio functions through audio module 170 and application processor, such as music playback and recording.

[0086] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0087] Buttons 190 include a power button, volume buttons, and a shutter button. Buttons 190 can be mechanical buttons or touch buttons. Electronic device 100 can receive button input and generate key signal inputs related to user settings and function control of electronic device 100.

[0088] In some possible application scenarios, users can perform shooting operations through the touch buttons on the preview interface, or they can perform shooting operations through the shooting button set on the electronic device 100.

[0089] Motor 191 can drive the lens group in the aforementioned camera 192 to move, thereby achieving fast and accurate focusing. Alternatively, it can be understood that motor 191 also moves during the focusing process of the camera.

[0090] The electronic device provided in this application embodiment can run an operating system (OS). This operating system can be various operating systems used in the industry, such as an operating system based on OpenHarmony, like HarmonyOS; or other operating systems such as Android.TM An operating system can refer to the iOS mobile operating system; it can also refer to various open-source operating systems or their derivatives, such as Linux OS and other embedded operating systems; or it can refer to future new operating systems, such as AI operating systems based on artificial intelligence. An operating system is a set of interconnected system software programs that manage and control the operation of electronic devices, utilize and run hardware and software resources, and provide public services to organize user interactions. In electronic devices, the operating system connects downwards to the physical devices at the hardware layer and upwards to provide a runtime environment for application software.

[0091] An operating system typically includes a kernel layer, a middleware layer, and an application layer. The application layer includes applications, which can include system applications and third-party applications. The middleware layer includes a suite of software providing various services to application developers, or frameworks providing services such as databases, multimedia, and graphics, or capabilities such as distributed scheduling and system scaling. For example, the middleware layer may include a framework layer and / or a system service layer. The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The system service layer includes the system's core capabilities, providing services to applications through the framework layer. The kernel layer is the layer between hardware and software. The kernel layer may include hardware drivers and the operating system kernel. In addition to providing hardware drivers, the kernel layer also supports functions such as memory management and system process management.

[0092] The electronic devices we use in our daily lives come in various types and forms, and are applied in a wide range of scenarios. Therefore, based on the different forms and functions of electronic devices, different application scenarios, and different user needs, the operating systems used in these devices may also differ. The basic functions implemented by the electronic device provided in this application can be implemented using a general-purpose operating system or a dedicated operating system. To more clearly illustrate the implementation of the embodiments of this application under a specific operating system, the architecture of HarmonyOS is shown below. Those skilled in the art can deduce the implementation of the embodiments of this application under other specific operating systems, such as Android. TM Implementation under operating systems, etc.

[0093] The software architecture of an electronic device can be divided into several layers. In some embodiments, as shown in Figure 4, from bottom to top, these layers are: kernel layer, system service layer, framework layer, and application layer. Layers communicate with each other through software interfaces. System functions can be tailored, added, or combined at the subsystem level depending on the deployment scenario of different device forms. Each subsystem can also be tailored, added, or combined at the functional level.

[0094] The kernel layer includes, but is not limited to:

[0095] The kernel abstract layer (KAL) provides basic kernel capabilities to upper layers by shielding the differences between multiple kernels, including but not limited to process / thread management, memory management, file system, network management, and peripheral device management.

[0096] Kernel Subsystem: Supports the selection of a suitable OS kernel for different resource-constrained devices, including but not limited to Linux kernel, HarmonyOS kernel, LiteOS (Lite Operating System), etc.

[0097] Driver Subsystem: The driver framework is the foundation for the open system hardware ecosystem, providing unified peripheral access capabilities and a framework for driver development and management. The driver framework includes: display drivers, camera drivers, audio drivers, Bluetooth drivers, sensor drivers, etc.

[0098] The system service layer comprises the core capabilities of the system, providing services to applications through the framework layer. This layer includes, but is not limited to, the following subsystems:

[0099] The system's basic capability subsystem set provides fundamental capabilities for the operation, scheduling, and migration of distributed applications across multiple devices. This set may include distributed soft bus, distributed data management, distributed task scheduling, and Ark multi-language runtime; it may also include multi-modal input subsystem, graphics subsystem, security subsystem, and AI business subsystem.

[0100] Basic software service subsystem set: provides public and general software services; the basic software service subsystem set may include event notification subsystem, telephone service subsystem, multimedia subsystem, etc.

[0101] Enhanced software service subsystem suite: Provides differentiated enhanced software services for different devices; the enhanced software service subsystem suite may include smart screen proprietary business subsystem, wearable proprietary business subsystem, IoT proprietary business subsystem, etc.

[0102] Hardware service subsystem set: Provides hardware services; the hardware service subsystem set may include location service subsystem, user IAM (Identity and Access Management) subsystem, wearable proprietary hardware service subsystem, biometric identification, IoT proprietary hardware service subsystem, etc.

[0103] Distributed task scheduling enables distributed service management (discovery, synchronization, registration, and invocation), supporting remote startup, remote invocation, remote connection, and migration of applications across devices.

[0104] Distributed data management enables data synchronization, data storage, data sharing, and data access across all scenarios and devices.

[0105] The distributed soft bus provides communication-related capabilities for seamless interconnection between multiple devices, including: WLAN service capabilities, Bluetooth service capabilities, soft bus, inter-process communication RPC (Remote Procedure Call), and StarFlash communication capabilities.

[0106] Ark Multilingual Runtime is a unified compilation runtime platform designed to support the joint compilation and execution of multiple programming languages ​​and multiple chip platforms.

[0107] The framework layer provides application programming interfaces (APIs) and programming frameworks for applications in the application layer. The framework layer includes: the ArkUI framework (which provides a complete infrastructure for UI development of system applications, including UI functions such as components, layouts, animations, and interactive events, as well as a real-time interface preview tool), the user application framework, and the Ability framework (an Ability is a lightweight application; the Ability framework schedules and manages the operation and lifecycle of Abilities). Different devices may have different operating systems, and the APIs they support may also differ.

[0108] The HarmonyOS API is a series of open capabilities provided to support HarmonyOS application development. The HarmonyOS API can be set at the framework layer or independently of the framework layer. The HarmonyOS API includes the Audio API (audio service), Push API (push service), and Account API (account service), among others.

[0109] Applications at the application layer can include system applications and extended / third-party applications. System applications can include the desktop, control bar, settings, contacts, phone, camera, etc., while extended / third-party applications can include social applications, travel applications, etc.

[0110] It is understood that the electronic devices in the embodiments of this application may be mobile phones, tablets, handheld computers, laptops, personal computers (PCs), ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), augmented reality (AR) / virtual reality (VR) devices, smartwatches, and other devices equipped with cameras.

[0111] When the electronic device executes the method for photographing the moon according to the embodiments of this application, during the preview stage, the camera can focus on either the moon or the landscape. In this stage, the short-exposure frame acquired by the electronic device can be called the moon frame, and the long-exposure frame can be called the landscape frame. The moon in the moon frame is not overexposed, resulting in suitable moon brightness and clear moon texture. The landscape frame also shows suitable brightness of the landscape. Subsequently, the preview image generated by the electronic device based on the moon frame and the landscape frame presents the user with a clear moon texture and a moderately bright landscape.

[0112] During the shooting phase, the electronic device causes the camera to perform secondary focusing, switching the focus object. For example, if the focus is on the moon in the preview phase, then the focus shifts to the landscape during the shooting phase; conversely, if the focus is on the landscape in the preview phase, then the focus shifts to the moon during the shooting phase. After secondary focusing, the electronic device acquires either long or short exposure frames from the camera and merges the long exposure frame acquired during the shooting phase with the short exposure frame acquired when focusing on the previous object, or vice versa, to obtain the final image. In the final image, both the landscape and the moon are realistic, relatively clear, and moderately bright, resulting in a visually appealing image with minimal out-of-focus issues, providing a better visual experience for the user.

[0113] The following uses a mobile phone as an example to further illustrate the method for photographing the moon in the embodiments of this application.

[0114] In some embodiments, when a user needs to photograph the moon, the mobile phone can respond to the user's trigger operation on the camera application, launch the camera application, display the preview interface, and enter the preview stage.

[0115] During the preview stage, the phone camera can focus on the moon or the landscape (or foreground) in the current shooting scene other than the moon.

[0116] The focus object can be selected by the phone's autofocus or determined by the user according to their needs.

[0117] For example, if the preview image includes a first object, the phone controls the camera to focus on the first object. This first object can be the moon or a landscape scene. In other words, the phone can be set to a preset focus object, or a default focus object. If the preset focus object is the moon, then when the phone detects the moon in the preview image, it can automatically control the camera to focus on the moon.

[0118] As another example, the mobile phone responds to a triggering operation on the first object in the preview image by controlling the camera to focus on the first object. The triggering operation on the first object could be a user's tap, double-tap, or other action on the first object in the preview image; for example, the user taps the moon in the preview image.

[0119] In this way, the phone can determine the focus object in the preview stage in multiple ways, thus meeting the user's needs in various aspects.

[0120] After identifying the focus object, the phone can acquire a first image of the moon (short exposure frame) and a first image of the landscape (long exposure frame) at different exposure durations. The first exposure duration of the first moon image is shorter than the second exposure duration of the first landscape image. The phone then merges the first moon image and the first landscape image to generate a preview image. The phone displays the preview image in the camera's preview interface.

[0121] In some examples, during the preview stage, the camera continuously acquires multiple image groups. Each image group includes a single frame of the first moon image and a single frame of the first landscape image. For each image group, the phone can merge the single frame images in that image group and then send the merged preview image to the preview interface. Thus, what is displayed on the preview interface can be an image stream formed by multiple preview images.

[0122] Because the first lunar image has a shorter exposure time, the moon in it is not overexposed, resulting in a more suitable brightness and clearer texture, as shown in Figure 5(a). The first landscape image has a longer exposure time, so the brightness of the landscape in it is more suitable, as shown in Figure 5(b). The preview image generated from the first lunar and first landscape images also presents the user with a relatively clear moon texture, and the brightness of both the moon and the landscape is moderate, as shown in Figure 5(c).

[0123] In some examples, "moderate brightness" for the moon and landscape indicates that the brightness of both the moon and landscape is within a preset brightness range. Specifically, in the first moon image with the first exposure time, the moon's brightness is within the preset brightness range, such as 0-100 lx. Similarly, in the first landscape image with the second exposure time, the landscape's brightness is also within the preset brightness range. Consequently, the brightness of both the moon and landscape in the preview image is also within the preset brightness range.

[0124] In some examples, when the mobile phone merges the first moon image and the first landscape image, it can use the stagger short-long frame fusion technology to achieve high dynamic range display in the preview stage, thereby brightening the moon and landscape in the preview image and slightly overexposing the moon.

[0125] During the preview phase, users can determine whether to perform a shooting operation based on their needs. If the shooting operation is performed, the phone enters the shooting phase, completing the method for shooting the moon as described in this application embodiment. This process may include at least two of the following embodiments.

[0126] Example 1

[0127] In some embodiments, referring to FIG6, taking the moon as the first object to be focused on by the camera in the preview stage and the landscape as the second object to be focused on in the shooting stage, the method of shooting the moon may include the following steps S601-S603.

[0128] S601, the phone displays the camera preview interface.

[0129] The preview interface is used to display a preview image including the moon and the landscape; and the preview image is generated based on the first moon image and the first landscape image when the camera is focused on the moon, and the specific generation method can be referred to the foregoing embodiments.

[0130] S602: In response to the shooting operation, the mobile phone performs a focus switching operation between the moon and the landscape. When the camera is focused on the landscape, a second landscape image is obtained under the second exposure time.

[0131] During the preview phase, the phone obtains both a focused image of the moon and a landscape image. In both images, the moon is clearer than the landscape, and both have moderate brightness. During the shooting phase, the phone performs secondary focusing to obtain a second landscape image focused on the landscape. In this second image, the landscape is clearer than the moon, and its brightness is also moderate. Therefore, in both the preview and shooting phases, the phone can acquire a clear and moderately bright first image of the moon and a clear and moderately bright second image of the landscape.

[0132] In some examples, the phone can also respond to the shooting operation by creating a transition image after acquiring the first image of the moon, and then using the transition image to perform a focus cut operation.

[0133] For example, in response to a shooting operation, the phone acquires a first image of the moon. Following the first moon image, the phone inserts a transition image. Within the time frame corresponding to the transition image, the phone performs a focus switch from the moon to the landscape, controlling the camera to focus on the landscape and acquiring a second landscape image at a second exposure duration. In other words, during the frame output phase after the shooting operation, the phone can acquire at least three images: the first moon image, the transition image, and the second landscape image.

[0134] The purpose of inserting the aforementioned transition image is to reserve a certain amount of operation time for the focus switching operation. Furthermore, the transition image has a longer frame exposure time compared to the first moon image, as shown in Figure 7. The frame exposure time of the first moon image can be represented as ES, and the frame exposure time of the transition image can be represented as N. After performing the focus switching operation within the transition image, the frame exposure time L of the second landscape image obtained is greater than the frame exposure time ES of the first moon image and the frame exposure time N of the transition image.

[0135] In some examples, within the time frame corresponding to the transition image, the phone can drive the motor to switch the camera focus, thus completing the action of switching from focusing on the moon to focusing on the landscape within the transition frame (or transition image).

[0136] S603: The mobile phone merges the second landscape image with the first moon image to obtain a third image.

[0137] During the generation of the final image, the phone discards transition frames. Also, in some examples, when fusing the second landscape image and the first moon image, the second landscape image and the first moon image can be registered and aligned based on the moon's edge feature points to obtain the third image.

[0138] In the third image, the moon and the landscape are both clear (with clear textures), and the brightness of both the moon and the landscape is within a preset brightness range. For example, the preset brightness range can be 0-100 lx. Compared to commonly used methods, the moon-photographing method provided in this application results in a final image (the third image) where both the moon and the landscape are clear, with a reduced moon brightness and a increased landscape brightness. The overall image is aesthetically pleasing and natural, with reduced out-of-focus issues.

[0139] In some examples, during the shooting stage, the first moon image fused with the second landscape image can be obtained by the mobile phone before receiving the shooting operation, or when the mobile phone receives the shooting operation, or after the mobile phone receives the shooting operation. Alternatively, it can be understood that the first moon image fused with the second landscape image can be the first moon image that participates in the fusion to generate the preview image, or it can be a different first moon image. This application embodiment does not impose specific limitations on this.

[0140] In some examples, during the preview stage, the phone can continuously acquire multiple frames of the first moon image and multiple frames of the first landscape image, and then fuse the single-frame first moon image and the first landscape image for display. In other examples, the phone can also fuse multiple frames of the first moon image to obtain a first moon image with better image quality compared to a single-frame first moon image, or what might be called a third moon image. Then, during the shooting stage, after acquiring a second landscape image, the phone fuses the second landscape image with the better-quality first moon image (or third moon image) to obtain a third image with even better image quality. Image quality can be used to indicate the image's noise level, sharpness, etc.

[0141] In some examples, the multiple frames of the first moon image used by the mobile phone when fusing multiple frames of the first moon image may be obtained by the mobile phone before receiving the shooting operation, or it may be obtained by the mobile phone after receiving the shooting operation. This application embodiment does not impose specific restrictions on this.

[0142] In some examples, the overall process of Embodiment 1 described above can be seen in Figure 8. During the preview stage, the mobile phone acquires a short-exposure frame (first moon image) and a long-exposure frame (first landscape image), and merges them for display on the phone as a preview image. After receiving a shooting command, when shooting frames, the phone first outputs a short-exposure frame (first moon image), followed by a transition frame. Within the transition frame, the phone drives the motor to switch the camera's focus from the moon to the landscape. After focusing on the landscape, the phone outputs a new long-exposure frame (second landscape image). Finally, the phone merges the first moon image and the second landscape image to generate the final image.

[0143] Example 2

[0144] In some embodiments, referring to FIG9, taking the first object focused by the camera in the preview stage as the landscape and the second object focused by the camera in the shooting stage as the moon as an example, the method for shooting the moon may include the following steps S901-S903.

[0145] S901, the phone displays the camera preview interface.

[0146] The preview interface is used to display a preview image including the moon and the landscape; and the preview image is generated based on the first moon image and the first landscape image when the camera is focused on the landscape, and the specific generation method can be referred to the foregoing embodiments.

[0147] S902: In response to the shooting operation, the phone performs a focus switching operation between the moon and the landscape. When the camera is focused on the moon, a second moon image is obtained under the first exposure time.

[0148] During the preview stage, the phone obtains both a moon image and a landscape image focused on the terrain. In both images, the terrain is clearer than the moon, and both have moderate brightness. During the shooting stage, the phone can perform secondary focusing to obtain a second moon image focused on the moon. In this second moon image, the moon is clearer than the terrain, and its brightness is also moderate. Therefore, in the preview and shooting stages, the phone can acquire a first landscape image with clear terrain and moderate brightness, and a second moon image with clear terrain and moderate brightness, respectively.

[0149] In some examples, the phone can also respond to the shooting operation by creating a transition image after acquiring the first landscape image, and then using the transition image to perform a focus cut operation.

[0150] For example, in response to a shooting operation, the phone acquires a first landscape image. Following the first landscape image, the phone inserts a transition image. Within the time frame corresponding to the transition image, the phone performs a focus switch between the landscape and the moon, controlling the camera to focus on the moon and acquiring a second moon image at the first exposure duration. In other words, during the frame output phase after the shooting operation, the phone can acquire at least three images: the first landscape image, the transition image, and the second moon image.

[0151] The purpose of inserting the aforementioned transition image is to reserve a certain amount of operation time for the focus switching operation. Furthermore, the transition image has a shorter frame length than the first landscape image, as shown in Figure 10. The frame exposure time of the first landscape image can be represented as L, and the frame exposure time of the transition image can be represented as N. After performing the focus switching operation within the transition image, the frame exposure time ES of the second moon image obtained is less than the frame exposure time L of the first landscape image and the frame exposure time N of the transition image.

[0152] In some examples, within the time frame corresponding to the transition image, the phone can drive the motor to switch the camera focus, thus completing the action of switching from focusing on the landscape to focusing on the moon within the transition frame.

[0153] S903: The mobile phone merges the second moon image with the first landscape image to obtain a third image.

[0154] During the generation of the final image, the phone discards transition frames. Also, in some examples, when fusing a second moon image and a first landscape image, the second moon image and the first landscape image can be registered and aligned based on the moon's edge feature points to obtain a third image.

[0155] In the third image, the moon and the landscape are both clear, and the brightness of both the moon and the landscape is within a preset brightness range. For example, the preset brightness range can be 0-100 lx. Compared to commonly used methods, the moon-shooting method provided in this application produces a final image where both the moon and the landscape are clear, with a reduced moon brightness and a increased landscape brightness, resulting in a more aesthetically pleasing and natural overall image with reduced out-of-focus issues.

[0156] In some examples, during the shooting stage, the first landscape image fused with the second moon image can be obtained by the mobile phone before receiving the shooting operation, or when the mobile phone receives the shooting operation, or after the mobile phone receives the shooting operation. Alternatively, it can be understood that the first landscape image fused with the second moon image can be the first landscape image that participates in the fusion to generate the preview image, or it can be a different first landscape image. This application does not impose specific limitations on this.

[0157] In some examples, during the preview stage, the phone can continuously acquire multiple frames of the first moon image and multiple frames of the first landscape image, and then fuse a single frame of the first moon image and the first landscape image for display. In other examples, the phone can also fuse multiple frames of the first landscape image to obtain a first landscape image with better image quality compared to a single frame, or what might be called a third landscape image. Then, during the shooting stage, after acquiring the second moon image, the phone fuses the second moon image with the better-quality first landscape image (or third landscape image) to obtain a third image with even better image quality. Image quality can be used to indicate the image's noise level, sharpness, etc.

[0158] In some examples, the multiple first landscape images used by the mobile phone when fusing multiple first landscape images may be those acquired by the mobile phone before receiving the shooting operation, or they may be those acquired by the mobile phone after receiving the shooting operation. This application embodiment does not impose specific limitations on this.

[0159] In some examples, the overall process of Embodiment 2 described above can be seen in Figure 11. During the preview stage, the mobile phone acquires a short-exposure frame (first moon image) and a long-exposure frame (first landscape image), and merges them for display on the phone as a preview image. After receiving a shooting command, when shooting frames, the phone first outputs a long-exposure frame (first landscape image), followed by a transition frame. Within the transition frame, the phone drives the motor to switch the camera's focus from the landscape to the moon. After focusing on the moon, the phone outputs a new short-exposure frame (second moon image). The phone then merges the second moon image and the first landscape image to generate the final image.

[0160] In the final images generated by the above embodiments (such as the third image), the moon and the landscape are clearly textured, and the brightness of the moon and the landscape is moderate, as shown in Figure 12(a) and (b). As a result, the overall image is beautiful and natural, and the blurring of the moon or landscape is reduced, which can bring a better visual experience to the user.

[0161] In some embodiments, after the mobile phone generates the third image, the user can also edit the third image to make the captured image including the moon more in line with the user's needs, such as making the moon in the image bigger or smaller (adjusting the magnification of the moon), etc. The user can participate in the process of generating the final image independently, making the user feel more involved.

[0162] In some examples, after the phone generates a third image, it can save the third image to the album (or gallery). In response to an operation to view the third image, the phone displays the album interface (or gallery interface), which is used to display the third image and includes editing controls, as shown in, for example, Figure 13(a). Then, in response to an operation triggering the editing controls, the phone displays adjustment controls for adjusting the size of the moon, as shown in, for example, Figure 13(b). The phone then, in response to an operation triggering the adjustment controls, adjusts the size of the moon in the third image, as shown in, for example, Figure 13(c). The operation triggering the editing controls can be a tap, a double tap, etc.

[0163] In some examples, after the third image is saved to the gallery or photo album, the phone can display a thumbnail of the third image on the preview screen to indicate to the user that the photo has been taken. The user can then click the thumbnail to view the third image in the gallery (or photo album). Alternatively, the user can also view the third image by clicking the gallery (or photo album) icon after exiting the camera app or when the camera preview screen is not displayed. Based on this, in some examples, the operation of viewing the third image can include the user clicking the thumbnail of the third image on the preview screen, or it can also include the user selecting the third image from at least one image in the gallery (or photo album).

[0164] For example, the process of user participation in generating the final image can be referred to as shown in Figures 14(a) and (b). Apart from the process of the user's mobile phone adjusting the size of the moon, the other schemes are the same as those in the aforementioned Embodiment 1 or Embodiment 2, and will not be repeated here.

[0165] In other embodiments, in addition to adjusting the size of the moon in the third image, the phone can also allow users to adjust the size of the landscape in the third image, thereby enhancing user engagement. For example, the album interface displayed on the phone may include a first editing control and a second editing control, wherein the first editing control is used to adjust the size of the moon, and the second editing control is used to adjust the size of the landscape. Alternatively, the editing controls in the album interface displayed on the phone can adjust both the size of the moon and the size of the landscape. For instance, after clicking the editing control, the user can click on the moon in the third image to adjust its size, and then operate the adjustment control to adjust the moon's size; or the user can click on the landscape in the third image to adjust its size, and then operate the adjustment control to adjust the landscape's size.

[0166] In some solutions, multiple embodiments of this application can be combined, and the combined solution can be implemented. Optionally, some operations in the processes of each method embodiment may be combined, and / or the order of some operations may be changed. Furthermore, the execution order between the steps of each process is merely exemplary and does not constitute a limitation on the execution order between steps; other execution orders are also possible. It is not intended to indicate that the execution order is the only possible order in which these operations can be performed. Those skilled in the art will conceive of various ways to reorder the operations described in the embodiments of this application. In addition, it should be noted that the process details involved in one embodiment of this application are also applicable to other embodiments in a similar manner, or different embodiments may be combined.

[0167] Furthermore, some steps in the method embodiments can be equivalently replaced with other possible steps. Alternatively, some steps in the method embodiments may be optional and can be deleted in certain use cases. Or, other possible steps may be added to the method embodiments.

[0168] Furthermore, the various method embodiments can be implemented individually or in combination.

[0169] It is understood that, in order to achieve the above functions, the aforementioned electronic device includes hardware and / or software modules corresponding to perform each function. Based on the algorithmic steps of the various examples described in conjunction with the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed in hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application in conjunction with the embodiments, but such implementation should not be considered beyond the scope of this application.

[0170] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each function can be divided into its own functional modules, or two or more functions can be integrated into one processing module. The integrated modules can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0171] This application also provides an electronic device. As shown in FIG15, the electronic device may include one or more processors 1501, memory 1502, and communication interface 1503.

[0172] The memory 1502, communication interface 1503, and processor 1501 are coupled together. For example, the memory 1502, communication interface 1503, and processor 1501 can be coupled together via bus 1504.

[0173] The communication interface 1503 is used for data transmission with other devices. The memory 1502 stores computer program code. The computer program code includes computer instructions, which, when executed by the processor 1501, cause the electronic device to perform the method for photographing the moon as described in this embodiment.

[0174] The processor 1501 may be a processor or controller, such as a CPU, a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with this disclosure. The processor may also be a combination that implements computational functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, etc.

[0175] Bus 1504 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. Bus 1504 can be categorized as an address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used in Figure 15, but this does not indicate that there is only one bus or one type of bus.

[0176] This application also provides a computer-readable storage medium that includes computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the relevant method steps described in the above method embodiments.

[0177] This application also provides a computer program product that, when run on a computer, causes the computer to execute the relevant method steps described in the above method embodiments.

[0178] The electronic devices, computer-readable storage media, or computer program products provided in this application are all used to perform the corresponding methods provided above. Therefore, the beneficial effects they can achieve can be referred to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0179] Through the above description of the embodiments, those skilled in the art can clearly understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0180] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0181] The units described as separate components may or may not be physically separate. A component shown as a unit can be one or more physical units; that is, it can be located in one place or distributed in multiple different locations. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0182] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0183] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiments of this application, in essence, or the part that contributes, or all or part of the technical solution, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A method for photographing the moon, characterized in that, Applied to an electronic device, the electronic device including a camera; the method includes: The camera's preview interface is displayed; the preview interface is used to display preview images including the moon and the landscape; the preview images are generated based on a first moon image at a first exposure time and a first landscape image at a second exposure time when the camera is focused on a first object; the first object is the moon or the landscape; the first exposure time is less than the second exposure time; In response to the shooting operation, a focus switching operation between the moon and the landscape is performed. When the camera focuses on the second object, a second image is obtained. The second image is either a second moon image under a first exposure time or a second landscape image under a second exposure time. The second object is different from the first object. The second image is fused with the first moon image or the first landscape image to obtain a third image.

2. The method according to claim 1, characterized in that, The moon in the preview image has a clear texture, and the brightness of both the moon and the landscape is within the preset brightness range.

3. The method according to claim 1 or 2, characterized in that, The third image shows a clear moon texture, a clear landscape, and both the brightness of the moon and the landscape are within a preset brightness range.

4. The method according to any one of claims 1-3, characterized in that, The first object is the moon, the second object is a landscape, and the second image is a second landscape image under a second exposure time; the third image is obtained by fusing the second landscape image and the first moon image.

5. The method according to claim 4, characterized in that, In response to the shooting operation, the focus switching operation between the moon and the landscape is performed, and a second image is obtained when the camera focuses on the second object, including: In response to the shooting operation, the first image of the moon is acquired; A transition image is inserted after the first moon image; Within the time range corresponding to the transition image, a focus switch is performed between the moon and the landscape, and the camera is controlled to focus on the landscape. Obtain a second landscape image with a second exposure duration.

6. The method according to claim 4 or 5, characterized in that, The method further includes: When the camera is focused on the first object, multiple frames of the first moon image are continuously acquired under the first exposure duration; By fusing the multiple frames of the first moon image, a third moon image is obtained; The second image is fused with the first moon image to obtain a third image, including: The second landscape image is fused with the third moon image to obtain a third image.

7. The method according to any one of claims 1-3, characterized in that, The first object is a landscape, the second object is the moon, and the second image is a second moon image under the first exposure time; the third image is obtained by fusing the second moon image and the first landscape image.

8. The method according to claim 7, characterized in that, In response to the shooting operation, the focus switching operation between the moon and the landscape is performed, and a second image is obtained when the camera focuses on the second object, including: In response to the shooting operation, the first landscape image is acquired; A transition image is inserted after the first landscape image; Within the time range corresponding to the transition image, a focus switch is performed between the landscape and the moon, and the camera is controlled to focus on the moon. Obtain the second image of the moon at the first exposure time.

9. The method according to claim 7 or 8, characterized in that, The method further includes: When the camera is focused on the first object, multiple frames of the first landscape image are continuously acquired under the second exposure duration; By fusing the multiple frames of the first landscape image, a third landscape image is obtained; The second image is fused with the first landscape image to obtain a third image, including: The second moon image is fused with the third landscape image to obtain a third image.

10. The method according to any one of claims 1-9, characterized in that, The method further includes: In response to a trigger operation on the preview image for the first object, control the camera to focus on the first object; or... If the first object is included in the preview image, control the camera to focus on the first object.

11. The method according to any one of claims 1-10, characterized in that, The method further includes: In response to an operation to view the third image, an album interface is displayed, the album interface being used to display the third image, and the album interface including editing controls; In response to an operation that triggers the editing control, an adjustment control for adjusting the size of the moon is displayed; In response to an operation on the adjustment control, the size of the moon in the third image is adjusted.

12. An electronic device, characterized in that, The device includes a memory and one or more processors; the memory is coupled to the processors; wherein the memory stores computer program code, the computer program code including computer instructions, which, when executed by the processor, cause the electronic device to perform the method of photographing the moon as described in any one of claims 1-11.

13. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on an electronic device, cause the electronic device to perform the method of photographing the moon as described in any one of claims 1-11.

14. A computer program product, characterized in that, When the computer program product is run on a computer, it causes the computer to perform the method of photographing the moon as described in any one of claims 1-11.