Image processing methods and electronic devices
By generating multiple frames of images and adjusting exposure parameters when relative motion is detected, the blurring and noise problems of electronic devices with fixed camera apertures when shooting moving objects are solved, achieving image processing effects with high clarity and low noise.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2026-03-13
AI Technical Summary
When the camera aperture is fixed, photos of moving objects are prone to blurriness and increased noise. Existing technologies cannot solve both blurriness and noise problems at the same time.
When relative motion is detected, multiple frames are generated and exposure parameters are adjusted, including increasing shutter speed and ISO. Subsequently, image fusion is performed to improve sharpness and reduce noise.
In situations of relative motion, images with high clarity and low noise are captured, improving photographic quality.
Smart Images

Figure CN115696066B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal technology, and in particular to an image processing method and an electronic device. Background Technology
[0002] Most electronic devices nowadays are equipped with cameras, which can be activated through camera apps to take photos. When the scene being photographed is poorly lit, or when there are moving objects within the camera's field of view (i.e., the scene is in motion), the photos will be blurry to varying degrees. Shaking of the electronic device will also cause the photos to be blurry.
[0003] Because electronic device cameras typically have a fixed aperture, according to imaging principles, to capture a clearer image of a moving object, the exposure time needs to be reduced (equivalent to increasing the shutter speed). This results in less accumulated motion per unit exposure time, thus recording less motion change of the object within that time, leading to a clearer image.
[0004] However, reducing the exposure time will correspondingly reduce the brightness of the photo image. To improve the brightness, the ISO (International Organization for Standardization) needs to be increased. However, increasing the ISO will significantly increase the noise in the photo image. In other words, by increasing the ISO, a photo image with reduced motion blur but increased image noise will be obtained. For a single frame input image, it is impossible to fundamentally solve the problems of blur and noise at the same time. Summary of the Invention
[0005] This application provides an image processing method and an electronic device. The image processing method of this application can ensure that when there is relative motion between the subject and the electronic device, the electronic device can capture images with high clarity and low noise.
[0006] In a first aspect, an image processing method is provided, applied to an electronic device, the method comprising:
[0007] The display screen shows a preview interface, which includes a first image. The first image is an image of the subject captured by the camera under initial exposure parameters, and the initial exposure parameters of the camera are a first shutter speed and a first ISO.
[0008] Determine whether there is relative motion between the object being photographed and the electronic device;
[0009] When there is relative motion between the subject and the electronic device, the electronic device generates a second image and at least one third image. The exposure parameters corresponding to the second image are the first exposure parameters. The first exposure parameters include a second shutter speed and a second ISO. The second shutter speed is 1 / N of the first shutter speed, and the second ISO is N times the first ISO. The exposure parameters corresponding to the third image are the initial exposure parameters.
[0010] A frame of the second image and at least one frame of the third image are fused together to form a fourth image.
[0011] This application embodiment utilizes a multi-frame fusion method to ensure that when there is relative motion between the subject and the electronic device, the electronic device can capture images with high clarity and low noise.
[0012] In one possible design, to facilitate determining whether relative motion exists, the step of determining whether relative motion exists between the subject and the electronic device includes: acquiring a preview stream; and determining whether relative motion exists between the subject and the electronic device based on the preview stream.
[0013] In one possible design, the step of determining whether there is relative motion between the subject and the electronic device based on the preview stream includes:
[0014] The preview stream includes at least two of the first images;
[0015] Determine whether there is a change between two adjacent first images in the preview stream;
[0016] Count the number of first images that changed in the preview stream;
[0017] Calculate the proportion of the number of first images that have changed in the preview stream to the total number of images that can change;
[0018] Determine whether the image ratio is greater than a preset image ratio;
[0019] If the image ratio is greater than the preset image ratio, it is determined that there is relative motion between the photographed object and the electronic device;
[0020] If the image ratio is not greater than a preset image ratio, it is determined that there is no relative motion between the subject and the electronic device.
[0021] In one possible design, the step of determining whether there is a change between two adjacent first images in the preview stream includes:
[0022] Determine whether there are any changes between the pixels in the first two frames of the image;
[0023] Count the number of pixels that changed;
[0024] Calculate the percentage of pixels that changed out of the total number of pixels in the first image;
[0025] Determine whether the pixel ratio is greater than a preset pixel ratio;
[0026] If the pixel ratio is greater than the preset pixel ratio, it is determined that a change has occurred between the two frames of the first image.
[0027] If the pixel ratio is not greater than the preset pixel ratio, it is determined that there has been no change between the two first images.
[0028] In one possible design, the step of determining whether there has been a change between the pixels in the two frames of the first image includes:
[0029] Convert the first images of two adjacent frames in the preview stream into grayscale images;
[0030] The grayscale difference is obtained by taking the absolute value of the difference between the grayscale values of corresponding pixels in two grayscale images.
[0031] Determine if the grayscale difference is greater than the grayscale threshold;
[0032] If the grayscale difference is greater than the grayscale threshold, it is determined that there is a change between the pixels in the two frames of the first image;
[0033] If the grayscale difference is not greater than the grayscale threshold, it is determined that there is no change between the pixels in the two frames of the first image.
[0034] In one possible design, in order to reduce image noise, one frame of the second image and at least one frame of the third image are fused into a fourth image through noise reduction.
[0035] In one possible design, the noise reduction method includes temporal noise reduction, which can utilize features from multiple frames of images to remove noise.
[0036] In one possible design, to achieve better noise reduction, the temporal denoising steps include sequential alignment and temporal fusion steps.
[0037] In one possible design, to facilitate noise discrimination, the alignment step includes: using the second image as a reference frame, the third image is aligned to the reference frame.
[0038] In one possible design, to achieve the purpose of aligning multiple frames of images, the alignment steps include: extracting SURF features from the images and performing a registration operation on the second and third images.
[0039] In one possible design, to make the image clearer, the temporal fusion step includes:
[0040] Based on the second image and the third image, determine the non-motion region of the third image;
[0041] The non-moving regions in the second and third images are merged to obtain the fourth image.
[0042] In one possible design, the step of determining the non-motion region of the third image based on the second image and the third image includes:
[0043] The grayscale difference is obtained by taking the absolute value of the difference between the grayscale values of each corresponding pixel in the second and third images.
[0044] Determine whether the grayscale difference is greater than the motion grayscale threshold;
[0045] If the grayscale difference is not greater than the motion grayscale threshold, then the pixels in the third image are determined to be non-motion regions.
[0046] In one possible design, the step of fusing the non-moving regions in the second image and the third image to obtain a fourth image includes: determining the grayscale value of each pixel in the fourth image based on the grayscale values of the corresponding pixels in the non-moving regions of the second image and the third image.
[0047] In one possible design, in order to remove noise from a single frame image, the denoising method further includes: performing spatial denoising on the temporally denoised image.
[0048] In one possible design, to improve the noise reduction effect, the spatial noise reduction method includes the NLM method.
[0049] In one possible design, the method further includes precisely adjusting exposure parameters before the electronic device generates a second frame and at least one third frame:
[0050] Determine the degree of motion change between the subject and the electronic device;
[0051] Based on the degree of motion change, the first exposure parameters corresponding to the second image are determined.
[0052] In one possible design, the step of determining the degree of motion change between the subject and the electronic device includes:
[0053] Obtain the two adjacent frames of images before generating the second and third images;
[0054] Determine whether the pixels in the two frames of the image have changed before;
[0055] Count the number of pixels that changed;
[0056] Calculate the percentage of pixels that changed out of the total number of pixels in the image.
[0057] A second aspect provides an electronic device, the electronic device comprising:
[0058] A processor and a memory, the memory being used to store at least one instruction, which, when loaded and executed by the processor, implements the method.
[0059] A third aspect provides a computer-readable storage medium including a computer program that, when run on a computer, causes the computer to perform the method.
[0060] The fourth aspect provides a computer program product that, when run on a computer, causes the computer to perform the method. Attached Figure Description
[0061] Figure 1 A schematic diagram illustrating the process of taking a photograph of a rotating windmill, as provided in an embodiment of this application;
[0062] Figure 2 A schematic diagram illustrating the taking of a photograph of a sports field scene, provided as an embodiment of this application;
[0063] Figure 3(a) shows the main interface of a mobile phone provided in an embodiment of this application;
[0064] Figure 3(b) shows the shooting interface of a camera provided in an embodiment of this application;
[0065] Figure 3(c) is a user interface provided in an embodiment of this application that displays a photograph taken when the image processing method provided in the embodiment of this application is not executed;
[0066] Figure 3(d) is a user interface provided in an embodiment of this application that displays a photograph taken when the image processing method provided in the embodiment of this application is executed;
[0067] Figure 4 A flowchart illustrating a method for taking photos in motion, as provided in an embodiment of this application;
[0068] Figure 5 A flowchart illustrating an image processing method provided in an embodiment of this application;
[0069] Figure 6 A flowchart illustrating yet another image processing method provided in this application embodiment;
[0070] Figure 7 A flowchart illustrating yet another image processing method provided in this application embodiment;
[0071] Figure 8 A flowchart illustrating yet another image processing method provided in this application embodiment;
[0072] Figure 9 A flowchart illustrating yet another image processing method provided in this application embodiment;
[0073] Figure 10 This is a schematic diagram illustrating the relationship between the degree of motion change and the reduction in exposure factor provided in an embodiment of this application.
[0074] Figure 11 A flowchart illustrating another image processing method provided in this application embodiment;
[0075] Figure 12 This is an exemplary composition diagram of the electronic device 1000 provided in an embodiment of this application. Detailed Implementation
[0076] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings.
[0077] The terminology used in the following embodiments of this application is for the purpose of describing specific embodiments only and is not intended to limit the embodiments of this application. As used in the specification and appended claims of the embodiments of this application, the singular expressions "a," "an," "the," "the," "the," and "this" are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that although the terms first, second, etc., may be used in the following embodiments to describe a certain type of object, the object should not be limited to these terms. These terms are only used to distinguish specific objects of that type of object. For example, the terms first, second, etc., may be used in the following embodiments to describe a window, but the window should not be limited to these terms. These terms are only used to distinguish different windows displayed on the screen. The same applies to other types of objects that may be described using the terms first, second, etc. in the following embodiments, and will not be repeated here. In addition, the term "and / or" is used to describe the relationship between related objects, indicating that three relationships may exist; for example, A and / or B can indicate: A exists alone, A and B exist simultaneously, or B exists alone, where A and B can be singular or plural. The character " / " generally indicates that the objects before and after it are in an "or" relationship.
[0078] With the development of electronic devices, they have become increasingly feature-rich. For example, most electronic devices today are equipped with cameras and have camera apps installed for taking photos and videos. Users can then use these apps to activate the camera and capture images. However, when the scene is poorly lit and there are moving objects within the camera's field of view, users will find that the photos are blurry to varying degrees. For instance, the movement of people, vehicles, and even the shaking of grass and trees can all cause blurry photos. Figure 1 The image shows a schematic diagram of a photograph of a rotating windmill. It can be seen that the outermost blades of the windmill are blurred in the photograph due to their rapid rotation. Figure 2 The image shows a schematic diagram of a photograph taken at a sports stadium. It can be seen that the people in the photo are blurred because they are moving. Additionally, vibrations from electronic devices can also cause blurry photos.
[0079] The above problem occurs because the motion of moving objects accumulates within a unit of camera exposure time, causing the photo to appear blurry. This can be understood as the moving objects within the shooting range changing position within a unit of exposure time. The photo records the accumulated information on the pixels during this time period, resulting in blurriness. The lower the camera's frame rate or the faster the moving object, the more pronounced the blurriness.
[0080] In related technologies, photographers with professional equipment can achieve better photo results by adjusting the aperture and exposure time of an SLR camera. However, for electronic devices with fixed cameras, the aperture in the camera usually cannot be adjusted. Even if it can be adjusted, it requires a specific sensor or more professional photography skills, which is not feasible for ordinary users.
[0081] With a fixed aperture, according to imaging principles, to capture a clearer image of a moving object, the exposure time needs to be reduced, i.e., the shutter speed needs to be increased. This reduces the accumulated motion within a unit of exposure time, resulting in a sharper image as the image records less of the object's motion changes. However, increasing the shutter speed reduces the image's brightness, negatively impacting the user's viewing experience. To further improve brightness, the ISO sensitivity needs to be increased, but this significantly increases image noise. Therefore, the result is an image with reduced motion blur but increased noise; no single operation can fundamentally solve both blur and noise issues simultaneously.
[0082] For electronic devices with fixed cameras, this application embodiment improves the photo-taking effect through software algorithms without the need to add additional hardware.
[0083] Besides the aforementioned issues where moving objects within the shooting range can cause blurry photos, shaky hands while holding the electronic device can also lead to blurry images. The image processing method provided in this application is applicable to situations including, but not limited to, those causing blurry photos.
[0084] This application provides an image processing method applicable to electronic devices with photographic capabilities, such as mobile phones, tablets, desktops, laptops, ultra-mobile personal computers (UMPCs), handheld computers, netbooks, personal digital assistants (PDAs), wearable electronic devices, and virtual display devices. This application does not limit the specific type of electronic device. The electronic device includes at least one camera and a display screen. The display screen shows a preview interface, which includes a first image. The first image is an image of the subject captured by the camera under initial exposure parameters, where the initial exposure parameters of the camera are a first shutter speed and a first ISO sensitivity.
[0085] The following embodiments of this application will take a mobile phone as an example. The image processing method provided in the embodiments of this application will be specifically described in conjunction with the user interface (UI) of the mobile phone.
[0086] As shown in Figure 3(a), the GUI displays the current output interface content 301 of the phone's screen display system, which is the phone's main interface. This interface content 301 displays multiple applications (Apps), such as file management, email, music, calculator, messages, contacts, phone, and camera. It should be understood that interface content 301 may also include other applications, and this application does not limit this.
[0087] The UI involved in this application's embodiments is the medium interface for interaction and information exchange between an application or operating system and the user. It realizes the conversion between the internal form of information and the form that the user can accept. The user interface of an application is the source code written in a specific computer language such as Java or Extensible Markup Language (XML). The interface source code is parsed and rendered on the terminal device, and finally presented as content that the user can recognize, such as images, text, audio and video files, and interface elements such as controls. Controls, also known as widgets, are the basic elements of the user interface. Typical controls include toolbars, menu bars, text boxes, buttons, and scrollbars. The attributes and content of the above interface elements are defined through tags or nodes, such as XML through... <textview> 、 <imgview> 、 <videoview>Nodes define the text type of interface elements. A node corresponds to a specific interface element or attribute. After parsing and rendering, the node is presented as the content visible to the user. Furthermore, many applications, such as hybrid applications, often contain web pages within their interfaces. A web page, also known as a webpage, can be understood as a special control embedded within an application interface. Web pages are source code written in a specific computer language, such as Hypertext Markup Language (HTML), Cascading Style Sheets (CSS), or JavaScript (JS). The webpage source code can be loaded and displayed as user-readable content by a browser or a webpage display component with browser-like functionality. The specific content contained in a webpage is also defined through tags or nodes in the webpage source code; for example, HTML defines content through tags or nodes. 、 、 <video> 、 <canvas>Used to define the elements and attributes of a webpage.
[0088] The most common form of user interface is the graphical user interface (GUI), which refers to a user interface related to computer operation displayed graphically. It can be an icon, window, control, or other interface element displayed on the screen of an electronic device. Controls can include visual interface elements such as icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, and widgets.
[0089] When the phone detects that the user has tapped the camera application icon 302 on the main screen, it can launch the camera application and display the GUI shown in Figure 3(b), which is the camera's shooting interface 303. The shooting interface 303 may include a viewfinder 304, an album icon 305, shooting controls 306, and camera rotation controls 307, etc.
[0090] The viewfinder is used to capture and display a first image of the shooting preview in real time. The shooting control 306 is used to take photos or videos. When the phone detects that the user has tapped the shooting control 306, the phone performs a photo capture operation and saves the photo; or, when the phone is in video recording mode, when the user taps the shooting control 306, the phone performs a video recording operation and saves the recorded video. The camera rotation control 307 is used to control the switching between the front and rear cameras. The album icon 305 is used for quick access to the photo album. When the phone detects that the user has tapped the album icon 305, photos or videos already taken can be displayed on the touchscreen.
[0091] As shown in Figure 3(c), the GUI displays photos taken without executing the image processing method provided in this application embodiment. It can be seen that when photographing a rotating windmill, the outermost blades of the windmill are blurred. Therefore, this application provides an image processing method that can capture clear photos when relative motion between the subject and the electronic device is detected.
[0092] As shown in Figure 3(d), the GUI displays photos taken during the execution of the image processing method provided in this application embodiment. It should be noted that Figures 3(d) and 3(c) were taken under the same conditions, with the windmill rotating at the same speed. It can be seen that the clarity of the outermost blades of the rotating windmill in Figure 3(d) is significantly improved compared to that in Figure 3(c). In the method of this application embodiment, the electronic device acquires multiple frames of images with the same brightness. These multiple frames include a second image with increased shutter speed and increased ISO, and a third image following the second image. It should be noted that the exposure parameters corresponding to the third image are the initial exposure parameters, and the shutter speed and ISO have not been changed. The multiple frames are then fused to obtain photo 308.
[0093] The above description, in conjunction with Figures 3(a), 3(b), and 3(d), illustrates the human-computer interaction embodiments in the image processing process provided by the present application. To better understand the image processing method provided by the present application, the specific implementation process and algorithm are described below from an implementation perspective.
[0094] Figure 4 This is a flowchart of an image processing method provided in an embodiment of this application, such as... Figure 4 As shown, this embodiment first acquires a preview stream and performs motion detection on it. By performing the motion detection step, it is determined whether there is relative motion between the subject and the electronic device. When there is relative motion between the subject and the electronic device, the degree of motion change is determined. Based on whether there is relative motion between the subject and the electronic device and the degree of motion change, the automatic exposure parameters are adjusted through automatic exposure control (AE control). This is described in detail below and will not be repeated here. The sensor converts the light signal acquired after adjusting the automatic exposure parameters into RAW data. The RAW data is input into the ISP (Image Signal Processing) module, where multi-frame fusion and noise reduction are implemented. Finally, the noise-reduced RAW data is converted into YUV format image data and then transferred to JPEG format image to obtain a high-resolution and low-noise photo.
[0095] Figure 5 This is a flowchart of an image processing method provided in an embodiment of this application. It should be noted that the image processing method in this embodiment is applicable to situations where the shooting environment is relatively dark. This is because when the shooting environment is dark, the shutter speed is automatically slowed down to ensure good image quality. However, the slower the shutter speed, the longer the exposure time per unit of the camera, resulting in a greater degree of motion accumulation and thus a greater impact on image sharpness. The method in this embodiment aims to solve the problem of image sharpness.
[0096] In the specific implementation process, the image processing method applied to an electronic device may include steps S401-S404:
[0097] S401. Determine whether there is relative motion between the photographed object and the electronic device.
[0098] Because there is relative motion between the subject and the electronic device, the subject will appear blurry when taking pictures. Therefore, it is necessary to process the image obtained under the condition of relative motion between the subject and the electronic device in subsequent steps to improve the clarity of the picture and reduce noise.
[0099] In some embodiments, the step of determining whether there is relative motion between the subject and the electronic device includes: acquiring a preview stream; and determining whether there is relative motion between the subject and the electronic device based on the preview stream.
[0100] Electronic devices activate their cameras via a camera app. The camera continuously captures first images, and the resulting camera data is called a preview stream. For example, when a user taps the camera app icon 302 to activate the camera, the camera continuously captures first images, generating a preview stream. The first image in the preview stream can be displayed through the viewfinder.
[0101] In some embodiments, the obtained preview stream can be downsampled, which reduces the computational load when using the downsampled preview stream to determine whether there is relative motion between the subject and the electronic device.
[0102] For example, downsampling can be done by 4x or 16x. It should be noted that downsampling is also called image downsampling or image reduction. For example, an image of size M*N is downsampled by a factor of s, resulting in a resolution image of size (M / s)*(N / s). Images in the preview stream processed using downsampling methods occupy less memory than images directly obtained from the camera at their original aspect ratio, thus reducing the computational load in subsequent steps.
[0103] In some embodiments, the step of determining whether there is relative motion between the subject and the electronic device based on the preview stream includes:
[0104] The preview stream includes at least two first images. Two adjacent frames of the first images are compared to determine the differences between them, ultimately determining whether there is relative motion between the subject and the electronic device. Specific steps include steps S4011-S4016, such as... Figure 6 As shown.
[0105] S4011. Determine whether there is a change between the first images of two adjacent frames in the preview stream.
[0106] In this embodiment, the relative motion between the subject and the electronic device is determined by the changes between the first images in the preview stream. This embodiment is not limited to the method in steps S4011-S4016 when determining whether there is relative motion between the subject and the electronic device; any method that can determine the presence of a moving object within the camera's field of view is acceptable. For example, a sensor can be used to determine whether a moving object exists within the camera's field of view, receiving signals from the sensor and determining whether there is relative motion between the subject and the electronic device based on these signals. The sensor can be built into the electronic device or connected externally.
[0107] In one embodiment, in order to accurately understand the changes between the first images in the preview stream, step S4011, the step of determining whether there are changes between two adjacent frames of the first images in the preview stream, includes S40111-S40116, such as... Figure 7 As shown.
[0108] S40111. Determine whether there are any changes between the pixels in the first images of the two frames.
[0109] In this embodiment of the application, the electronic device can determine whether there is a change between two adjacent first images by judging whether there is a change between corresponding pixels in two adjacent first images.
[0110] In one embodiment, step S40111, determining whether there has been a change between pixels in the two frames of the first image, includes steps S40111-1 to S40111-5, such as... Figure 8 As shown.
[0111] S40111-1. Convert the first images of two adjacent frames in the preview stream into grayscale images.
[0112] In this embodiment, the first image acquired from the camera is in YUV format. Converting the YUV format first image to grayscale facilitates subsequent comparison of pixel values between two frames of the first image. This embodiment does not limit the specific method for converting a YUV image to a grayscale image; any method that achieves the conversion is acceptable.
[0113] S40111-2. Take the absolute value of the difference between the gray values of each corresponding pixel in the two grayscale images to obtain the grayscale difference.
[0114] For example, the gray value of the top right pixel in the grayscale image corresponding to the first frame of a first image is 255, and the gray value of the top right pixel in the first frame of another first image adjacent to this first image is 100. At this time, the difference between the two gray values is calculated and the absolute value is taken, resulting in a gray value difference of 155.
[0115] S40111-3. Determine whether the grayscale difference is greater than the grayscale threshold.
[0116] In this embodiment, the grayscale threshold is a different grayscale threshold set for noise under different ISO sensitivities. The higher the ISO sensibility, the higher the grayscale threshold is set. Since the noise of the image is different under different ISO sensitivities, the higher the ISO sensibility, the greater the noise, and the lower the ISO sensibility, the lower the noise. Therefore, in order to avoid the noise affecting the result of determining whether to photograph the subject and whether the relative position of the electronic device has changed when the ISO sensibility is high, grayscale thresholds are set according to different ISO sensitivities.
[0117] S40111-4. If the grayscale difference is greater than the grayscale threshold, it is determined that there is a change between the pixels in the two frames of the first image.
[0118] When the grayscale difference is greater than the grayscale threshold, it means that the grayscale change of the corresponding pixels in the two adjacent first images has exceeded the change caused by noise, indicating that it is not caused by noise. At this time, it is determined that there is a change between the pixels in the two first images.
[0119] S40111-5. If the grayscale difference is not greater than the grayscale threshold, it is determined that there is no change between the pixels in the two frames of the first image.
[0120] If the grayscale difference is not greater than the grayscale threshold, it means that the grayscale change of the corresponding pixels in the first images of two adjacent frames is not significant. At this time, it is determined that there is no change between the pixels in the first images of the two frames.
[0121] S40112, Count the number of pixels that have changed.
[0122] In order to determine the changes between the first images in the preview stream, it is necessary to judge the changes between two adjacent first images in the preview stream one by one. In this embodiment, the changes between two first images are determined by the number of pixels that have changed.
[0123] For example, when a pixel is determined to have changed, a flag bit of 1 is output; when a pixel is determined to have not changed, a flag bit of 0 is output. The number of flag bits of 1 represents the number of pixels that have changed.
[0124] S40113. Calculate the percentage of pixels that have changed out of the total number of pixels in the first image.
[0125] It is understandable that the total number of pixels in two adjacent frames of the first image is the same, so the total number of pixels in the first image can be the total number of pixels in any frame of the first image. The pixel ratio is calculated by dividing the number of pixels that changed by the total number of pixels in the first image. For example, if both frames of the first image have 48 million pixels, and the number of pixels that changed in one frame is 3840, then the pixel ratio is 3840 / 4800 = 0.8.
[0126] For example, the number of flag bits 1 mentioned above can be used as the number of pixels that have changed, and the number of flag bits 0 can be used as the number of pixels that have not changed. The pixel ratio of the number of pixels that have changed to the total number of pixels in the first image can be calculated by using the number of flag bits 1 as the dividend and the sum of the number of flag bits 1 and the number of flag bits 0 as the divisor.
[0127] S40114. Determine whether the pixel ratio is greater than the preset pixel ratio.
[0128] Due to certain special circumstances, such as inherent limitations of the electronic device itself, the corresponding pixels in two adjacent frames of the first image may change. Therefore, this embodiment sets a preset pixel ratio, which can be set according to actual conditions. Comparing the pixel ratio with the preset pixel ratio can improve the error tolerance of the method in this embodiment, avoiding the misinterpretation of pixel changes caused by special circumstances as being due to relative motion between the photographed object and the electronic device.
[0129] S40115. If the pixel ratio is greater than the preset pixel ratio, then it is determined that there is a change between the two frames of the first image.
[0130] Since the first image is composed of multiple pixels, when the pixel ratio is high, it means that the number of pixels that have changed in the two frames of the first image is high. When it is greater than the preset pixel ratio, it is considered that there has been a change between the two frames of the first image.
[0131] S40116. If the pixel ratio is not greater than the preset pixel ratio, then it is determined that there has been no change between the two frames of the first image.
[0132] When the pixel ratio is not greater than the preset pixel ratio, it is considered that the change in the corresponding pixels of the two first images is due to some special circumstances, so it is considered that there is no change between the two first images.
[0133] S4012, Count the number of first images that have changed in the preview stream.
[0134] It should be noted that in this embodiment, when a change is determined between two frames of the first image, the number of first images that have changed is determined to be one. For example, when the preview stream includes five frames of the first image, including the first, second, third, fourth, and fifth frames of the first image arranged in the order of capture, determining whether there is a change between two adjacent frames of the first image includes determining whether there is a change between the first and second frames, between the second and third frames, between the third and fourth frames, and between the fourth and fifth frames. In this case, when the preview stream includes five frames of the first image, the maximum number of first images that have changed in the preview stream is four.
[0135] S4013. Calculate the ratio of the number of first images that have changed in the preview stream to the number of images that can change.
[0136] The variable first image does not refer to the total number of first images in the preview stream, but rather the total number of first images minus one. For example, if the preview stream includes five first images, then there are four variable first images. The image ratio is calculated by dividing the number of variable first images in the preview stream by the number of variable first images. For example, if there are three variable first images in the preview stream and four variable first images, then the image ratio is 3 / 4.
[0137] S4014. Determine whether the image ratio is greater than the preset image ratio.
[0138] In this embodiment, a preset image ratio can be set to improve the fault tolerance of the method. This preset image ratio can be set according to the actual situation.
[0139] S4015. If the image ratio is greater than the preset image ratio, then it is determined that there is relative motion between the photographed object and the electronic device.
[0140] S4016. If the image ratio is not greater than the preset image ratio, it is determined that there is no relative motion between the photographed object and the electronic device.
[0141] In this embodiment, the preset image ratio can be set according to actual needs and is not limited here. When the image ratio is greater than the preset image ratio, it indicates that the number of first images that have changed is relatively large, and there is relative motion between the subject and the electronic device. When the image ratio is not greater than the preset image ratio, it indicates that the number of first images that have changed is relatively small, and there is no relative motion between the subject and the electronic device.
[0142] S402. In some embodiments, if there is no relative motion between the subject and the electronic device, the image is acquired using the initial exposure parameters.
[0143] It should be noted that images are captured using initial exposure parameters when there is no relative motion between the subject and the electronic device.
[0144] S403. When there is relative motion between the subject and the electronic device, the electronic device generates a second image and at least one third image. The exposure parameters corresponding to the second image are first exposure parameters. The first exposure parameters include a second shutter speed and a second ISO. The second shutter speed is 1 / N of the first shutter speed, and the second ISO is N times the first ISO. The exposure parameters corresponding to the third image are the initial exposure parameters.
[0145] S404. Merge one frame of the second image and at least one frame of the third image into a fourth image.
[0146] It is worth noting that this embodiment requires ensuring that the second image and the third image have the same brightness. This is because, in order to increase the sharpness of the fourth image, this embodiment shortens the shutter speed of the second image, increasing the image sharpness, but at the same time, the image brightness decreases. To address the low brightness issue, this embodiment also increases the ISO, further increasing the brightness. The result is a second image with high sharpness but increased image noise. Then, to reduce the noise in the second image, the third image is fused with the second image, ultimately improving the noise in the fourth image. It is conceivable that if the brightness of multiple frames differs, noise cannot be accurately identified during the fusion of multiple images to obtain the fourth image. The difference in brightness might be mistaken for noise, affecting the final quality of the fourth image during noise processing.
[0147] In this embodiment, the image brightness is determined based on the shutter speed and ISO. To ensure that the second image has the same brightness as the third image taken using the initial exposure parameters, the second shutter speed is set to 1 / N of the first shutter speed, and the second ISO is set to N times the first ISO.
[0148] For example, the third image consists of three frames. The first shutter speed in the initial exposure parameters is 1 / 250, and the first ISO is 200. N is 2, so the second shutter speed corresponding to the second image is 1 / 500, and the second ISO is 400. The shutter speed corresponding to all three frames of the third image is 1 / 250, and the ISO is 200.
[0149] In some embodiments, when a user's shooting operation is received, for example, the user can shoot by clicking the shooting control 306. In response to the shooting operation, the electronic device generates a second image frame and at least one third image frame. The fourth image is the captured photograph.
[0150] Additionally, it should be noted that, in order to ensure the fourth image is as close as possible to the image corresponding to the moment the user takes the picture, this embodiment uses the first image acquired after the user's shooting operation as the second image, serving as the reference for obtaining the final photo. This second image is taken after adjusting the exposure parameters. This second image is then fused with the third image. Because the second image is used as the reference, the final photo is closest to the moment the user takes the picture, while also ensuring image clarity and low noise.
[0151] In this embodiment, the electronic device adjusts its exposure parameters before generating the second and third images. For example, as shown in Figure 3(a), the user can click the shooting control to adjust the exposure parameters of the electronic device in response to the shooting operation. When acquiring images, the exposure parameters corresponding to the second image are the adjusted exposure parameters. Except for the first frame of the multi-frame image acquisition, which is taken with the adjusted exposure parameters, the third image is obtained by taking the image with the camera's original exposure parameters.
[0152] In one embodiment, before the electronic device generates a second frame and at least one third frame, the method further includes: S4031-S4032, as follows: Figure 9 As shown.
[0153] S4031. Determine the degree of motion change between the subject and the electronic device. In this embodiment, before acquiring the second and third images, the exposure parameters are adjusted to the first exposure parameters. To more accurately adjust the exposure parameters and minimize noise while improving the clarity of the second image, the degree of motion change between the subject and the electronic device is first determined when adjusting the exposure parameters. This degree of motion change most closely approximates the motion of the subject corresponding to the acquisition of the second image.
[0154] The degree of motion change is calculated using the same method as the pixel ratio mentioned above; that is, the degree of motion change is the proportion of the number of pixels that have changed to the total number of pixels in the image. Optionally, the pixel ratio can be stored, and when a user's shooting operation is received, the stored pixel ratio of the two adjacent frames before the user's shooting operation can be directly obtained. Optionally, when a user's shooting operation is received, the pixel ratio is recalculated based on the two adjacent frames before the user's shooting operation. In one example, the step of determining the degree of motion change between the subject and the electronic device includes: obtaining two adjacent frames before generating the second and third images; determining whether the pixels in the two frames have changed; counting the number of pixels that have changed; and calculating the pixel ratio of the number of pixels that have changed to the total number of pixels in the image.
[0155] S4032. Determine the first exposure parameters corresponding to the second image based on the degree of motion change.
[0156] To adjust the exposure parameters of the electronic device, this embodiment pre-stores the degree of motion change and the corresponding exposure reduction factor N. The shutter speed and ISO are then re-determined using the exposure reduction factor N.
[0157] In some embodiments, the shutter speed and exposure time are directly proportional, with the exposure time replacing the shutter speed. The process of re-determining the exposure time and exposure ISO includes: dividing the original exposure time by the reduction factor to obtain the exposure time, and multiplying the original exposure ISO by the reduction factor to obtain the exposure ISO. For example, if the original exposure time is 1 / 30 and the original exposure ISO is 100, and the reduction factor is 2, then the adjusted exposure time is 1 / 60 and the exposure ISO is 200.
[0158] For example, Figure 10 The diagram illustrates the relationship between the degree of motion change and the reduction in exposure. Figure 10 In this configuration, when the motion change is 0, the exposure time is not reduced. When the motion change is between 0 and r1 (excluding 0 but including r1), the exposure is reduced by t1. When the motion change is between r1 and r2 (excluding r1 but including r2), the exposure is reduced by t2. When the motion change is between r2 and r3 (excluding r2 but including r3), the exposure is reduced by t3. When the motion change is greater than r3, the exposure time is not reduced. The values of t1, t2, t3, and r1, r2, r3 can be adapted to the noise level and the required motion sharpness.
[0159] It's important to understand that when the motion change in the first image of two adjacent frames is 0, it means there is no change in the first image of the two frames. Therefore, the exposure time and ISO are not re-determined, and the original camera exposure parameters are maintained. When the motion change is greater than r3, the motion change is too large. Similarly, the exposure time and ISO are not re-determined, and the original camera exposure parameters are maintained. This is because the excessive motion amplitude exceeds the tolerance range of inter-frame image registration, and the images cannot be registered and image fusion cannot be performed.
[0160] In some embodiments, in order to reduce the time for subsequent steps to fuse multiple frames of images while still allowing the user to see a high-resolution fourth image, the number of acquired multiple frames is set to four.
[0161] The first frame is the second image obtained after adjusting the exposure parameters, and the remaining three frames with unchanged exposure parameters are the third image. By adjusting the exposure parameters as described above, four images with consistent brightness are obtained.
[0162] In some embodiments, a frame of the second image and at least one frame of the third image are fused together to form a fourth image by noise reduction.
[0163] In one embodiment, the noise reduction method includes temporal noise reduction.
[0164] In some embodiments, the temporal denoising includes two steps: alignment and temporal fusion. In one example, the second image is used as the reference frame, and the third image is aligned to the reference frame. The alignment is illustrated by the following example: four frames are aligned, with the first frame as the reference frame, and the other three frames aligned to the reference frame. For example, in the first frame, the angle between the central axis of a specific object and the horizontal line is 5 degrees; in the second frame, it is 5.5 degrees; in the third frame, it is 6 degrees; and in the fourth frame, it is 6.5 degrees. The second, third, and fourth frames are then rotated by the corresponding angles to align with the specific object in the first frame. This alignment allows for better noise resolution before temporal fusion.
[0165] In some embodiments, registration operations can be performed on the second and third images based on the SURF (speed up robust features) extracted from the images to achieve the purpose of aligning multiple frames of images, and then temporal fusion can be performed on the registered images.
[0166] In some embodiments, the time-domain fusion step includes S4041-S4042, such as... Figure 11 As shown:
[0167] S4041. Based on the second image and the third image, determine the non-motion region of the third image.
[0168] In this embodiment of the application, there may be multiple third images. The multiple third images are compared with the second image respectively to determine the non-motion region of each third image.
[0169] In some embodiments, the step of determining the non-motion region of the third image based on the second image and the third image includes:
[0170] The grayscale difference is obtained by taking the absolute value of the difference between the grayscale values of each corresponding pixel in the second and third images; it is then determined whether the grayscale difference is greater than the motion grayscale threshold; if the grayscale difference is not greater than the motion grayscale threshold, the pixels in the third image are determined to be non-motion regions.
[0171] Since the non-motion regions are pixels that show little change when compared to the second and third images, their corresponding gray values are used as the gray values for fusion into the fourth image. For pixels with a gray-level difference greater than the motion gray-level threshold, these are identified as motion regions. Because the gray-level values of these motion regions change significantly and may be noise, they are discarded from the third image.
[0172] S4042. Merge the non-moving regions in the second image and the third image to obtain a fourth image.
[0173] For example, if there are three frames of third images, where a certain pixel in the first frame of the third image is a moving region, while the same pixel in the other two frames of the third image is a non-moving region, then the pixel in the third image that is identified as a non-moving region is fused with the corresponding pixel in the second image.
[0174] In some embodiments, the step of fusing the non-moving regions in the second image and the third image to obtain a fourth image includes: determining the grayscale value of each pixel in the fourth image based on the grayscale values of corresponding pixels in the non-moving regions of the second image and the third image. In one possible implementation, each image is assigned a weight value, and the grayscale value of the corresponding pixel in each image is multiplied by the weight of that image to determine the grayscale value of the pixel in the fourth image.
[0175] The temporal denoising method described herein can remove noise by utilizing the features of multiple frames of images. The temporal denoising method is not limited to the method disclosed in this application; other methods that can achieve the objectives of this application are also acceptable.
[0176] In one embodiment, to further enhance the denoising effect, the denoising method further includes: performing spatial denoising on the temporally denoised image. Spatial denoising removes noise from the features of a single-frame image. In this embodiment, during the process of fusing multiple frames to obtain a photograph, both temporal and spatial denoising steps are used sequentially, performing denoising processing in both the dimensions of multiple frames and single frames, resulting in minimal noise in the final photograph.
[0177] In one embodiment, the spatial noise reduction method includes the NLM method.
[0178] It should be noted that spatial domain noise reduction is an existing technology, currently including methods such as BM3D, NLM, neural networks, and wavelet neural networks. In this embodiment, the NLM method in the RAW domain is used for spatial noise processing, mainly utilizing the similarity between adjacent blocks within a large region for weighted noise removal. Spatial domain noise reduction can be performed in the RAW domain or the YUV domain; the RAW domain noise pattern is relatively uniform, resulting in better processing performance.
[0179] In one embodiment, the fusion of multiple frames of images includes artificial intelligence (AI) processing.
[0180] Artificial intelligence (AI) technology can automatically process multiple frames of images, merge them, and achieve the effect of noise removal.
[0181] The image processing method in this embodiment is simple and does not involve complex operations.
[0182] It is understood that, in order to achieve the above-mentioned functions, electronic devices include hardware and / or software modules that perform the respective functions. Based on the algorithmic steps of the examples described in the embodiments disclosed herein, this application can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by 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.
[0183] 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.
[0184] When dividing each function into modules according to its corresponding function. Figure 12 A schematic diagram of a possible composition of the electronic device 1000 involved in the above embodiments is shown, such as... Figure 12 As shown, the electronic device 1200 may include: a judgment unit 1201, a generation unit 1202, and a fusion unit 1203.
[0185] The determination unit 1201 can be used to support the electronic device 1200 in performing the above-mentioned steps S401, and / or other processes used in the technology described herein.
[0186] The generation unit 1202 can be used to support the electronic device 1200 in performing the above-described steps S402, etc., and / or other processes used in the technology described herein.
[0187] The fusion unit 1203 can be used to support the electronic device 1200 in performing the above-described steps S404, and / or other processes for the technology described herein.
[0188] It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0189] The electronic device provided in this embodiment is used to perform the above-described motion scene photography method, and therefore can achieve the same effect as the above-described implementation method.
[0190] When using integrated units, the electronic device may include a processing module, a storage module, and a communication module. The processing module can be used to control and manage the actions of the electronic device; for example, it can support the electronic device in executing the steps performed by the first acquisition unit 1001, the second acquisition unit 1002, and the fusion unit 1003. The storage module can support the electronic device in executing stored program code and data. The communication module can support communication between the electronic device and other devices.
[0191] The processing module can be a processor or a controller. It can implement or execute various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. The processor can also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc. The storage module can be a memory. The communication module can specifically be a radio frequency circuit, a Bluetooth chip, a Wi-Fi chip, or other devices that interact with other electronic devices.
[0192] This embodiment also provides a computer storage medium storing computer instructions. When the computer instructions are executed on an electronic device, the electronic device performs the aforementioned method steps to implement the motion scene photography method described in the above embodiment.
[0193] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned related steps to realize the motion scene photography method described in the above embodiment.
[0194] In addition, embodiments of this application also provide an apparatus, which may specifically be a chip, component or module. The apparatus may include a connected processor and a memory; wherein the memory is used to store computer execution instructions. When the apparatus is running, the processor may execute the computer execution instructions stored in the memory to cause the chip to execute the motion scene photography method in the above method embodiments.
[0195] In this embodiment, the electronic device, computer storage medium, computer program product or chip are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding method provided above, and will not be repeated here.
[0196] Through the above description of the embodiments, those skilled in the art will 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.
[0197] 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 apparatus, 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 apparatuses or units may be electrical, mechanical, or other forms.
[0198] 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.
[0199] 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.
[0200] 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 solutions of the embodiments of this application, in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, 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 of 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.
[0201] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.< / canvas> < / video> < / videoview> < / imgview> < / textview>
Claims
1. An image processing method, characterized by, The method is applied to an electronic device including at least one camera and a display screen, and the method includes: The display screen displays a preview interface including a first image, the first image being an image of a photographed object collected by the camera under initial exposure parameters, the initial exposure parameters of the camera being a first shutter speed and a first sensitivity; determining whether there is relative motion between the photographed object and the electronic device; when there is relative motion between the photographed object and the electronic device, determining a degree of motion change between the photographed object and the electronic device; determining a value of N according to the degree of motion change and a corresponding relationship between the degree of motion change and the exposure reduction multiple N; the electronic device generates one frame of second image and at least one frame of third image, the second image corresponding to the first exposure parameters, the first exposure parameters including a second shutter speed and a second sensitivity, the second shutter speed being 1 / N of the first shutter speed, and the second sensitivity being N times of the first sensitivity, the third image corresponding to the initial exposure parameters, so that the brightness of the second image is the same as the brightness of the third image; fusing one frame of the second image and at least one frame of the third image into a fourth image.
2. The method of claim 1, wherein, The step of determining whether there is relative motion between the photographed object and the electronic device includes: obtaining a preview stream; determining whether there is relative motion between the photographed object and the electronic device according to the preview stream.
3. The method of claim 2, wherein, The step of determining whether there is relative motion between the photographed object and the electronic device according to the preview stream includes: the preview stream includes at least two first images; determining whether there is a change between two adjacent frames of the first images in the preview stream; counting the number of the first images that have changed in the preview stream; calculating an image ratio of the number of the first images that have changed in the preview stream to the number of the first images that can change; determining whether the image ratio is greater than a preset image ratio; if the image ratio is greater than the preset image ratio, it is determined that there is relative motion between the photographed object and the electronic device; if the image ratio is not greater than the preset image ratio, it is determined that there is no relative motion between the photographed object and the electronic device.
4. The method of claim 3, wherein, The step of determining whether there is a change between two adjacent frames of the first images in the preview stream includes: determining whether there is a change between pixel points in the two frames of the first images; counting the number of the pixel points that have changed; calculating a pixel point ratio of the number of the pixel points that have changed to the total number of the pixel points in the first image; determining whether the pixel point ratio is greater than a preset pixel point ratio; if the pixel point ratio is greater than the preset pixel point ratio, it is determined that there is a change between the two frames of the first images; if the pixel point ratio is not greater than the preset pixel point ratio, it is determined that there is no change between the two frames of the first images.
5. The method of claim 4, wherein, The step of determining whether there is a change between pixel points in the two frames of the first images includes: converting two adjacent frames of the first images in the preview stream into grayscale images; obtaining a gray scale difference by taking an absolute value of a difference between gray scale values of each corresponding pixel point in the two gray scale images; determining whether the gray scale difference is greater than a gray scale threshold value; if the gray scale difference is greater than the gray scale threshold value, determining that a change occurs between the pixel points in the two frames of the first images; if the gray scale difference is not greater than the gray scale threshold value, determining that no change occurs between the pixel points in the two frames of the first images.
6. The method of claim 1, wherein, fusing the second image and at least one of the third images into a fourth image by noise reduction.
7. The method of claim 6, wherein, The method of noise reduction comprises time domain noise reduction.
8. The method of claim 7, wherein, The step of time domain noise reduction comprises sequentially executed alignment and time domain fusion steps.
9. The method of claim 8, wherein, The step of alignment comprises aligning the third image to the second image as a reference frame.
10. The method of claim 8, wherein, The step of alignment comprises extracting SURF features from the images and performing a registration operation on the second image and the third image.
11. The method of claim 8, wherein, The step of time domain fusion comprises: determining a non-motion region of the third image according to the second image and the third image; fusing the non-motion region in the second image and the third image to obtain the fourth image.
12. The method of claim 11, wherein, The step of determining the non-motion region of the third image according to the second image and the third image comprises: obtaining a gray scale difference by taking an absolute value of a difference between gray scale values of each corresponding pixel point in the second image and the third image; determining whether the gray scale difference is greater than a motion gray scale threshold value; if the gray scale difference is not greater than the motion gray scale threshold value, determining that the pixel in the third image is a non-motion region.
13. The method of claim 11, wherein, The step of fusing the non-motion region in the second image and the third image to obtain the fourth image comprises determining a gray scale value of each pixel in the fourth image according to gray scale values of corresponding pixels in the non-motion region of the second image and the third image.
14. The method of claim 7, wherein, The method of noise reduction further comprises performing spatial domain noise reduction on the image after time domain noise reduction.
15. The method of claim 14, wherein, The method of spatial domain noise reduction comprises NLM method.
16. The method of claim 1, wherein, The step of determining the degree of motion change between the object and the electronic device comprises: obtaining two adjacent images before the second image and the third image are generated; determining whether a change occurs between pixel points in the two images; counting the number of changed pixel points; calculating a pixel point proportion of the number of changed pixel points in the total number of image pixel points.
17. An electronic device, comprising: The electronic device comprises: a processor and a memory, the memory being used to store at least one instruction, the instruction being loaded and executed by the processor to implement the method of any one of claims 1-16.
18. A computer-readable storage medium, characterized in that, a computer program, when the computer program is run on a computer, causing the computer to execute the method of any one of claims 1-16.
19. A computer program product, characterised in that, The computer program product, when run on a computer, causes the computer to execute the method of any one of claims 1-16.
Citation Information
Patent Citations
Shooting method and mobile terminal
CN107395997A
Image processing method and device, storage medium and electronic equipment
CN110445988A
Image capture method and device
CN111418201A