Image processing method and device, storage medium and electronic device

By identifying and correcting the moving area mask, the ghosting problem caused by moving objects in the prior art is solved, and high-quality fusion of high-dynamic range images is achieved.

CN113379615BActive Publication Date: 2025-02-14YUANLI TUXIN (CHONGQING) TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110450312.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-25
Publication Date
2025-02-14
Estimated Expiration
2041-04-25

AI Technical Summary

Technical Problem

When acquiring high dynamic range images, the prior art fails to effectively process moving objects, resulting in ghosting and reducing image quality.

Method used

By acquiring multiple frames of images to be processed with multiple exposures, determining the reference image and the image to be fused, identifying the moving area mask, and modifying the alternative fusion area mask to obtain the fusion area mask, and then performing image fusion.

Benefits of technology

Effectively avoid ghosting and improve image detail and quality, especially in scenes containing moving objects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113379615B_ABST
    Figure CN113379615B_ABST
Patent Text Reader

Abstract

The present disclosure provides an image processing method, an image processing device, a storage medium and an electronic device, and relates to the field of image processing technology. A fusion region mask is obtained by correcting an alternative fusion region mask through a motion region mask, so that the pixel values ​​of pixels corresponding to the motion region in the high dynamic range image obtained by image fusion according to the fusion region mask only come from the reference image, and are not fused with frames of other exposures. In this way, ghost images will not be generated in the high dynamic range image due to the fusion of pixels corresponding to the motion region, thereby increasing image details and improving image quality.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] As part of the camera function in the terminal, high dynamic range imaging works by taking multiple images of different exposures in the same scene and then synthesizing the multiple exposures to enhance the dynamic range of the photo, increase the layering of the photo, and reflect more details.

[0003] In the related technology, Poisson fusion is a fusion method based on multiple images with different exposures, which can greatly improve the image quality of photos in different scenes and greatly enhance the user's experience of the camera's photo-taking function in different scenes.

[0004] In the above method, when Poisson fusion is used to obtain high dynamic range images, since there are moving objects in the captured images, the moving targets are not taken into account when Poisson fusion is performed, which will cause ghosting, poor image details and reduced image quality. Summary of the invention

[0005] The present disclosure provides an image processing method, an image processing device, a computer-readable storage medium, and an electronic device, thereby overcoming the problem of low image quality at least to a certain extent.

[0006] According to one aspect of the present disclosure, there is provided an image processing method, including: acquiring multiple frames of to-be-processed images at multiple exposure levels, wherein the to-be-processed images at each exposure level are multiple frames shot continuously; determining a reference image at a first exposure level and an image to-be-fused at a second exposure level based on the multiple frames of to-be-processed images, wherein the second exposure level is an exposure level different from the first exposure level among the multiple exposure levels; determining a motion region mask based on the multiple frames of to-be-processed images; determining, based on the images to-be-fused, an alternative fusion region mask corresponding one-to-one to each of the second exposure levels; correcting the alternative fusion region mask based on the motion region mask to obtain a fusion region mask; and performing image fusion on the image to-be-fused and the reference image based on the fusion region mask to obtain a high dynamic range image.

[0007] In an exemplary embodiment of the present disclosure, a reference image of a first exposure and an image to be fused of a second exposure are determined based on the multiple frames of images to be processed, including: performing multi-frame denoising on the multiple frames of images to be processed at the first exposure to obtain the reference image; performing multi-frame denoising on the multiple frames of images to be processed at the second exposure to obtain the image to be fused at the second exposure.

[0008] In an exemplary embodiment of the present disclosure, a motion region mask is determined based on the multiple frames of images to be processed, including: performing multi-frame frame difference on the multiple frames of images to be processed at each second exposure level, and obtaining a first motion region mask corresponding to each second exposure level according to the result of the multi-frame frame difference; performing multi-frame frame difference on the images to be fused at different second exposure levels, and obtaining a second motion region mask corresponding to each second exposure level according to the result of the multi-frame frame difference; and correcting the alternative fusion region mask based on the motion region mask to obtain a fusion region mask, including: correcting the alternative fusion region mask based on the first motion region mask corresponding to each second exposure level and the second motion region mask corresponding to each second exposure level to obtain a fusion region mask.

[0009] In an exemplary embodiment of the present disclosure, the multi-frame frame difference is a difference between adjacent frames, and the adjacent frames are frames with adjacent shooting times or adjacent exposure levels.

[0010] In an exemplary embodiment of the present disclosure, a first motion area mask corresponding to each second exposure level is obtained based on the results of multi-frame frame differences, including: taking the union of the results of multi-frame frame differences to obtain the first motion area mask corresponding to each second exposure level; and / or, a second motion area mask corresponding to each second exposure level is obtained based on the results of multi-frame frame differences, including: using the results of multi-frame frame differences as the second motion area mask corresponding to each second exposure level.

[0011] In an exemplary embodiment of the present disclosure, the alternative fusion region mask is corrected according to the motion region mask to obtain a fusion region mask, including: performing a first correction on the second motion region mask according to the first motion region mask to obtain a third motion region mask; performing a second correction on the alternative fusion region mask according to the third motion region mask to obtain a fusion region mask.

[0012] In an exemplary embodiment of the present disclosure, a first correction is made to the second motion area mask according to the first motion area mask to obtain a third motion area mask, including: for each second exposure level, a first correction is made to the second motion area mask corresponding to the second exposure level according to the first motion area mask corresponding to the second exposure level to obtain a third motion area mask corresponding to the second exposure level.

[0013] In an exemplary embodiment of the present disclosure, a first correction is performed on the second motion area mask corresponding to the second exposure level based on the first motion area mask corresponding to the second exposure level, including: taking the intersection of the first motion area mask corresponding to the second exposure level and the second motion area mask corresponding to the second exposure level or performing morphological processing after taking the intersection.

[0014] In an exemplary embodiment of the present disclosure, a second correction is made to the alternative fusion area mask according to the third motion area mask to obtain a fusion area mask, including: for each second exposure level, a second correction is made to the alternative fusion area mask corresponding to the second exposure level according to the third motion area mask corresponding to the second exposure level to obtain the fusion area mask corresponding to the second exposure level.

[0015] In an exemplary embodiment of the present disclosure, the fusion area mask is used to identify the fusion area and the non-fusion area, and the pixels of the third motion area mask and the alternative fusion area mask correspond one-to-one to form a pixel pair; the alternative fusion area mask corresponding to the second exposure is corrected according to the third motion area mask corresponding to the second exposure, including: if the pixel value of the pixel from the alternative fusion area mask in the first pixel pair indicates that the pixel of the alternative fusion area belongs to the alternative fusion area, and the pixel value of the pixel from the third motion area mask in the first pixel pair indicates that the pixel of the third motion area belongs to the third motion area, then the pixel value of the pixel of the alternative fusion area mask in the first pixel pair is modified so that it indicates that the pixel of the alternative fusion area belongs to the non-alternative fusion area.

[0016] In an exemplary embodiment of the present disclosure, a second correction is made to the alternative fusion area mask according to the third motion area mask to obtain a fusion area mask, including: for each second exposure level, a second correction is made to the alternative fusion area mask corresponding to the second exposure level according to the fourth motion area mask to obtain the fusion area mask corresponding to the second exposure level, and the motion area of ​​the fourth motion area mask is the union of the motion areas in the third motion area masks corresponding to each second exposure level.

[0017] In an exemplary embodiment of the present disclosure, the alternative fusion region mask is corrected according to the motion region mask to obtain the fusion region mask, including: correcting the alternative fusion region mask according to the second motion region mask to obtain a corrected alternative fusion region mask; correcting the corrected alternative fusion region mask according to the first motion region mask to obtain a fusion region mask.

[0018] According to one aspect of the present disclosure, there is provided an image processing device, comprising: an image acquisition module, for acquiring a plurality of frames of to-be-processed images at a plurality of exposure levels, wherein the to-be-processed images at each exposure level are a plurality of frames taken continuously; an image determination module, for determining, based on the plurality of frames of to-be-processed images, a reference image at a first exposure level and an image to-be-fused at a second exposure level, wherein the second exposure level is an exposure level different from the first exposure level among the plurality of exposure levels; a fusion region mask determination module, for determining a motion region mask based on the plurality of frames of to-be-processed images; determining, based on the images to be fused, candidate fusion region masks corresponding one-to-one to each of the second exposure levels; correcting the candidate fusion region masks based on the motion region masks to obtain a fusion region mask; and an image fusion module, for performing image fusion on the image to be fused and the reference image based on the fusion region masks to obtain a high dynamic range image.

[0019] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image processing method as described in any one of the above is implemented.

[0020] According to one aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above-mentioned image processing methods by executing the executable instructions.

[0021] 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

[0022] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:

[0023] Figure 1 A schematic diagram of fusion in related art is shown;

[0024] Figure 2 A schematic diagram showing an application scenario to which the image processing method of the embodiment of the present disclosure can be applied;

[0025] Figure 3 A schematic diagram showing a flow chart of an image processing method in an embodiment of the present disclosure is shown;

[0026] Figure 4A comparative schematic diagram of the fusion effect in the embodiment of the present disclosure is shown;

[0027] Figure 5 A block diagram schematically shows an image processing apparatus in an exemplary embodiment of the present disclosure;

[0028] Figure 6 A schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0029] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0030] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.

[0031] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the steps. For example, some steps may be decomposed, while some steps may be combined or partially combined, so the actual execution order may change according to the actual situation. In addition, all the terms "first" and "second" below are only for the purpose of distinction and should not be used as limitations of the present disclosure.

[0032] In the super night scene shooting scene, the high dynamic range image obtained by Poisson fusion has better details in overexposure and dark areas than the single image taken. The comparison between the single image taken and the high dynamic range image fused by Poisson is shown in the figure below. Figure 1 As shown in . Figure 1 It can be seen that Figure 1 Compared with the single image of the normal shooting shown in Figure A Figure 1 The high dynamic range image obtained by Poisson fusion, as shown in Figure B, has some areas overexposed, and the dark areas are darker and the details are not obvious. The high dynamic range image obtained by Poisson fusion has better details in both bright and dark areas. However, the high dynamic range image has serious ghosting in the area of ​​the car (marked area), making the image details poor, while there is no ghosting problem when taking a single image.

[0033] In order to solve the above technical problems, Figure 2 A schematic diagram is shown of an application scenario to which the image processing method or image processing device of an embodiment of the present disclosure can be applied.

[0034] This image processing method can be applied to photo shooting scenes. Figure 2 As shown in , it can be specifically applied to the process of shooting the target object 202 using the terminal 201. Among them, the terminal 201 can be various types of clients that can be used for shooting, for example, various smart phones, tablet computers, desktop computers, vehicle-mounted devices, wearable devices, etc. that can be used to collect images or videos and can display images or videos. The target object 202 can be any type of object to be photographed in various scenes, and the target object can be in motion. In addition, the target object can also include other types of objects to be photographed, such as people, animals, or scenery, etc. Specifically, the camera on the terminal 201 or the shooting application can be used to capture the image of the target object 202. The camera on the terminal can include multiple camera modules, and any one or more of the camera modules can be called to capture the image of the target object. The image processing method of the present invention can be used to process the captured image, obtain a high dynamic range image, and display the high dynamic range image to the user.

[0035] It should be noted that the image processing method provided in the embodiment of the present disclosure can be completely executed by a server or a terminal. Accordingly, the image processing device can be set in a terminal or a server, and the terminal is used as an example for explanation.

[0036] In an embodiment of the present disclosure, an image processing method is provided. Figure 3 A schematic flow chart of the image processing method is shown schematically in FIG. Next, the image processing method in the embodiment of the present disclosure is described in detail with reference to the accompanying drawings.

[0037] In step S310, a plurality of frames of to-be-processed images at a plurality of exposure levels are acquired, wherein the to-be-processed images at each exposure level are a plurality of frames captured continuously.

[0038] In one example, in response to the user's operation of opening a shooting application (for example, the user clicks on a control on a smartphone to trigger the shooting application or triggers the shooting application through voice commands, gesture commands, etc.), the terminal's camera module (front camera or rear camera) can be called to capture the target object to obtain multiple frames of images to be processed at multiple exposures, and the viewing angles of the multiple frames of images to be processed are basically the same (that is, the multiple frames of images to be processed capture the same scene in the physical world), and the images to be processed at each exposure are multiple frames captured continuously. For example, 4 images are captured at an exposure of EV+2 at time t1-t4, 4 images are captured at an exposure of EV0 at time t5-t8, 4 images are captured at an exposure of EV-2 at time t9-t12, and 4 images are captured at an exposure of EV-4 at time t13-t16. t1-t16 are continuous moments, and the images to be processed captured at t1-t16 are P1-P16 respectively. It is understandable that the brightness of the multiple frames of images to be processed at each exposure level is substantially the same, and the brightness of the multiple frames of images to be processed at different exposure levels is different.

[0039] In step S320, a reference image of a first exposure and an image to be fused of a second exposure are determined based on the multiple frames of images to be processed, where the second exposure is an exposure different from the first exposure among the multiple exposures.

[0040] In one example, one of the multiple frames of images to be processed can be selected as a reference image, for example, P5 is selected as a reference image. An image to be processed other than the reference image and with a different exposure from the reference image is selected as an image to be fused. It is understandable that when images are fused, one image at each exposure is usually fused, so one frame can be selected from multiple frames of images to be processed at each exposure in multiple exposures as an image to be fused, thereby obtaining multiple frames of images to be fused. For example, P1, P9, and P15 are selected as images to be fused.

[0041] In one example, multi-frame noise reduction can be performed on multiple frames of images to be processed at a first exposure to obtain the reference image; multi-frame noise reduction can be performed on multiple frames of images to be processed at a second exposure to obtain an image to be fused at a second exposure, thereby obtaining multiple frames of images to be fused corresponding to multiple second exposures.

[0042] Multi-frame noise reduction means that in night scenes or dark light environments, the camera will collect multiple / multi-frame photos or images when pressing the shutter to imaging, find different pixels with noise properties at different frame numbers, and obtain a relatively clean and pure night scene or dark light photo through weighted synthesis. That is, when shooting night scenes or dark light environments, the number and position of noise points in multiple frames will be calculated and screened, and the positions of noisy places will be replaced with frames without noise. After repeated weighting and replacement, a noise-reduced image is obtained. When multi-frame noise reduction is performed, the increase in the number of frames will enhance the multi-frame noise reduction effect, but it will also be selected based on the performance of the mobile phone platform. In the super night scene mode, since the image in the YUV domain still has a certain degree of noise even after the front-end ISP (Image Signal Processor) noise reduction, based on this, multi-frame noise reduction can be performed on multiple images to be processed with the same exposure, and the images after multi-frame noise reduction are used as reference images and images to be fused.

[0043] It is understandable that after obtaining multiple frames of images to be processed at each exposure, before determining the reference image and the image to be fused, in order to avoid the difference in the field of view of the multiple frames of images to be processed caused by the shaking and rotation of the terminal, the images to be processed can be aligned first. After the alignment operation, multiple aligned images with different exposures are obtained. The alignment operation here can be pixel alignment, which can be processed by any suitable alignment algorithm. Specifically, feature points can be determined for the two images to be processed, the connection between the feature points corresponding to the two images to be processed can be established, and the equation can be solved to obtain a rotation matrix to translate or rotate the pixels of the two images to be processed, thereby aligning the spatial positions of the two images to be processed. Afterwards, the reference image and the image to be fused are selected from the aligned images to be processed, or multi-frame denoising is performed on the aligned images to be processed, and the reference image and the image to be fused are determined from the multi-frame denoised images.

[0044] In step S330, a motion region mask is determined according to the multiple frames of images to be processed.

[0045] The motion region mask is used to identify the motion region and the non-motion region. For example, the mask is a binary image composed of 0 and 1, where pixels corresponding to pixel value 1 constitute the motion region, and pixels corresponding to pixel value 0 constitute the non-motion region.

[0046] For terminals with low computing performance, the frame difference method can be used to detect motion areas. For example, the area where the difference in pixel values ​​between two frames is greater than a threshold is used as the motion area. However, the detection of motion areas by the frame difference method is easily affected by the brightness of the image. When the frame difference method is used to detect motion areas on images with different brightness between two frames, the detection results will be inaccurate. This is because when there is a difference in brightness between two frames of images, the difference in pixel values ​​greater than the threshold does not mean that the pixel belongs to the motion area. It may also be caused by the different brightness of the pixel in the two frames of images.

[0047] If the motion region mask is determined using N frames of images with different exposures, the above-mentioned motion region misjudgment problem will occur. In the embodiment of the present application, the motion region mask is determined based on multiple frames of images to be processed, and the multiple frames of images to be processed include multiple frames of images taken continuously at each exposure. When determining the motion region mask, the motion region misjudgment caused by the natural difference in brightness of multiple exposure images can be eliminated, making the determination of the motion region mask more accurate.

[0048] In step S340, a candidate fusion region mask corresponding to each of the second exposure levels is determined according to the images to be fused.

[0049] The candidate fusion area mask is used to identify pixels in each image to be fused that are candidate fusion areas and pixels that are not candidate fusion areas. There is a part with proper exposure in each second exposure level. By fusing the part with proper exposure in each second exposure level (i.e., the candidate fusion area) with the reference image, a high dynamic range image with details preserved can be obtained.

[0050] Continuing with the previous example, the exposure of the reference image is EV0, and the second exposures are EV+2, EV-2, and EV-4. Objects with higher brightness in the scene are appropriately exposed in the image to be fused corresponding to EV-4, and not too bright. Objects with lower brightness in the scene are appropriately exposed in the image to be fused corresponding to EV+2, and not too dark. The positions of appropriately exposed pixels (such as non-overexposed areas with exposure EV+2, and highlight areas with exposure EV-2 and EV-4) in the images to be fused with the second exposures of EV-4, EV-2, and EV+2 can be represented by the corresponding candidate fusion area masks.

[0051] Specifically, the candidate fusion region mask corresponding to each second exposure can be determined according to the preset pixel value range corresponding to the second exposure. The preset pixel value ranges corresponding to different exposures can be different, and can be set according to actual needs. For example, the pixel value ranges corresponding to EV+2, EV-2, and EV-4 can be set to be greater than or equal to the pixel value thresholds T1, T2, and T3, respectively, and the pixel values ​​of each pixel of the image to be fused of EV+2, EV-2, and EV-4 are compared with T1, T2, and T3, respectively. For the candidate fusion region mask corresponding to EV+2, if the pixel value of a certain pixel in the image to be fused corresponding to EV+2 is greater than or equal to T1, the pixel value of the corresponding pixel in the candidate fusion region mask is set to 1, and if the pixel value of a certain pixel in the image to be fused corresponding to EV+2 is less than T1, the pixel value of the corresponding pixel in the candidate fusion region mask is set to 0, thereby obtaining the candidate fusion region mask R1 corresponding to EV+2. Similarly, R2 corresponding to EV-2 and R3 corresponding to EV-4 can be obtained.

[0052] In step S350, the candidate fusion region mask is corrected according to the motion region mask to obtain a fusion region mask.

[0053] The candidate fusion region mask identifies the appropriately exposed parts of each image to be fused. However, the appropriately exposed parts may contain moving objects. Since the positions of moving objects may be different in each image to be fused, if the candidate fusion region containing moving objects is fused, ghost images will appear in the high dynamic image. Therefore, it is necessary to correct the candidate fusion region mask according to the moving region mask, that is, to remove the part containing the moving object from the candidate fusion region mask to obtain the fusion region mask. In this way, the pixel values ​​corresponding to the pixels in the moving region in the high dynamic range image obtained by image fusion according to the fusion region mask only come from the reference image, and are not fused with frames of other exposures. Therefore, ghost images will not be generated in the high dynamic range image due to the fusion of pixels corresponding to the moving region.

[0054] In step S360, the image to be fused is fused with the reference image according to the fusion region mask to obtain a high dynamic range image.

[0055] In the embodiment of the present application, the image fusion method can be Poisson fusion or other methods. When the image fusion method is Poisson fusion, the image to be processed with standard exposure can be used as a reference frame, that is, the background image in Poisson fusion, and the part of the image to be fused corresponding to the fusion area mask is fused with the background image of the reference frame, and the equation is solved to obtain a high dynamic range image.

[0056] In the technical solution provided by the embodiment of the present disclosure, the alternative fusion area mask is corrected by the motion area mask to obtain the fusion area mask, so that the pixel values ​​corresponding to the pixels in the high dynamic range image obtained by image fusion according to the fusion area mask only come from the reference image, and are not fused with frames of other exposures. In this way, ghosting will not be generated in the high dynamic range image due to the fusion of pixels corresponding to the motion area, thereby increasing image details and improving image quality. In addition, the motion area mask is obtained based on multiple frames of images with multiple exposures, and each exposure contains multiple frames of continuously shot images. When determining the motion area mask, it is possible to eliminate the misjudgment of the motion area caused by the natural difference in brightness of multiple exposure images, so that the determination of the motion area mask is more accurate. The technical solution provided by the embodiment of the present disclosure is particularly suitable for terminals with low computing power, such as low-end mobile phone platforms, and can achieve better high dynamic, noise reduction, and ghost removal effects in terms of computing power without causing freezes.

[0057] In another embodiment of the present application, step S330 includes the following steps:

[0058] S410: Perform multi-frame frame difference on each of the multiple frames of to-be-processed images at the second exposure level, and obtain a first motion region mask corresponding to each of the second exposure levels according to the result of the multi-frame frame difference.

[0059] For multiple frames of images to be processed at a second exposure, their exposure is the same and the image brightness is theoretically the same. The above-mentioned problem of misjudgment of the moving area due to different brightness does not exist. Therefore, compared with the motion mask determined according to images with different exposures, the motion mask obtained by performing multi-frame frame difference based on multiple frames of images to be processed at the same exposure is only affected by noise and is more accurate.

[0060] The basic principle of the frame difference method is to use pixel-based time difference between two or three adjacent frames of the image sequence through binarization to extract the motion area in the image. First, the corresponding pixel values ​​of adjacent frame images are subtracted to obtain a difference image, and then the difference image is binarized. When the ambient brightness does not change much, if the corresponding pixel value change is less than the threshold, it can be considered as a non-motion area; if the pixel value change of the image area is greater than the threshold, it can be considered that this is caused by a moving object in the image, and these areas are marked as motion areas (for example, the pixel value of the area is set to 1), so that a motion area mask can be obtained.

[0061] Specifically, for each second exposure level, the first motion region mask of the second exposure level may be calculated based on adjacent frames (ie, images with adjacent shooting times) of images to be processed at the second exposure level.

[0062] Continuing with the previous example, frame differences can be made for P1, P2, P2, P3, P3, P4 to obtain three frame difference results, and then calculations are performed based on the three frame difference results to obtain the first motion region mask K1 corresponding to EV+2.

[0063] In one example, the calculation is performed based on the results of the three frame differences, and the results of the three frame differences can be obtained by taking the intersection or union. It can be understood that when taking the intersection, it means that when a region is identified as a motion region according to the results of the three frame differences, the region is identified as a motion region; when taking the union, it means that when a region is identified as a motion region according to any of the three frame difference results, the region is identified as a motion region.

[0064] By the same method, the first motion mask K3 corresponding to EV-2 and K4 corresponding to EV-4 can be obtained. Of course, it is also possible to perform multi-frame frame difference on the image to be processed at the first exposure level, and obtain the first motion region mask corresponding to the first exposure level according to the result of the multi-frame frame difference, that is, obtain the first motion mask K2 corresponding to EV0.

[0065] S420: Perform multi-frame frame difference on the to-be-fused images of different second exposure levels, and obtain a second motion region mask corresponding to each second exposure level according to the result of the multi-frame frame difference.

[0066] Since the brightness of the images to be processed at different exposures is different, the brightness of the images to be processed at different exposures can be matched to adjust the different brightnesses to be consistent, thereby avoiding the problem of misjudgment of the motion area caused by inconsistent brightness.

[0067] After brightness matching, multiple frame differences can be performed on adjacent images to be fused at different second exposures, and the multiple frame difference results can be directly used as the second motion region mask or the multiple frame difference results can be used as the second motion region mask after post-processing such as morphological processing. The adjacent images to be fused can be images to be fused at adjacent exposure levels, and the multiple frame difference results can be used as the second motion region mask corresponding to one of the two adjacent exposure levels.

[0068] For example, frame difference is performed on the images to be fused at exposure level EV+2 and exposure level EV0, frame difference is performed on the images to be fused at exposure level EV0 and exposure level EV-2, and frame difference is performed on the images to be fused at exposure level EV-2 and exposure level EV-4. Based on this, the second motion region mask corresponding to the images to be processed at different second exposure levels is obtained. Continuing with the previous example, it can be obtained that the exposure level EV+2 corresponds to the second motion region mask M1 (obtained by performing frame difference on the images to be fused at exposure level EV+2 and exposure level EV0), the exposure level EV-2 corresponds to the second motion region mask M2 (obtained by performing frame difference on the images to be fused at exposure level EV0 and exposure level EV-2), and the exposure level EV-4 corresponds to the second motion region mask M3 (obtained by performing frame difference on the images to be fused at exposure level EV-2 and exposure level EV-4).

[0069] The method of obtaining the motion area through frame difference will have problems due to the difference in brightness between images with different exposures. Even if the brightness consistency matching algorithm is processed, it is still difficult to achieve complete brightness matching. The position where the brightness fails to match will be misjudged as the motion area, which will cause ghosting after fusion (it can be seen that the second motion area mask is relatively rough). Due to the existence of the misjudged area, the final high dynamic range image result will be deteriorated, and it is usually reflected in the overexposed area.

[0070] Correspondingly, step S350 includes: correcting the candidate blending region mask according to the first motion region mask corresponding to each second exposure level and the second motion region mask corresponding to each second exposure level.

[0071] In this step, the candidate fusion region mask is corrected according to the relatively accurate first motion region and the relatively rough second motion mask, so that the part containing the moving object can be removed more accurately from the candidate fusion region mask, thereby avoiding ghosting without affecting the high dynamic range image effect.

[0072] In another embodiment of the present application, step S350 includes:

[0073] Step S510: Perform a first correction on the second motion region mask according to the first motion region mask to obtain a third motion region mask.

[0074] Specifically, for each second exposure level, the second motion region mask corresponding to the second exposure level is first corrected according to the first motion region mask corresponding to the second exposure level to obtain a third motion region mask corresponding to the second exposure level. The first correction may be an intersection or a morphological process after taking the intersection.

[0075] The second motion region mask may contain an area that is misjudged as a motion region. By intersecting the area with the first motion region mask and taking only the intersection area as the motion region, the misjudged area can be removed from the motion region.

[0076] Step S520: Perform a second correction on the candidate fusion region mask according to the third motion region mask to obtain a fusion region mask.

[0077] Step S520 can be performed in two ways:

[0078] Method 1: For each second exposure level, a second correction is performed on the candidate fusion region mask corresponding to the second exposure level according to the third motion region mask corresponding to the second exposure level to obtain the fusion region mask corresponding to the second exposure level.

[0079] Specifically, the fusion area mask is used to identify the fusion area and the non-fusion area, and the pixels of the third motion area mask and the alternative fusion area mask correspond one-to-one to form a pixel pair; performing a second correction on the alternative fusion area mask corresponding to the second exposure according to the third motion area mask corresponding to the second exposure includes: if the pixel value of the pixel from the alternative fusion area mask in the first pixel pair indicates that the pixel of the alternative fusion area belongs to the alternative fusion area, and the pixel value of the pixel from the third motion area mask in the first pixel pair indicates that the pixel of the third motion area belongs to the third motion area, then modifying the pixel value of the pixel of the alternative fusion area mask in the first pixel pair so that it indicates that the pixel of the alternative fusion area belongs to the non-alternative fusion area.

[0080] In this method, if a pixel is considered to be a motion area in a third motion area mask, the pixel in the image to be fused corresponding to the third motion area mask does not participate in the fusion, thereby minimizing the probability of ghosting while ensuring high dynamic quality.

[0081] Method 2: For each second exposure level, a second correction is made to the alternative fusion area mask corresponding to the second exposure level according to the fourth motion area mask to obtain the fusion area mask corresponding to the second exposure level, and the motion area of ​​the fourth motion area mask is the union of the motion areas in the third motion area masks corresponding to each second exposure level.

[0082] Specifically, the fusion area mask is used to identify the fusion area and the non-fusion area, and the pixels of the fourth motion area mask and the alternative fusion area mask correspond one-to-one to form a pixel pair; performing a second correction on the alternative fusion area mask corresponding to the second exposure according to the fourth motion area mask includes: if the pixel value of the pixel from the alternative fusion area mask in the first pixel pair indicates that the pixel of the alternative fusion area belongs to the alternative fusion area, and the pixel value of the pixel from the fourth motion area mask in the first pixel pair indicates that the pixel of the fourth motion area belongs to the fourth motion area, then modifying the pixel value of the pixel of the alternative fusion area mask in the first pixel pair so that it indicates that the pixel of the alternative fusion area belongs to the non-alternative fusion area.

[0083] In this method, if a pixel is considered as a motion area in any third motion area mask, the pixel does not participate in the fusion, which can greatly reduce the probability of ghosting, but is more likely to affect the high dynamic quality.

[0084] In another embodiment of the present application, step S350 includes:

[0085] S610: Correcting the candidate fusion region mask according to the second motion region mask to obtain a corrected candidate fusion region mask;

[0086] In one example, for each second exposure, the candidate fusion region mask corresponding to the second exposure is corrected according to the second motion region mask corresponding to the second exposure, so as to obtain the corrected candidate fusion region mask corresponding to the second exposure. The correction can achieve the following effect: if a pixel belongs to the candidate fusion region but does not belong to the second motion region, then in the corrected candidate fusion region mask, the pixel belongs to the candidate fusion region; if a pixel belongs to the candidate fusion region but belongs to the second motion region, then in the corrected candidate fusion region mask, the pixel does not belong to the candidate fusion region; if a pixel belongs to the non-alternative fusion region, then in the corrected candidate fusion region mask, the pixel does not belong to the alternative fusion region. In this embodiment, if a pixel is considered to be a motion region in a second motion region mask, the pixel of the image to be fused corresponding to the second motion region mask does not participate in the fusion, so that the probability of ghosting can be minimized while ensuring high dynamic quality.

[0087] In another example, for each second exposure, the candidate fusion region mask corresponding to the second exposure is corrected according to the fifth motion region mask to obtain a corrected candidate fusion region mask corresponding to the second exposure. The motion region of the fifth motion region mask is the union of the motion regions in the second motion region masks corresponding to each second exposure. The correction can achieve the following effect: if a pixel belongs to the candidate fusion region but does not belong to the fifth motion region, then in the corrected candidate fusion region mask, the pixel belongs to the candidate fusion region; if a pixel belongs to the candidate fusion region and belongs to the fifth motion region, then in the corrected candidate fusion region mask, the pixel does not belong to the candidate fusion region; if a pixel belongs to the non-alternative fusion region, then in the corrected candidate fusion region mask, the pixel does not belong to the candidate fusion region. In this embodiment, if a pixel is considered to be a motion region in any second motion region mask, the pixel does not participate in the fusion, which can greatly reduce the probability of ghosting, but is more likely to affect the high dynamic quality.

[0088] S620: Correct the corrected candidate fusion region mask according to the first motion region mask to obtain a fusion region mask.

[0089] In this step, for each second exposure level, the corrected candidate fusion region mask corresponding to the second exposure level is corrected according to the first motion region mask corresponding to the second exposure level to obtain the fusion region mask corresponding to the second exposure level.

[0090] In this embodiment, the candidate fusion region mask is firstly “roughly trimmed” using the second motion region mask, and then the corrected candidate fusion region mask is “finely trimmed” using the first motion region mask, so that an accurate fusion region mask can be obtained.

[0091] A specific embodiment of the image processing method disclosed in the present invention is given below.

[0092] Step S1, obtaining images to be processed captured at time t1-t16 at four exposure levels of EV+2, EV0, EV-2, and EV-4, wherein four images are captured at each exposure level.

[0093] Step S2, perform multi-frame noise reduction on four images taken at each exposure level to obtain four noise-reduced images at four exposure levels. Select the noise-reduced image corresponding to EV0 as the reference image, and the other noise-reduced images as the images to be fused.

[0094] Step S3, exposure EV+2 corresponds to the images to be processed taken at time t1, t2, t3, and t4, and multiple frame differences are performed on adjacent frames of the images to be processed, and the results of the multiple frame differences are taken as a union to obtain the first motion region mask K1 corresponding to the exposure. Exposure EV0 corresponds to the images to be processed taken at time t5, t6, t7, and t8, and multiple frame differences are performed on adjacent frames of the images to be processed, and the results of the multiple frame differences are taken as a union to obtain the first motion region mask K2 corresponding to the exposure. Similarly, the first motion region mask K3 corresponding to the exposure EV-2 and the first motion region mask K4 corresponding to the exposure EV-4 are obtained.

[0095] Step S4, performing frame difference on the denoised images with exposure level EV+2 and exposure level EV0 to obtain a second motion area mask M1 corresponding to EV+2, performing frame difference on the denoised images with exposure level EV0 and exposure level EV-2 to obtain a second motion area mask M2 corresponding to EV-2, performing frame difference on the denoised images with exposure level EV-2 and exposure level EV-4 to obtain a second motion area mask M3 corresponding to EV-4.

[0096] Step S5, for exposure EV+2, the corresponding preset threshold T1 is used to obtain the alternative fusion area mask R1, for exposure EV-2, the corresponding preset threshold T2 is used to obtain the alternative fusion area mask R2, and for exposure EV-4, the corresponding preset threshold T3 is used to obtain the alternative fusion area mask R3.

[0097] Step S6, use K1 to correct M1, and then use M1 to correct R1, to obtain the fusion mask N1 corresponding to EV+2, use K3 to correct M2, and then use M2 to correct R2, to obtain the fusion mask N2 corresponding to EV-2, use K4 to correct M3, and then use M3 to correct R3, to obtain the fusion mask N3 corresponding to EV-4.

[0098] Step S7, using N1, N2, N3, Poisson fusion is performed on the to-be-fused images and the reference images corresponding to EV+2, EV-2, and EV-4 to obtain a high dynamic image.

[0099] Figure 4 The comparison diagram of the fusion effect is schematically shown in FIG. Figure 4 As shown in Figure A, there is a ghost area in the original Poisson fusion, and the image quality of the ghost area is poor. Figure 4 As shown in Figure B, the high dynamic range effect of the improved algorithm is basically the same as the original Poisson fusion, but it has a better effect on ghost areas (such as car movement areas), improves image details and improves image quality.

[0100] It should be noted that although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.

[0101] Figure 5 FIG. 1 schematically shows a block diagram of an image processing apparatus according to an exemplary embodiment of the present disclosure. Figure 5 As shown, the image processing device according to an exemplary embodiment of the present disclosure may include the following modules:

[0102] The image acquisition module 501 is used to acquire multiple frames of to-be-processed images at multiple exposure levels, wherein the to-be-processed images at each exposure level are multiple frames taken continuously;

[0103] An image determination module 502 is configured to determine, based on the multiple frames of images to be processed, a reference image at a first exposure level and an image to be fused at a second exposure level, where the second exposure level is an exposure level different from the first exposure level among the multiple exposure levels;

[0104] The fusion region mask determination module 503 is used to determine the motion region mask according to the multiple frames of images to be processed; determine the candidate fusion region mask corresponding to each of the second exposures according to the images to be fused; and correct the candidate fusion region mask according to the motion region mask to obtain the fusion region mask;

[0105] The image fusion module 504 is used to fuse the image to be fused with the reference image according to the fusion region mask to obtain a high dynamic range image.

[0106] For other exemplary embodiments of the image processing device of the present disclosure, please refer to the embodiments of the image processing method of the present disclosure. Since the various functional modules of the image processing device of the present disclosure embodiment are the same as those in the above-mentioned image processing method embodiment, they will not be described again here.

[0107] In an embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0108] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or a combination of hardware and software, which may be collectively referred to herein as "circuits", "modules" or "systems".

[0109] Refer to the following Figure 6 The electronic device 600 according to this embodiment of the present disclosure is described. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.

[0110] like Figure 6 As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include, but are not limited to: the at least one processing unit 610, the at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.

[0111] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 66 can perform the following steps: Figure 3 Follow the steps shown in .

[0112] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 6201 and / or a cache memory unit 6202 , and may further include a read-only memory unit (ROM) 6203 .

[0113] The storage unit 620 may also include a program / utility 6204 having a set (at least one) of program modules 6205, such program modules 6205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.

[0114] Bus 630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, a graphics acceleration interface, a processing unit, or a local bus using any of a variety of bus architectures.

[0115] The electronic device 600 may also communicate with one or more external devices 700 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, etc.

[0116] In an embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible implementations, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary implementations of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0117] According to the program product for implementing the above method in the embodiment of the present disclosure, it can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present disclosure is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.

[0118] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0119] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0120] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.

[0121] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).

[0122] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the embodiment of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.

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

[0124] 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. An image processing method, characterized in that: include: Acquire multiple frames of to-be-processed images at multiple exposure levels, wherein the to-be-processed images at each exposure level are multiple frames captured continuously; Determine, according to the multiple frames of images to be processed, a reference image at a first exposure level and an image to be fused at a second exposure level, wherein the second exposure level is an exposure level among the multiple exposure levels that is different from the first exposure level; Determining a motion region mask according to the multiple frames of images to be processed; Determine, according to the to-be-fused images, a candidate fusion region mask corresponding one-to-one to each of the second exposure levels; Correcting the candidate fusion region mask according to the motion region mask to obtain a fusion region mask; According to the fusion region mask, the image to be fused is fused with the reference image to obtain a high dynamic range image; Wherein, determining the motion region mask according to the multiple frames of images to be processed includes: Performing multi-frame frame difference on multiple frames of images to be processed at each second exposure, and obtaining a first motion region mask corresponding to each second exposure according to the result of the multi-frame frame difference; performing multi-frame frame difference on images to be fused at different second exposures, and obtaining a second motion region mask corresponding to each second exposure according to the result of the multi-frame frame difference; Correcting the candidate fusion region mask according to the motion region mask to obtain the fusion region mask includes: The candidate blending region mask is corrected according to the first motion region mask corresponding to each second exposure level and the second motion region mask corresponding to each second exposure level to obtain the blending region mask; or, Performing a first correction on the second motion region mask according to the first motion region mask to obtain a third motion region mask; performing a second correction on the candidate fusion region mask according to the third motion region mask to obtain a fusion region mask; or, The candidate fusion region mask is corrected according to the second motion region mask to obtain a corrected candidate fusion region mask; and the corrected candidate fusion region mask is corrected according to the first motion region mask to obtain a fusion region mask.

2. The image processing method according to claim 1, characterized in that: Determining a reference image at a first exposure level and an image to be fused at a second exposure level according to the plurality of frames of images to be processed includes: Perform multi-frame noise reduction on the multiple frames of to-be-processed images at the first exposure level to obtain the reference image; Multi-frame noise reduction is performed on the multiple frames of images to be processed at the second exposure level to obtain an image to be fused at the second exposure level.

3. The image processing method according to claim 1, characterized in that: The multi-frame frame difference is the difference between adjacent frames, and the adjacent frames are frames with adjacent shooting time or adjacent exposure levels.

4. The image processing method according to claim 1 or 3, characterized in that: Obtaining a first motion region mask corresponding to each second exposure level according to the result of the multi-frame frame difference, including: Taking the union of the results of multiple frame differences, obtaining the first motion area mask corresponding to each second exposure level; and / or obtaining the second motion area mask corresponding to each second exposure level based on the results of multiple frame differences, including: using the results of multiple frame differences as the second motion area mask corresponding to each second exposure level.

5. The image processing method according to claim 1, characterized in that: Performing a first correction on the second motion region mask according to the first motion region mask to obtain a third motion region mask, comprising: For each second exposure level, a first correction is performed on the second motion region mask corresponding to the second exposure level according to the first motion region mask corresponding to the second exposure level to obtain a third motion region mask corresponding to the second exposure level.

6. The image processing method according to claim 5, characterized in that: Performing a first correction on the second motion region mask corresponding to the second exposure level according to the first motion region mask corresponding to the second exposure level, comprising: The first motion region mask corresponding to the second exposure level and the second motion region mask corresponding to the second exposure level are intersected or morphologically processed after the intersection.

7. The image processing method according to claim 1 or any one of claims 5 to 6, characterized in that: Performing a second correction on the candidate fusion region mask according to the third motion region mask to obtain a fusion region mask, including: For each second exposure level, a second correction is performed on the candidate fusion region mask corresponding to the second exposure level according to the third motion region mask corresponding to the second exposure level to obtain the fusion region mask corresponding to the second exposure level.

8. The image processing method according to claim 7, characterized in that: The fusion region mask is used to identify the fusion region and the non-fusion region, and the pixels of the third motion region mask and the candidate fusion region mask correspond one to one to form a pixel pair; Correcting the candidate blending region mask corresponding to the second exposure according to the third motion region mask corresponding to the second exposure includes: If the pixel value of the pixel from the alternative fusion area mask in the first pixel pair indicates that the pixel of the alternative fusion area belongs to the alternative fusion area, and the pixel value of the pixel from the third motion area mask in the first pixel pair indicates that the pixel of the third motion area belongs to the third motion area, then the pixel value of the pixel of the alternative fusion area mask in the first pixel pair is modified so that it indicates that the pixel of the alternative fusion area belongs to the non-alternative fusion area.

9. The image processing method according to claim 1 or any one of claims 5 to 6, characterized in that: Performing a second correction on the candidate fusion region mask according to the third motion region mask to obtain a fusion region mask, including: For each second exposure level, a second correction is performed on the alternative fusion area mask corresponding to the second exposure level according to the fourth motion area mask to obtain the fusion area mask corresponding to the second exposure level, and the motion area of ​​the fourth motion area mask is the union of the motion areas in the third motion area masks corresponding to each second exposure level.

10. An image processing device, characterized in that: include: An image acquisition module is used to acquire multiple frames of images to be processed at multiple exposure levels, wherein the images to be processed at each exposure level are multiple frames taken continuously; An image determination module, configured to determine, based on the multiple frames of images to be processed, a reference image at a first exposure level and an image to be fused at a second exposure level, wherein the second exposure level is an exposure level different from the first exposure level among the multiple exposure levels; A fusion region mask determination module is used to determine a motion region mask according to the multiple frames of images to be processed; determine a candidate fusion region mask corresponding to each of the second exposures according to the images to be fused; and correct the candidate fusion region mask according to the motion region mask to obtain a fusion region mask; An image fusion module, used for fusing the image to be fused with the reference image according to the fusion region mask to obtain a high dynamic range image; Wherein, determining the motion region mask according to the multiple frames of images to be processed includes: Performing multi-frame frame difference on multiple frames of images to be processed at each second exposure, and obtaining a first motion region mask corresponding to each second exposure according to the result of the multi-frame frame difference; performing multi-frame frame difference on images to be fused at different second exposures, and obtaining a second motion region mask corresponding to each second exposure according to the result of the multi-frame frame difference; Correcting the candidate fusion region mask according to the motion region mask to obtain the fusion region mask includes: The candidate blending region mask is corrected according to the first motion region mask corresponding to each second exposure level and the second motion region mask corresponding to each second exposure level to obtain the blending region mask; or, Performing a first correction on the second motion region mask according to the first motion region mask to obtain a third motion region mask; performing a second correction on the candidate fusion region mask according to the third motion region mask to obtain a fusion region mask; or, The candidate fusion region mask is corrected according to the second motion region mask to obtain a corrected candidate fusion region mask; and the corrected candidate fusion region mask is corrected according to the first motion region mask to obtain a fusion region mask.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the image processing method according to any one of claims 1 to 10 is implemented.

12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to perform the image processing method described in any one of claims 1-10 by executing the executable instructions.

Citation Information

Patent Citations

  • System and method for multi-frame temporal de-noising using image alignment

    US20150262341A1

  • System and method for compositing high dynamic range images

    US20200267300A1