Moon image acquisition method and device, electronic device, and storage medium

By obtaining the position data of the moon and cropping the moon image with the actual zoom ratio of the camera module, the problem of moving the moon image out of the preview interface under high-power zoom is solved, and the alignment area and the display area are matched, improving the user's shooting experience.

CN114071004BActive Publication Date: 2024-12-13BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010784863.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-06
Publication Date
2024-12-13
Estimated Expiration
2040-08-06

AI Technical Summary

Technical Problem

In the high-power zoom state, the user's hand trembles cause the moon image to be unable to remain in the preview interface and the satisfactory moon image cannot be obtained.

Method used

By obtaining the position data of the moon in the original image and cropping the moon image from the original image according to the actual zoom factor of the camera module, the moon is located in the center area of ​​the image, thereby matching the alignment area and the display area to avoid the moon being Move out of the display area.

Benefits of technology

Improves the user's shooting experience, ensuring that the moon images are not moved out of the display area at high focal length, and improves the shooting quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114071004B_ABST
    Figure CN114071004B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a method and device for obtaining a moon image, an electronic device, and a storage medium. The method comprises: obtaining position data of the moon in an original image; obtaining a moon image based on the position data and the current actual zoom multiple of a camera module, wherein the central area of ​​the moon image contains the moon. In this embodiment, the alignment area can be matched with the display area to prevent the moon from being moved out of the display area in the case of a high focal length, which is conducive to improving the user's shooting experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of image processing technology, and in particular to a method and device for obtaining a moon image, an electronic device, and a storage medium. Background Art

[0002] With the development of mobile phone imaging technology, users increasingly rely on mobile phones to capture images of various scenes, such as the moon. In actual applications, when photographing the moon, users need to use high-power zoom to make the moon large enough in the image. However, in an unstable state such as high-position zoom, a slight shake of the user's hand will cause the moon to move out of the preview interface, making it impossible to obtain a satisfactory moon image. Summary of the invention

[0003] The present invention provides a method and device for obtaining a moon image, an electronic device, and a storage medium to address the deficiencies of related technologies.

[0004] According to a first aspect of an embodiment of the present disclosure, a method for acquiring a moon image is provided, comprising:

[0005] Get the position data of the moon in the original image;

[0006] A moon image is acquired based on the position data and the current actual zoom factor of the camera module, wherein a central area of ​​the moon image includes the moon.

[0007] In one embodiment, acquiring a moon image based on the position data and a current actual zoom factor of the camera module includes:

[0008] Determine an area of ​​interest in the original image based on the position data and a current actual zoom factor of the camera module, wherein the moon in the original image is located in a central area of ​​the area of ​​interest;

[0009] Perform image post-processing on the portion of the original image located in the region of interest to obtain a moon image.

[0010] Optionally, before obtaining the position data of the moon in the original image, the method further includes:

[0011] Determine whether the camera module meets the preset conditions;

[0012] The preset conditions include any one of the following: 1) the current shooting mode is the moon mode, 2) in the moon mode and the current zoom ratio of the camera module exceeds a preset ratio threshold.

[0013] Optionally, when the preset condition is that the camera module is in moon mode and the current zoom factor of the camera module exceeds a preset factor threshold, determining that the camera module meets the preset condition includes:

[0014] Obtaining the current shooting mode of the camera module;

[0015] When the current shooting mode is the moon mode, obtaining the current actual zoom factor of the camera module;

[0016] When the actual zoom factor exceeds a preset factor threshold, it is determined that the camera module meets a preset condition.

[0017] Optionally, obtaining the current shooting mode of the camera module includes:

[0018] Recognize the original image using a preset image recognition algorithm to obtain the object contained in the original image;

[0019] When the moon exists in the objects included in the original image, it is determined that the current shooting mode of the camera module is the moon mode.

[0020] Optionally, after obtaining the position data of the moon in the original image, the method further includes:

[0021] Based on the position data, a preview image having a size corresponding to an actual zoom factor of the camera module is cropped from the original image;

[0022] The preview image is displayed.

[0023] According to a second aspect of an embodiment of the present disclosure, there is provided a moon image acquisition device, comprising:

[0024] A position data acquisition module is used to acquire the position data of the moon in the original image;

[0025] The moon image acquisition module is used to acquire the moon image based on the position data and the current actual zoom factor of the camera module, wherein the central area of ​​the moon image contains the moon.

[0026] Optionally, the moon image acquisition module includes:

[0027] A region acquisition unit, configured to determine a region of interest in the original image based on the position data and a current actual zoom factor of the camera module, wherein the moon in the original image is located in a central region of the region of interest;

[0028] The image acquisition unit is used to perform image post-processing on the partial image in the original image located in the region of interest to obtain a moon image.

[0029] Optionally, the device further comprises:

[0030] A condition determination module, used to determine whether the camera module meets a preset condition;

[0031] The preset condition includes any of the following:

[0032] 1) The current shooting mode is the moon mode, 2) In the moon mode, the current zoom ratio of the camera module exceeds the preset ratio threshold.

[0033] Optionally, when the preset condition is that the camera module is in moon mode and the current zoom factor exceeds a preset factor threshold, the condition determination module includes:

[0034] A mode acquisition unit, used to acquire the current shooting mode of the camera module;

[0035] A zoom factor acquisition unit, used to acquire the actual zoom factor of the camera module when the current shooting mode is the moon mode;

[0036] The condition determination unit is used to determine whether the camera module meets the preset condition when the actual zoom ratio exceeds the preset ratio threshold.

[0037] Optionally, the mode acquisition unit includes:

[0038] An object acquisition subunit, used to recognize the original image using a preset image recognition algorithm to obtain the object contained in the original image;

[0039] The mode determination subunit is used to determine that the current shooting mode of the camera module is the moon mode when there is a moon among the objects contained in the original image.

[0040] Optionally, the device further comprises:

[0041] An image cropping module, used for cropping a preview image of a size corresponding to an actual zoom factor of the camera module from the original image based on the position data;

[0042] An image display module is used to display the preview image.

[0043] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0044] processor;

[0045] a memory for storing a computer program executable by the processor;

[0046] The processor is configured to execute the computer program in the memory to implement the steps of the above method.

[0047] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, and when an executable computer program in the storage medium is executed by a processor, the steps of the above method can be implemented.

[0048] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0049] It can be seen from the above embodiments that in the disclosed embodiments, by obtaining the position data of the moon in the original image, the moon image can be obtained according to the position data and the current actual zoom factor of the camera module, and the moon is located in the central area of ​​the moon image, so that the alignment area is matched with the display area, avoiding the moon from being moved out of the display area in the case of high focal length, which is beneficial to improving the user's shooting experience.

[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0052] Figure 1 is a schematic diagram of a cropped moon image shown in the related art.

[0053] Figure 2 The figure is a flow chart of a method for acquiring a moon image according to an exemplary embodiment.

[0054] Figure 3 is a flow chart of determining a moon mode according to an exemplary embodiment.

[0055] Figure 4 The present invention is a flowchart of determining whether a preset condition is satisfied according to an exemplary embodiment.

[0056] Figure 5 The following is a flowchart of displaying a preview image according to an exemplary embodiment.

[0057] Figure 6 The figure is a flow chart of obtaining a moon image according to an exemplary embodiment.

[0058] Figure 7 is a schematic diagram of cropping a moon image according to an exemplary embodiment.

[0059] Figure 8 The figure is a block diagram of a device for acquiring a moon image according to an exemplary embodiment.

[0060] Fig. 9 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0061] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described below by way of example do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.

[0062] With the development of mobile phone imaging technology, users increasingly rely on mobile phones to capture images of various scenes, such as the moon. In actual applications, when photographing the moon, users need to use high-power zoom to make the moon large enough in the image. However, in an unstable state such as high-position zoom, a slight shake of the user's hand will cause the moon to move out of the preview interface, making it impossible to obtain a satisfactory moon image.

[0063] In the process of implementing the embodiment of the present disclosure, after careful analysis, the inventors found that: the image processor will cut out an image P1 of a corresponding size from the original image P0 (whose size is the same as the size of the image sensor) collected by the image sensor according to the magnification N of the camera module, and then display it on the display to achieve the effect of magnification N times. Figure 1 Then, during the above-mentioned cutting process, the image processor will always use the preset position of the original image (such as the center position O) as the center position of the displayed image, so that the alignment area does not match the display area. In addition, due to the shaking of the user's hand, the moon is often moved out of the display area. Figure 1 As shown in FIG. 1 , when the magnification is increased from N times to N1 times, the moon M is moved out of the cropping area and cannot be displayed on the preview image, which reduces the shooting experience.

[0064] In order to solve the above technical problems, the disclosed embodiment provides a method for obtaining a moon image, the inventive concept of which is to obtain the position data of the moon in the original image; taking the position data as the center position, combined with the current actual zoom factor of the camera module, the moon image is cut out from the original image, wherein the center area of ​​the moon image contains the moon. In this way, in this embodiment, the alignment area can be matched with the display area to prevent the moon from being moved out of the display area, which is conducive to improving the user's shooting experience.

[0065] Figure 2 1 is a flow chart of a method for obtaining a moon image according to an exemplary embodiment, which is applicable to an electronic device, which may include a smart phone, a personal computer, or a server. Figure 2 , a method for obtaining a moon image, comprising steps 21 to 22:

[0066] In step 21, the position data of the moon in the original image is obtained.

[0067] In this embodiment, a camera module is provided on the electronic device. When a user triggers a "camera" APP on the system interface of the electronic device, the camera module can be turned on and controlled to be in a shooting state.

[0068] During the shooting process, the user can operate the lens of the camera module, for example, by rotating it clockwise or counterclockwise to enlarge or reduce the zoom factor of the camera module. Combined with the preview image on the display screen of the electronic device, the user can determine whether the size of the moon meets the user's expected size at the current actual zoom factor, and stop adjusting until it meets the expected size.

[0069] In one embodiment, a preset image recognition algorithm may be stored in the electronic device, such as a recognition algorithm based on machine learning, such as a convolutional neural network, or a recognition algorithm based on feature matching, such as a feature extraction algorithm ORB (Oriented Fast and Rotated Brief), a scale-invariant feature transform SIFT (Scale-invariant feature transform), etc., and a suitable image recognition algorithm may be selected according to the specific scenario, which is not limited here. When it is detected that the user triggers the shooting operation, the electronic device may use the above-mentioned preset image recognition algorithm to identify the objects contained in the original image, such as people, scenery or the moon. In this way, when the moon is included in the original image, the position data of the moon can be obtained. The above-mentioned position data may include the horizontal and vertical coordinates of the center position of the moon in the original image, and may also include data such as the width and length of the moon, which are not limited here.

[0070] In one embodiment, the electronic device may also determine whether the camera module meets a preset condition before determining the position data, and then execute step 21 after the preset condition is met. The preset condition includes any one of the following: 1) the current shooting mode is the moon mode, 2) in the moon mode and the current zoom factor of the camera module exceeds the preset factor threshold.

[0071] In one example, when the preset condition is that the current shooting mode is the moon mode, the electronic device determines whether the camera module meets the preset condition, including: the electronic device can obtain the current shooting mode of the camera module. Figure 3In step 31, the electronic device can use a preset image recognition algorithm to identify the original image and obtain the object contained in the original image; in step 32, when there is a moon among the objects contained in the original image, it is determined that the current shooting mode of the camera module is the moon mode; when there is no moon in the original image, the current shooting mode can be determined according to the light of the current shooting scene or the historical shooting mode before the camera module is turned on. The electronic device can determine that the preset conditions are met when the current shooting mode of the camera module is the moon mode; otherwise, if the preset conditions are not met, shooting can be performed according to the existing shooting mode. For example, the acquisition method can be to read a shooting mode identifier with a value of 1 and use the corresponding shooting mode as the current shooting mode. The above-mentioned shooting modes may include moon mode, portrait mode, night scene mode, etc. When the user adjusts the shooting mode of the camera module to a certain mode, the shooting mode identifier is set to 1.

[0072] In another example, when the preset condition is that the current shooting mode is the moon mode, the electronic device determines whether the camera module meets the preset condition, see Figure 4 , including: in step 41, the electronic device can obtain the current shooting mode of the camera module, and the method for determining the shooting mode can refer to the content in the previous paragraph. In step 42, when the current shooting mode is the moon mode, the current actual zoom multiple of the camera module is obtained. In step 43, when the actual zoom multiple exceeds the preset multiple threshold, it can be determined that the camera module meets the preset condition, and step 21 can be executed. Otherwise, the preset condition is not met, and shooting can be performed according to the existing shooting mode.

[0073] The above-mentioned preset magnification threshold can be determined according to the critical zoom magnification of at least two lenses in the camera module. For example, the magnification of the wide-angle lens is 1.0-3.0, and the magnification of the telephoto lens is 3.0-5.0, then the preset magnification threshold can be set to 3.0. Of course, the above-mentioned preset magnification threshold can also be determined in a big data manner. By counting the zoom magnifications of various camera modules and the corresponding effects when shooting the moon, the preset magnification threshold is determined. For example, the zoom magnification corresponding to the best shooting effect is used as the preset magnification threshold. It is understandable that various settings of the preset magnification threshold fall within the protection scope of the present disclosure as long as the quality of the moon image can be improved. In this example, the value range of the preset magnification threshold can be 3.0~5.0.

[0074] It should be noted that, in this embodiment, by setting a preset zoom factor threshold, it is possible to prevent the zoom factor from being too large or the user from shaking, which may affect the quality of the moon image, and it is also possible to reduce the amount of calculation required for data processing by the electronic device.

[0075] In one embodiment, see Figure 5In step 51, after acquiring the position data, the electronic device can cut out a preview image of a size corresponding to the actual zoom factor from the original image. In step 52, the electronic device can control the display screen to display the preview image, so that the user can see the captured image in time.

[0076] In step 22, a moon image is acquired based on the position data and the current actual zoom factor of the camera module, wherein the central area of ​​the moon image includes the moon.

[0077] In this embodiment, the electronic device can determine the moon image based on the moon position data and the current actual zoom factor of the camera module, see Figure 6 , including: in step 61, the electronic device can determine the area of ​​interest in the original image based on the position data and the current actual zoom multiple of the camera module, the effect is as follows Figure 7 The moon in the original image is located in the center of the region of interest, and the center position O1 of the moon coincides with the center position of the region of interest. In step 62, the electronic device may perform image post-processing, such as auto focus, auto white balance, auto exposure, etc., on the portion of the original image located in the region of interest, thereby obtaining a moon image.

[0078] At this point, by obtaining the position data of the moon in the original image in the embodiment of the present disclosure, the moon image can be obtained according to the position data and the current actual zoom factor of the camera module, and the moon is located in the central area of ​​the moon image, so that the alignment area is matched with the display area, avoiding the moon from being moved out of the display area in the case of high focal length, which is beneficial to improving the user's shooting experience.

[0079] The following describes the above-mentioned method for obtaining the moon image in conjunction with an embodiment in which a user uses a mobile phone to take a moon image, including:

[0080] When the user uses the phone's camera function and turns on the moon mode or automatically switches to the moon mode, the following functions can be enabled:

[0081] When it is detected that the actual zoom ratio of the camera module adjusted by the user exceeds the preset zoom threshold, the processor will no longer output images with higher zoom ratios. Any zoom ratio set by the user that exceeds this threshold will no longer cause the ISP to increase the output image ratio.

[0082] The original image is input into the preset moon mode algorithm, and the moon mode algorithm identifies the position data of the moon in the original image. At the same time, the moon mode algorithm cuts out an image (i.e., a preview image) that conforms to the current actual zoom ratio from the original image with the above position data as the center position, and controls the display screen to display the preview image.

[0083] The moon mode algorithm may also send the position data and the original image to a preset 3A algorithm, which is used to perform image post-processing on the input image, such as auto focus, auto white balance, and auto exposure.

[0084] The 3A algorithm defines a region of interest (ROI) in the original image based on the position data of the moon in the original image determined by the moon mode algorithm, and then performs 3A processing on part of the image in the ROI area to obtain a moon image with the moon in the center area. That is, in this example, the moon is always used as the ROI, so that the obtained parameters are stable and the image quality of the moon is high.

[0085] Based on the above-mentioned method for obtaining a moon image, the present disclosure also provides a moon image obtaining device, see Figure 8 ,include:

[0086] A position data acquisition module 81 is used to acquire the position data of the moon in the original image;

[0087] The moon image acquisition module 82 is used to acquire a moon image based on the position data and the current actual zoom factor of the camera module, wherein the central area of ​​the moon image contains the moon.

[0088] In one embodiment, the moon image acquisition module 82 includes:

[0089] A region acquisition unit, configured to determine a region of interest in the original image based on the position data and a current actual zoom factor of the camera module, wherein the moon in the original image is located in a central region of the region of interest;

[0090] The image acquisition unit is used to perform image post-processing on the partial image in the original image located in the region of interest to obtain a moon image.

[0091] In one embodiment, the device further comprises:

[0092] A condition determination module, used to determine whether the camera module meets a preset condition;

[0093] The preset conditions include any one of the following: 1) the current shooting mode is the moon mode, 2) in the moon mode and the current zoom ratio of the camera module exceeds a preset ratio threshold.

[0094] In one embodiment, when the preset condition is that the camera module is in moon mode and the current zoom factor exceeds a preset factor threshold, the condition determination module includes:

[0095] A mode acquisition unit, used to acquire the current shooting mode of the camera module;

[0096] A zoom factor acquisition unit, used to acquire the actual zoom factor of the camera module when the current shooting mode is the moon mode;

[0097] The condition determination unit is used to determine whether the camera module meets the preset condition when the actual zoom ratio exceeds the preset ratio threshold.

[0098] In one embodiment, the mode acquisition unit includes:

[0099] An object acquisition subunit, used to recognize the original image using a preset image recognition algorithm to obtain the object contained in the original image;

[0100] The mode determination subunit is used to determine that the current shooting mode of the camera module is the moon mode when there is a moon among the objects contained in the original image.

[0101] In one embodiment, the device further comprises:

[0102] An image cropping module, used for cropping a preview image of a size corresponding to an actual zoom factor of the camera module from the original image based on the position data;

[0103] An image display module is used to display the preview image.

[0104] It is understandable that the device provided in the embodiment of the present disclosure corresponds to the above method. For the specific content, reference can be made to the content of each embodiment of the method, which will not be repeated here.

[0105] Fig. 9 9 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 900 may be a smart phone, a computer, a digital broadcast terminal, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0106] Reference Fig. 9 , the electronic device 900 may include one or more of the following components: a processing component 902 , a memory 904 , a power component 906 , a multimedia component 908 , an audio component 910 , an input / output (I / O) interface 912 , a sensor component 914 , a communication component 916 , and an image acquisition component 918 .

[0107] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute computer programs. In addition, the processing component 902 may include one or more modules to facilitate interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate interaction between the multimedia component 908 and the processing component 902.

[0108] The memory 904 is configured to store various types of data to support operations on the electronic device 900. Examples of such data include computer programs for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0109] The power supply component 906 provides power to various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 900. The power supply component 906 may include a power supply chip, and the controller may communicate with the power supply chip to control the power supply chip to turn on or off a switch device, so that the battery supplies power to the mainboard circuit or not.

[0110] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the target object. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the target object. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0111] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC), and when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 904 or sent via the communication component 916. In some embodiments, the audio component 910 also includes a speaker for outputting audio signals.

[0112] The I / O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which may be a keyboard, a click wheel, a button, etc.

[0113] The sensor assembly 914 includes one or more sensors for providing various aspects of status assessment for the electronic device 900. For example, the sensor assembly 914 can detect the open / closed state of the electronic device 900, the relative positioning of components, such as the display screen and keypad of the electronic device 900, and the sensor assembly 914 can also detect the position change of the electronic device 900 or a component, the presence or absence of contact between the target object and the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and the temperature change of the electronic device 900.

[0114] The communication component 916 is configured to facilitate wired or wireless communication between the electronic device 900 and other devices. The electronic device 900 can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G, 5G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0115] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components.

[0116] In an exemplary embodiment, a non-temporary readable storage medium including an executable computer program is also provided, such as a memory 904 including instructions, and the executable computer program can be executed by a processor. The readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0117] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the disclosure disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0118] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A method for acquiring a moon image, characterized in that: include: Get the position data of the moon in the original image; Acquiring a moon image based on the position data and the current actual zoom multiple of the camera module, including: determining an area of ​​interest in the original image based on the position data and the actual zoom multiple and cropping the area of ​​interest in the original image to obtain a preview image, wherein the moon in the original image is located in a central area of ​​the area of ​​interest and the central position of the moon coincides with the central position of the area of ​​interest; Performing image post-processing on a portion of the original image located in the region of interest to obtain a moon image whose central region includes the moon, wherein the central position of the moon image coincides with the central position of the included moon; The display screen is controlled to display the preview image.

2. The method for obtaining a moon image according to claim 1, characterized in that: Before obtaining the position data of the moon in the original image, the method further includes: Determine whether the camera module meets the preset conditions; The preset condition includes any of the following: 1) The current shooting mode is the moon mode, 2) In the moon mode, the current zoom ratio of the camera module exceeds the preset ratio threshold.

3. The method for obtaining a moon image according to claim 2, characterized in that: When the preset condition is that the camera module is in moon mode and the current zoom factor of the camera module exceeds the preset factor threshold, determining that the camera module meets the preset condition includes: Obtaining the current shooting mode of the camera module; When the current shooting mode is the moon mode, obtaining the current actual zoom factor of the camera module; When the actual zoom factor exceeds a preset factor threshold, it is determined that the camera module meets a preset condition.

4. The method for obtaining a moon image according to claim 3, characterized in that: Obtaining the current shooting mode of the camera module includes: Using a preset image recognition algorithm to recognize the original image, and obtaining the object contained in the original image; When the moon exists in the objects included in the original image, it is determined that the current shooting mode of the camera module is the moon mode.

5. A moon image acquisition device, characterized in that: include: A position data acquisition module is used to acquire the position data of the moon in the original image; The moon image acquisition module is used to acquire the moon image based on the position data and the current actual zoom multiple of the camera module, including: determining the region of interest in the original image based on the position data and the actual zoom multiple and cropping the region of interest in the original image to obtain a preview image, wherein the moon in the original image is located in the central region of the region of interest and the central position of the moon coincides with the central position of the region of interest; Performing image post-processing on a portion of the original image located within the region of interest to obtain a moon image whose central region includes the moon, wherein the central position of the moon image coincides with the central position of the included moon; and controlling the display screen to display the preview image.

6. The moon image acquisition device according to claim 5, characterized in that: The device also includes: A condition determination module, used to determine whether the camera module meets a preset condition; The preset condition includes any of the following: 1) The current shooting mode is the moon mode, 2) In the moon mode, the current zoom ratio of the camera module exceeds the preset ratio threshold.

7. The moon image acquisition device according to claim 6, characterized in that: When the preset condition is that the camera module is in moon mode and the current zoom factor exceeds the preset factor threshold, the condition determination module includes: A mode acquisition unit, used to acquire the current shooting mode of the camera module; A zoom factor acquisition unit, used to acquire the actual zoom factor of the camera module when the current shooting mode is the moon mode; The condition determination unit is used to determine whether the camera module meets the preset condition when the actual zoom ratio exceeds the preset ratio threshold.

8. The moon image acquisition device according to claim 7, characterized in that: The mode acquisition unit comprises: An object acquisition subunit, used to recognize the original image using a preset image recognition algorithm to obtain the object contained in the original image; The mode determination subunit is used to determine that the current shooting mode of the camera module is the moon mode when there is a moon among the objects contained in the original image.

9. An electronic device, characterized in that: include: processor; a memory for storing a computer program executable by the processor; The processor is configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 4.

10. A computer-readable storage medium, characterized in that: When the executable computer program in the storage medium is executed by a processor, the steps of the method according to any one of claims 1 to 4 can be implemented.

Citation Information

Patent Citations

  • Moon shooting method and electronic device

    CN109951633A