Stroboscopic Image Processing Method, Apparatus, Electronic Device, and Readable Storage Medium

Through high and low frequency image separation and target mask filtering processing, the problems of ribbon phenomenon under strobe light and the sharpness of shooting moving objects are solved, and the adaptive noise reduction destrobe effect is achieved to maintain image quality.

CN115082350BActive Publication Date: 2025-07-04VIVO MOBILE COMM CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210796573.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-06
Publication Date
2025-07-04
Estimated Expiration
2042-07-06

AI Technical Summary

Technical Problem

The prior art is difficult to effectively remove the ribbon phenomenon when shooting in a strobe light environment. At the same time, when shooting moving objects, the shutter time cannot take into account the clarity and ribbon removal effect, resulting in image noise exposure and image quality loss.

Method used

By separating high and low frequency images, the color bands in the low frequency images are filtered using the target mask to enhance the RAW domain value of the banding area, and superimpose it with the high frequency images to reduce noise exposure and image quality loss.

Benefits of technology

It realizes the clarity of non-banding areas while removing the ribbon, and reduces noise exposure in the banding areas, achieving the effect of adaptive noise reduction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082350B_ABST
    Figure CN115082350B_ABST
Patent Text Reader

Abstract

The present application discloses a stroboscopic image processing method, apparatus, electronic device, and readable storage medium, belonging to the technical field of image processing. The method includes obtaining a first image captured under a stroboscopic light source, where the first image is an original RAW domain image; separating the first image into a high-frequency image and a low-frequency image to obtain a first high-frequency image and a first low-frequency image; determining a target mask according to the first low-frequency image, where the mask value in the target mask is negatively correlated with the brightness and the degree of color band of the region corresponding to the mask value in the first low-frequency image; filtering the color band in the first low-frequency image according to the target mask to obtain a second low-frequency image, where the RAW domain value of the second low-frequency image in a first region is larger than the RAW domain value of the second low-frequency image in a second region, the first region and the second region correspond, and both include the region where the color band is located and do not include the region where the dark area is located; and superimposing the second low-frequency image and the first high-frequency image to obtain an output image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the technical field of image processing, and particularly relates to a stroboscopic image processing method, apparatus, electronic device, and readable storage medium. Background Art

[0002] In the related art, in a shooting environment affected by stroboscopic light, it is easy to shoot stroboscopic pictures, that is, black and white stripes appear in the pictures.

[0003] To overcome this problem, in the related art, the flash frequency of the current stroboscopic light can be estimated through hardware, and by setting the shutter time to 1 or 2 times the stroboscopic period, the banding phenomenon that appears in the captured pictures can be avoided.

[0004] However, when shooting a moving object, it is necessary to increase the shutter speed to improve the clarity of the captured image, and the shutter time used to overcome the banding phenomenon that appears in the captured pictures cannot meet the shutter time for shooting a moving object. When the moving speed of the moving object is too fast, the moving object in the image will be blurred, and the clear shooting requirement for a fast moving object cannot be met.

[0005] In addition, in the related art, a deep learning-based RAW domain image processing scheme can also be adopted to perform banding elimination processing on the entire image. In this scheme, banding elimination is performed on the entire image. However, since the banding stripe area has a relatively low brightness, its noise is relatively large. If banding elimination is performed on the entire image, it is easy for the noise in the low-brightness area after banding elimination to be exposed and the original image quality to be lost.

[0006] In summary, the performance of the methods for removing stroboscopic screens in the related art is poor. Summary of the Invention

[0007] The purpose of the embodiments of this application is to provide a stroboscopic image processing method, apparatus, electronic device, and readable storage medium, which can reduce the noise exposure in the low-brightness area and reduce the loss of the original image quality during the process of removing banding stripes in the image, thereby having a good debanding effect.

[0008] In a first aspect, the embodiments of this application provide a stroboscopic image processing method, which includes:

[0009] Obtain a first image captured under a stroboscopic light source, where the first image includes color bands, and the first image is an original RAW domain image;

[0010] Separate the first image into a first high-frequency image and a first low-frequency image;

[0011] Determine a target mask according to the first low-frequency image, where the mask value in the target mask is negatively correlated with the brightness and the color band degree of the region corresponding to the mask value in the first low-frequency image;

[0012] Filter the color band in the first low-frequency image according to the target mask to obtain a second low-frequency image, where the RAW domain value in the second low-frequency image in a first region is larger than the RAW domain value in the second region in the first low-frequency image, the first region includes the region where the color band is located and does not include the region where the dark area is located, the dark area is a region where the brightness value is less than a preset brightness threshold, and the first region corresponds to the second region;

[0013] Superimpose the second low-frequency image and the first high-frequency image to obtain an output image.

[0014] In a second aspect, an embodiment of the present application provides a stroboscopic image processing device, and the device includes:

[0015] An acquisition module, configured to acquire a first image obtained by shooting under a stroboscopic light source, the first image includes a color band, and the first image is an original RAW domain image;

[0016] A first processing module, configured to separate the first image into a first high-frequency image and a first low-frequency image;

[0017] A determination module, configured to determine a target mask according to the first low-frequency image, where the mask value in the target mask is negatively correlated with the brightness and the color band degree of the region corresponding to the mask value in the first low-frequency image;

[0018] A second processing module, configured to filter the color band in the first low-frequency image according to the target mask to obtain a second low-frequency image, where the RAW domain value in the second low-frequency image in a first region is larger than the RAW domain value in the second region in the first low-frequency image, the first region includes the region where the color band is located and does not include the region where the dark area is located, the dark area is a region where the brightness value is less than a preset brightness threshold, and the first region corresponds to the second region;

[0019] A third processing module, configured to superimpose the second low-frequency image and the first high-frequency image to obtain an output image.

[0020] In a third aspect, an embodiment of the present application provides an electronic device, and the electronic device includes a processor and a memory, the memory stores a program or instruction that can run on the processor, and when the program or instruction is executed by the processor, the steps of the method described in the first aspect are implemented.

[0021] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instructions are stored, and when the program or instructions are executed by a processor, the steps of the method described in the first aspect are implemented.

[0022] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor, and the processor is configured to run a program or instructions to implement the method described in the first aspect.

[0023] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0024] In an embodiment of the present application, when a first image with a color band is captured under a stroboscopic light source, the image can be divided into a high-frequency image and a low-frequency image, and the color band in the first low-frequency image is filtered based on a target mask. This filtering process can be understood as a process of removing color bands / stroboscopic stripes in the color band (banding) area (i.e., the area where banding is located) in the first low-frequency image, that is, a debanding process. During this debanding process, by adjusting the mask value of the target mask, the debanding intensity for the black area and shadow area of the original image itself can be reduced, thereby reducing the noise exposure to the black area and shadow area of the original image itself during the debanding process and reducing the loss of the original image quality. In addition, since the RAW domain value of the banding area is increased during the debanding process, the RAW domain value of the banding area (i.e., the first area) in the second low-frequency image relatively increases, that is, the RAW domain value of the banding area in the high-frequency image relatively decreases. In this way, when the second low-frequency image with the increased RAW domain value of the banding area is superimposed with the high-frequency image with the unchanged RAW domain value of the banding area, the proportion of the high-frequency image in the banding area will be reduced. Furthermore, the finally obtained output image can maintain the clarity of the non-banding area through the high-frequency image and maintain the debanding effect of the banding area through the debanded low-frequency image, thereby realizing the change of the ratio between high-frequency and low-frequency information according to the banding intensity and achieving the purpose of adaptive noise reduction. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 is a flowchart of a stroboscopic image processing method provided by an embodiment of the present application;

[0026] Figure 2 It is a schematic diagram of the data processing process of a stroboscopic image processing method provided by an embodiment of the present application;

[0027] Figure 3 It is a schematic diagram of the processing process of the average RAW image;

[0028] Figure 4 It is a schematic diagram of the structure of a preset color band recognition model;

[0029] Figure 5 It is a flowchart of another stroboscopic image processing method provided by an embodiment of the present application;

[0030] Figure 6 It is a schematic diagram of the structure of a stroboscopic image processing device provided by an embodiment of the present application;

[0031] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application;

[0032] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners

[0033] Next, the technical solutions in the embodiments of the present application will be clearly described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art belong to the scope of protection of the present application.

[0034] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, rather than to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present application can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. generally belong to the same category, and the number of objects is not limited. For example, the first object can be one or multiple. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / " generally represents an "or" relationship between the associated objects before and after.

[0035] Next, in conjunction with the accompanying drawings, the stroboscopic image processing method, device, electronic device, and readable storage medium provided by the embodiments of the present application will be described in detail through specific embodiments and their application scenarios.

[0036] Please refer to Figure 1, the stroboscopic image processing method provided by the embodiments of the present application may be executed by an electronic device, such as a mobile phone or a camera, etc. Alternatively, the execution subject may be a tablet computer, a notebook computer, a handheld computer, an in-vehicle electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. It may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0037] As Figure 1 shown, the stroboscopic image processing method provided by the embodiments of the present application may include the following steps:

[0038] Step 101: Obtain a first image captured under a stroboscopic light source. The first image includes color bands, and the first image is an original RAW domain image.

[0039] In this embodiment, the above first image may include one image or at least two images. Among them, when the first image includes at least two images, at least one of them is an image with color bands that need to be removed. When the first image includes one image, the image is an image with color bands, and the stroboscopic image processing method provided by the embodiments of the present application is used to remove the color bands in the image.

[0040] Step 102: Separate the first image into a first high-frequency image and a first low-frequency image.

[0041] Among them, the first low-frequency image can be understood as the partial image content with a lower clarity in the first image, and the first high-frequency image can be the partial image content with a higher clarity in the first image.

[0042] Optionally, the separating the first image into a first high-frequency image and a first low-frequency image includes:

[0043] Perform mean filtering on the first image to obtain a first low-frequency image;

[0044] Perform image removal processing on the first image based on the first low-frequency image to obtain a first high-frequency image.

[0045] In this embodiment, the above-mentioned first low-frequency image is obtained by performing mean filtering on the first image (RAW domain image). For example, perform mean filtering with a kernel size of 5×5 on the first image to obtain the first low-frequency image, which can be a single-channel image in the RAW domain. And the above-mentioned first high-frequency image is the RAW domain image obtained by subtracting the first low-frequency image from the first image.

[0046] In implementation, the ratio of the above-mentioned first low-frequency image to the first high-frequency image can be 1:1, 1:2, or 2:1, etc., and no specific limitation is made here.

[0047] Step 103: Determine a target mask according to the first low-frequency image, where the mask value in the target mask is negatively correlated with the brightness and the banding degree of the corresponding area in the first low-frequency image.

[0048] In implementation, the dimension of the target mask can be the same as that of the first low-frequency image. Each mask value in the target mask can correspond to a pixel in the first low-frequency image. At this time, the area corresponding to the mask value in the target mask in the first low-frequency image can be the pixel in the first low-frequency image corresponding to the mask value in the target mask.

[0049] Of course, the dimension of the target mask can also be different from that of the first low-frequency image. At this time, the area corresponding to the mask value in the target mask in the first low-frequency image can be at least one pixel or a part of a pixel in the first low-frequency image corresponding to the mask value in the target mask, and no specific limitation is made here.

[0050] In one embodiment, an image without banding can be obtained by shooting at the shutter frequency corresponding to the flash frequency of the stroboscopic light source, and then this image is compared with the image with banding to obtain the banding area and the banding degree corresponding to each pixel position in the banding area. In addition, according to the black level value in the first low-frequency image, the dark area (i.e., the area where the brightness is less than or equal to the preset brightness threshold) in the first low-frequency image and the brightness corresponding to each pixel position in the dark area can be determined. In this way, the target mask can be determined jointly according to this dark area and the banding area, so that the mask value in the target mask is negatively correlated with the brightness of the corresponding area and negatively correlated with the banding degree of the corresponding area. In this way, during the process of removing stroboscopic using the target mask, the purpose of adaptive noise reduction and reducing the degree of stroboscopic removal in the dark area can be achieved, improving the image quality of the processed image and avoiding the problem of excessive stroboscopic elimination.

[0051] Of course, in practical applications, the banding regions and / or dark regions in an image with banding can also be obtained through other means. For example, the banding regions and / or dark regions in an image with banding can be analyzed and obtained through an AI network model, which is not specifically limited herein.

[0052] Step 104: Filter the color bands in the first low-frequency image according to the target mask to obtain a second low-frequency image, where the RAW domain value of the second low-frequency image in the first region is greater than the RAW domain value of the first low-frequency image in the second region. The first region includes the region where the color bands are located and does not include the region where the dark regions are located. The dark region is a region where the luminance value is less than a preset luminance threshold, and the first region corresponds to the second region.

[0053] In implementation, the above first region can be the banding region in the second low-frequency image, and the above second region can be the banding region in the first low-frequency image. The correspondence between the first region and the second region can be: when the sizes of the first low-frequency image and the second low-frequency image are the same, the position of the first region in the second low-frequency image is the same as the position of the second region in the first low-frequency image. For example, if the first low-frequency image and the second low-frequency image are superimposed, the first region and the second region will overlap.

[0054] Step 105: Superimpose the second low-frequency image and the first high-frequency image to obtain an output image.

[0055] In implementation, after filtering the color bands (non-dark regions) in the first low-frequency image using the target mask, the RAW domain value of the color band region except for the dark regions in the obtained second low-frequency image will increase. In this way, when the second low-frequency image and the first high-frequency image are superimposed, the proportion of the RAW domain value of the first high-frequency image in the color band region except for the dark regions can be reduced, so that in the obtained output image, more of the color band regions after debanding in the second low-frequency image are retained, and the influence of the banding in the first high-frequency image on the output image is reduced. In this way, the output image can retain both the high-frequency content in the first high-frequency image (for example, when it is necessary to use high frequency to photograph a moving object, the pixel content corresponding to the moving object in the output image can be improved through the first high-frequency image), and the proportion of the RAW domain value of the second low-frequency image in the debanding region can be increased, thereby achieving the debanding effect).

[0056] It is worth noting that the output image obtained above can be a RAW domain image or an image in other formats such as RGB. For example, assuming that the device implementing the stroboscopic image processing method provided in the embodiments of the present application is a device with a camera function such as a mobile phone or a camera, after the device superimposes the second low-frequency image and the first high-frequency image to obtain a RAW image without stroboscopic effect, it can return the RAW image without stroboscopic effect to the camera link. After converting the RAW image into an RGB image through Image Signal Processing (ISP) simulation, the RGB image can be returned to the user through display or other means.

[0057] As an alternative implementation, the first image includes a first sub-image (for ease of description, the first sub-image is labeled as input1 in the following embodiments) and a second sub-image (for ease of description, the second sub-image is labeled as input2 in the following embodiments). The first sub-image is obtained by shooting based on a first shutter frequency, and the second sub-image is obtained by shooting based on a second shutter frequency. The first shutter frequency is related to the moving speed of the shooting object, and the second shutter frequency is related to the flashing frequency of the stroboscopic light source.

[0058] Among them, the second shutter frequency related to the flashing frequency of the stroboscopic light source can be 1 times or 2 times the flashing frequency, so that the second sub-image does not have banding stripes.

[0059] In practical applications, the flashing frequency of the light is usually 60Hz or 50Hz, then the second shutter frequency can be 1 times or 2 times 60Hz or 50Hz. For example, taking the flashing frequency of 60Hz as an example, the shutter speed corresponding to the second shutter frequency can be 1 / 120(s) or 1 / 60(s).

[0060] In implementation, the flashing frequency of the light can be obtained by means such as detection or receiving an indication.

[0061] However, this second shutter frequency usually cannot meet the requirements of the fast-moving object to be photographed. For example, when the moving speed of the moving object is too fast, the phenomenon of the moving object being blurred will occur, and the clear shooting requirement of the fast-moving object cannot be met. Based on this, the above first shutter frequency can be a shutter frequency that matches the moving speed of the shooting object. Based on this first shutter frequency, the moving shooting object can be clearly photographed, that is, the shooting object in the first sub-image is clear.

[0062] After obtaining the first sub-image and the second sub-image through shooting, the first sub-image and the second sub-image can be respectively subjected to high-frequency and low-frequency separation, and two low-frequency images separated from the first sub-image and the second sub-image are used to determine a target mask. Then, the low-frequency image separated from the first sub-image is subjected to debanding processing using the target mask, and the high-frequency image (with a clear photographed object) separated from the first sub-image is superimposed on the debanded low-frequency image to obtain an output image.

[0063] As an alternative implementation manner, the separating the first image into a first high-frequency image and a first low-frequency image includes:

[0064] Separating the first sub-image (input1) into a first sub-high-frequency image (for ease of description, the first sub-high-frequency image is marked as input1_g in the following embodiments) and a first sub-low-frequency image (for ease of description, the first sub-low-frequency image is marked as input1_d in the following embodiments);

[0065] Separating the second sub-image (input2) into a second sub-high-frequency image (for ease of description, the second sub-high-frequency image is marked as input2_g in the following embodiments) and a second sub-low-frequency image (for ease of description, the second sub-low-frequency image is marked as input2_d in the following embodiments);

[0066] Wherein, the first high-frequency image includes the first sub-high-frequency image and the second sub-high-frequency image, and the first low-frequency image includes the first sub-low-frequency image and the second sub-low-frequency image.

[0067] In this implementation manner, by comparing the second sub-high-frequency image without banding with the first sub-low-frequency image with banding, the banding region can be obtained. For example: as Figure 2 shown, the data processing process of the embodiment of the present application may include: determining a banding region mask according to input1_d and input2_d → determining a target mask according to a dark region mask of a darker region in input1_d and the banding region mask → performing debanding processing on input1_d using the target mask → performing a superimposing process on input1_g and input1_d after debanding processing to obtain an output image (hereinafter marked as output).

[0068] Optionally, when the storage format of the first low-frequency image is GBRG, the determining the target mask according to the first low-frequency image includes:

[0069] Based on the RAW image obtained by stacking four types of data (such as GR, G, B, Gr) in the first sub-low-frequency image input1_d on the channel, determine the mean RAW image corresponding to the first sub-low-frequency image (for ease of description, in the following embodiments, the mean RAW image is marked as input1_d_avg). The mean RAW image includes the G-channel data after average processing, the B-channel data after average processing, and the R-channel data after average processing. The G-channel data is determined according to the average of the Gr-channel data and the Gb-channel data in the first sub-low-frequency image;

[0070] Normalize the mean RAW image according to the black level value and the maximum number of bits of the mean RAW image to obtain a normalized RAW image (for ease of description, in the following embodiments, the normalized RAW image is marked as RAW image (x));

[0071] According to the region where the pixel value in the normalized RAW image is less than or equal to the first preset threshold (for ease of description, in the following embodiments, the first preset threshold is marked as s), determine the first mask (for ease of description, in the following embodiments, the first mask is marked as z). Among them, the smaller the mask value in the first mask, the lower the brightness of the corresponding region;

[0072] After splicing the first sub-low-frequency image and the second sub-low-frequency image on the channel, obtain an intermediate image;

[0073] Input the intermediate image into a preset color band recognition model to obtain a second mask (for ease of description, in the following embodiments, the second mask is marked as mask). Among them, the smaller the mask value in the second mask, the heavier the color band of the corresponding region;

[0074] Adjust the second mask according to the first mask to obtain a target mask (for ease of description, in the following embodiments, the target mask is marked as mask z ).

[0075] Among them, the step of determining the target mask according to the first low-frequency image may include the following process:

[0076] 1. Assume that the size of the RAW images of input1 and input2 is W×H. input1_d is a single-channel image in the RAW domain and has a specific Bayer format, which is assumed to be the GBRG format in this embodiment. For example Figure 3As shown, first, perform a pack operation on the RAW image, stack four different types of data (Gr, Gb, R, B) on the channels, then calculate the average of the Gr and Gb channels to obtain the average G channel, and finally calculate the average of the GBR three channels to obtain the average RAW image (input1_d_avg), and the size of input1_d_avg is W / 2×H / 2.

[0077] 2. Normalize the average RAW image, subtract the black level value of the RAW image, and then divide by the maximum number of bits (2 bit bits) of the average RAW image to obtain the normalized RAW image (x) with values between 0 and 1.

[0078] 3. Set the first preset threshold s for dark area suppression according to needs or shooting scenarios, and perform the following calculations on x:

[0079]

[0080] Among them, x is the input normalized image, s is the first preset threshold (i.e., the dark area suppression threshold), clamp() represents value truncation. Through the above formula calculation, the values in the normalized RAW image can be truncated to between 0 and 1. Among them, when the pixel value in x is greater than s, it means that the brightness at the current position does not need to be suppressed and is within the normal brightness range; when the pixel value in x is lower than s, it means that this position is in the dark area, and the subsequent banding elimination in this area needs to reduce the elimination degree, and the brightness change is smooth and continuous. The smaller the value, the darker the point.

[0081] Since the uniform transition range in the negative interval of the exponential function is very small, the exponential value can be calculated multiple times to expand the numerical gradient interval and range, so that the value range of the final first mask z covers between 0 and 1. For example: The following formula can be used to calculate the exponential value n times to obtain the first mask z:

[0082] z = repeat(2 y ,n)

[0083] 4. After packing input1_d and input2_d, splice them on the channels, normalize and resize them to the size of W×H, and then input them into the preset color band recognition model, and the second mask (banding stripe mask) output by the preset color band recognition model can be obtained. The model structure of the preset color band recognition model can be as Figure 4As shown, the size of the mask output by the preset color band recognition model can be W×H×4. The smaller the mask value in the second mask, the heavier the banding degree at that position. Conversely, the larger the mask value, the lighter the banding degree at that position. If the mask value is equal to 1, it means there is no banding at that position. After that, the banding stripe mask can be resized to a size of W / 2×H / 2×4.

[0084] 5. Perform a dark area adjustment operation on the banding stripe mask obtained from the preset color band recognition model according to z to obtain the target mask mask. z . Among them, the smaller the mask value in z (close to 0), the darker the point, and the larger the mask value (close to 1), the brighter the point. And the smaller the mask value in mask (close to 0), the heavier the banding at that position. Conversely, the larger the mask value (close to 1), the lighter the degree.

[0085] Optionally, before the above process 5, the RAW domain values of the two G channels in the second mask can be averaged. In this way, the relative ratio of Gr and Gb can be kept consistent, avoiding the appearance of a grid phenomenon in the RAW image after subsequent banding elimination.

[0086] The determining the target mask according to the first low-frequency image further includes:

[0087] Obtain the first mask value corresponding to the Gr data channel in the second mask;

[0088] Obtain the second mask value corresponding to the Gb data channel in the second mask;

[0089] Update the mask values corresponding to the Gr data channel and the Gr data channel in the second mask according to the average value of the first mask value and the second mask value;

[0090] The adjusting the second mask according to the first mask to obtain the target mask includes:

[0091] Adjust the updated second mask according to the first mask to obtain the target mask.

[0092] For example: Update the mask values corresponding to the Gr data channel and the Gr data channel in the second mask through the following formula:

[0093]

[0094] mask[Gr] = mask[Gb]

[0095] Among them, mask[Gr] represents the first mask value, and mask[Gb] represents the second mask value.

[0096] In this embodiment, by averaging the RAW domain values of the two G channels in the second mask, it is possible to avoid the appearance of a grid phenomenon in the RAW image after subsequent banding elimination.

[0097] Optionally, adjusting the second mask according to the first mask to obtain a target mask includes:

[0098] Reducing the mask value corresponding to the target area in the second mask according to the first mask to obtain a target mask, where, in the first mask, the mask value corresponding to the target area is less than or equal to a second preset threshold, and in the second mask, the mask value corresponding to the target area is less than or equal to a third preset threshold.

[0099] For example: The following formula is used to determine the target mask mask z :

[0100] mask z = 1 - (1 - mask) × z

[0101] In the above formula, by multiplying the inverted mask by z pixel by pixel and then inverting, when it is a banding area and located in the dark area, the mask value at that position will be reduced, while in non-dark areas, the mask value remains the same as in the banding stripe mask.

[0102] After obtaining the above mask z , input1_d can be divided by mask pixel by pixel z , to obtain a second low-frequency image after banding elimination (for the convenience of description, in the following embodiments, the second low-frequency image is marked as input1 dz ). For example: The following formula can be used to determine input1 dz :

[0103] input1 dz = input1_d / mask z

[0104] Since the mask value in mask z is between 0 and 1, based on the above formula, the pixel values in the banding area of input1 dz can be amplified.

[0105] At this time, the above-mentioned superposition processing of the second low-frequency image and the first high-frequency image to obtain an output image can be expressed by the following formula:

[0106] output = input1 dz+input1_g

[0107] It is worth noting that since the pixel values in the banding area of input1 dz are amplified, and the pixel values in input1_g remain the same as before banding elimination. In this way, after the two are superimposed, it is equivalent to reducing the proportion of high-frequency details in the output, thereby achieving the purpose of noise reduction in the banding area. In addition, this high-low frequency noise reduction method only acts on the banding area of non-dark areas and does not affect the clarity of non-banding areas in the image, thus enabling adaptive noise suppression of the banding area.

[0108] It should be noted that in practical applications, the low-frequency image input1_d is a single-channel image in the RAW domain and has a specific Bayer format, such as: GBRG, RGGB, BGGR, etc. The stroboscopic image processing method provided in the embodiments of the present application takes the RAW domain image in the GBRG format as an example for illustration. However, in practice, the stroboscopic image processing method provided in the embodiments of the present application can also be applied to RAW domain images in other formats such as RGGB and BGGR, and a target mask can be obtained by a processing process similar to that of the RAW domain image in the above GBRG format, which is not specifically limited here.

[0109] In the embodiments of the present application, when a first image with color bands is captured under a stroboscopic light source, the image can be divided into a high-frequency image and a low-frequency image, and the color bands in the first low-frequency image are filtered based on the target mask. During this filtering process, by adjusting the mask value of the target mask, the debanding strength for the black area and the shadow area of the original image itself can be reduced, thereby reducing the noise exposure to the black area and the shadow area of the original image itself during the debanding process and reducing the loss of the original image quality. In addition, during the debanding process, since the RAW domain value in the banding area is increased, the RAW domain value in the banding area of the second low-frequency image is relatively increased, that is, the RAW domain value in the banding area of the high-frequency image is relatively decreased. In this way, when the second low-frequency image with the increased RAW domain value in the banding area is superimposed with the high-frequency image with the unchanged RAW domain value in the banding area, the proportion of the high-frequency image in the banding area will be reduced. Furthermore, the finally obtained output image can maintain the clarity of the non-banding area through the high-frequency image and maintain the debanding effect of the banding area through the debanded low-frequency image, thus achieving the purpose of changing the ratio between high-low frequency information according to the banding intensity and achieving adaptive noise reduction.

[0110] Please refer to Figure 5 , which is another stroboscopic image processing method provided by the embodiments of the present application. As shown in Figure 5 , this method may include the following steps:

[0111] Step 501: Obtain a RAW image with stroboscopic taken by the user;

[0112] Step 502: Separate the high-frequency and low-frequency components of the RAW image to obtain a low-frequency image and a high-frequency image;

[0113] Step 503: Determine the dark area mask z according to the low-frequency image;

[0114] Step 504: Use a preset color band recognition model to recognize the low-frequency image and determine the banding stripe mask;

[0115] Step 505: Adjust the banding stripe mask according to the dark area mask z to obtain the target mask mask z ;

[0116] Step 506: Use mask z to perform banding elimination on the low-frequency image to obtain input1 dz ;

[0117] Step 507: Add high-frequency image information to input1 dz to obtain the output image output;

[0118] Step 508: Output output.

[0119] In the embodiments of the present application, through the separation of high-frequency and low-frequency images, the noise in the banding area can be suppressed after removing stroboscopic. And at the same time, in the process of determining the banding area based on the low-frequency image, the negative impact of the image detail attributes on the stroboscopic removal algorithm can be avoided, making the predicted stroboscopic area smoother and more uniform. Secondly, according to the dark area of the original image, a smooth dark area mask is output, and the removal degree of the dark area is automatically controlled according to the mask area predicted by the banding elimination network, reducing noise while preserving the original image quality. The whole process can be implemented in the camera link, and the stroboscopic can be automatically eliminated when the user takes a photo, and a clear photo can be taken.

[0120] For the stroboscopic image processing method provided by the embodiments of the present application, the execution subject may be a stroboscopic image processing device. In the embodiments of the present application, taking the stroboscopic image processing device executing the stroboscopic image processing method as an example, the stroboscopic image processing device provided by the embodiments of the present application is described.

[0121] Please refer to Figure 6, the stroboscopic image processing 600 provided by the embodiments of the present application may include the following modules:

[0122] An acquisition module 601, configured to acquire a first image captured under a stroboscopic light source, where the first image includes color bands, and the first image is an original RAW domain image;

[0123] A first processing module 602, configured to separate a high-frequency image and a low-frequency image from the first image to obtain a first high-frequency image and a first low-frequency image;

[0124] A determination module 603, configured to determine a target mask according to the first low-frequency image, where the mask value in the target mask is negatively correlated with the brightness and the color band degree of the region corresponding to the mask value in the first low-frequency image;

[0125] A second processing module 604, configured to filter the color bands in the first low-frequency image according to the target mask to obtain a second low-frequency image, where the RAW domain value of the second low-frequency image in a first region is greater than the RAW domain value of the second low-frequency image in a second region, the first region includes the region where the color bands are located and does not include the region where the dark area is located, the dark area is a region where the brightness value is less than a preset brightness threshold, and the first region corresponds to the second region;

[0126] A third processing module 605, configured to perform a superimposing process on the second low-frequency image and the first high-frequency image to obtain an output image.

[0127] Optionally, the first processing module 602 includes:

[0128] A first processing unit, configured to perform a mean filtering process on the first image to obtain a first low-frequency image;

[0129] A second processing unit, configured to perform an image removal process on the first image based on the first low-frequency image to obtain a first high-frequency image.

[0130] Optionally, the first image includes a first sub-image and a second sub-image, the first sub-image is captured based on a first shutter frequency, the second sub-image is captured based on a second shutter frequency, the first shutter frequency is related to the moving speed of the captured object, and the second shutter frequency is related to the flash frequency of the stroboscopic light source;

[0131] The first processing module 602 includes:

[0132] A third processing unit, configured to separate a high-frequency image and a low-frequency image from the first sub-image to obtain a first sub-high-frequency image and a first sub-low-frequency image;

[0133] A fourth processing unit for separating the high-frequency and low-frequency images of the second sub-image to obtain a second sub-high-frequency image and a second sub-low-frequency image;

[0134] Wherein, the first high-frequency image includes the first sub-high-frequency image and the second sub-high-frequency image, and the first low-frequency image includes the first sub-low-frequency image and the second sub-low-frequency image.

[0135] Optionally, the determination module 603 includes:

[0136] A first determination unit for determining a mean RAW image corresponding to the first sub-low-frequency image according to the RAW image obtained by stacking four types of data in the first sub-low-frequency image on the channel, where the mean RAW image includes the G-channel data after average processing, the B-channel data after average processing, and the R-channel data after average processing, and the G-channel data is determined according to the average of the Gr-channel data and the Gb-channel data in the first sub-low-frequency image;

[0137] A fifth processing unit for normalizing the mean RAW image according to the black level value and the maximum number of bits of the mean RAW image to obtain a normalized RAW image;

[0138] A second determination unit for determining a first mask according to the region where the pixel value in the normalized RAW image is less than or equal to a first preset threshold, where the smaller the mask value in the first mask, the lower the brightness of the corresponding region;

[0139] A sixth processing unit for splicing the first sub-low-frequency image and the second sub-low-frequency image on the channel to obtain an intermediate image;

[0140] A seventh processing unit for inputting the intermediate image into a preset color band recognition model to obtain a second mask, where the smaller the mask value in the second mask, the heavier the color band of the corresponding region;

[0141] An adjustment unit for adjusting the second mask according to the first mask to obtain a target mask.

[0142] Optionally, the adjustment unit is specifically configured to:

[0143] Reduce the mask value corresponding to the target region in the second mask according to the first mask to obtain a target mask, where in the first mask, the mask value corresponding to the target region is less than or equal to a second preset threshold, and in the second mask, the mask value corresponding to the target region is less than or equal to a third preset threshold.

[0144] Optionally, the determination module 603 includes:

[0145] A first acquisition unit, configured to acquire a first mask value corresponding to a Gr data channel in the second mask;

[0146] A second acquisition unit, configured to acquire a second mask value corresponding to a Gb data channel in the second mask;

[0147] An update unit, configured to update mask values corresponding to the Gr data channel and the Gr data channel in the second mask according to an average value of the first mask value and the second mask value;

[0148] The adjustment unit is specifically configured to:

[0149] Adjust the updated second mask according to the first mask to obtain a target mask.

[0150] The stroboscopic image processing device in the embodiments of the present application may be an electronic device or a component in an electronic device, such as an integrated circuit or a chip. The electronic device may be a terminal or other devices other than a terminal. Exemplarily, the electronic device may be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a Mobile Internet Device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and may also be a server, a Network Attached Storage (NAS), a personal computer (PC), a television (TV), a teller machine, or a self-service machine, etc. The embodiments of the present application do not make specific limitations.

[0151] The stroboscopic image processing device in the embodiments of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems. The embodiments of the present application do not make specific limitations.

[0152] The stroboscopic image processing device provided in the embodiments of the present application can implement Figures 1 to 5 each process implemented by the method embodiments shown, and can achieve the same beneficial effects. To avoid repetition, details are not described here again.

[0153] Optionally, as Figure 7As shown in the figure, an embodiment of the present application further provides an electronic device 700, which includes a processor 701 and a memory 702. A program or instruction that can run on the processor 701 is stored on the memory 702. When the program or instruction is executed by the processor 701, each step of the above embodiment of the stroboscopic image processing method is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be elaborated here.

[0154] It should be noted that the electronic device in the embodiment of the present application includes the above-mentioned mobile electronic device and non-mobile electronic device.

[0155] Figure 8 It is a schematic diagram of the hardware structure of an electronic device for implementing an embodiment of the present application.

[0156] The electronic device 800 includes, but is not limited to: a radio frequency unit 801, a network module 802, an audio output unit 803, an input unit 804, a sensor 805, a display unit 806, a user input unit 807, an interface unit 808, a memory 809, and a processor 810 and other components.

[0157] Those skilled in the art can understand that the electronic device 800 may further include a power supply (such as a battery) for supplying power to each component. The power supply can be logically connected to the processor 810 through a power management system, so as to implement functions such as management of charging, discharging, and power consumption management through the power management system. Figure 8 The structure of the electronic device shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0158] Among them, the input unit 804 is used to obtain a first image captured under a stroboscopic light source. The first image includes color bands, and the first image is an original RAW domain image;

[0159] The processor 810 is used to separate the first image into a first high-frequency image and a first low-frequency image;

[0160] The processor 810 is further used to determine a target mask according to the first low-frequency image, wherein the mask value in the target mask is negatively correlated with the brightness and the color band degree of the region corresponding to the mask value in the first low-frequency image;

[0161] The processor 810 is further configured to filter the color bands in the first low-frequency image according to the target mask to obtain a second low-frequency image, wherein the RAW domain value in the second low-frequency image within the first region is larger than the RAW domain value in the first low-frequency image within the second region, the first region includes the region where the color bands are located and does not include the region where the dark area is located, the dark area is the area where the luminance value is less than the preset luminance threshold, and the first region corresponds to the second region;

[0162] The processor 810 is further configured to perform superposition processing on the second low-frequency image and the first high-frequency image to obtain an output image.

[0163] Optionally, the processor 810 performs the separation of the first image into a first high-frequency image and a first low-frequency image, including:

[0164] Performing mean filtering processing on the first image to obtain a first low-frequency image;

[0165] Performing image removal processing on the first image based on the first low-frequency image to obtain a first high-frequency image.

[0166] Optionally, the first image includes a first sub-image and a second sub-image, the first sub-image is obtained by shooting based on a first shutter frequency, the second sub-image is obtained by shooting based on a second shutter frequency, the first shutter frequency is related to the moving speed of the shooting object, and the second shutter frequency is related to the flash frequency of the stroboscopic light source;

[0167] The processor 810 performs the separation of the first image into a first high-frequency image and a first low-frequency image, including:

[0168] Performing separation of the first sub-image into a first sub-high-frequency image and a first sub-low-frequency image;

[0169] Performing separation of the second sub-image into a second sub-high-frequency image and a second sub-low-frequency image;

[0170] Wherein, the first high-frequency image includes the first sub-high-frequency image and the second sub-high-frequency image, and the first low-frequency image includes the first sub-low-frequency image and the second sub-low-frequency image.

[0171] Optionally, the processor 810 performs the determination of the target mask according to the first low-frequency image, including:

[0172] Determine the mean RAW image corresponding to the first sub-low-frequency image according to the RAW image after stacking four types of data in the first sub-low-frequency image on channels, where the mean RAW image includes the G-channel data after average processing, the B-channel data after average processing, and the R-channel data after average processing, and the G-channel data is determined according to the average of the Gr-channel data and the Gb-channel data in the first sub-low-frequency image;

[0173] Perform normalization processing on the mean RAW image according to the black level value and the maximum number of bits of the mean RAW image to obtain a normalized RAW image;

[0174] Determine a first mask according to the region where the pixel value in the normalized RAW image is less than or equal to a first preset threshold, where the smaller the mask value in the first mask, the lower the brightness of the corresponding region;

[0175] After splicing the first sub-low-frequency image and the second sub-low-frequency image on channels, obtain an intermediate image;

[0176] Input the intermediate image into a preset color band recognition model to obtain a second mask, where the smaller the mask value in the second mask, the heavier the color band of the corresponding region;

[0177] Adjust the second mask according to the first mask to obtain a target mask.

[0178] Optionally, the adjusting the second mask according to the first mask to obtain a target mask executed by the processor 810 includes:

[0179] Reduce the mask value corresponding to the target region in the second mask according to the first mask to obtain a target mask, where in the first mask, the mask value corresponding to the target region is less than or equal to a second preset threshold, and in the second mask, the mask value corresponding to the target region is less than or equal to a third preset threshold.

[0180] Optionally, the determining a target mask according to the first low-frequency image executed by the processor 810 further includes:

[0181] Obtain a first mask value corresponding to the Gr data channel in the second mask;

[0182] Obtain a second mask value corresponding to the Gb data channel in the second mask;

[0183] Update the mask values corresponding to the Gr data channel and the Gr data channel in the second mask according to the average of the first mask value and the second mask value;

[0184] Adjusting the second mask according to the first mask to obtain a target mask includes:

[0185] Adjusting the updated second mask according to the first mask to obtain a target mask.

[0186] The electronic device 800 provided in the embodiments of the present application can implement the processes executed by each module in the stroboscopic image processing device as Figure 6 shown, and can achieve the same beneficial effects. To avoid repetition, details are not described herein again.

[0187] It should be understood that in the embodiments of the present application, the input unit 804 may include a Graphics Processing Unit (GPU) 8041 and a microphone 8042. The graphics processor 8041 processes the image data of static pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 806 may include a display panel 8061, and the display panel 8061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 807 includes at least one of a touch panel 8071 and other input devices 8072. The touch panel 8071 is also referred to as a touch screen. The touch panel 8071 may include a touch detection device and a touch controller. The other input devices 8072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described herein again.

[0188] The memory 809 can be used to store software programs and various data. The memory 809 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data. Among them, the first storage area may store an operating system, application programs or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 809 may include volatile memory or non-volatile memory, or the memory 809 may include both volatile and non-volatile memory. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDR SDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct rambus random access memory (DRRAM). The memory 809 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0189] The processor 810 may include one or more processing units; optionally, the processor 810 integrates an application processor and a modem processor. Among them, the application processor mainly processes operations related to the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above modem processor may not be integrated into the processor 810.

[0190] The embodiments of the present application also provide a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, it implements each process of the above embodiments of the stroboscopic image processing method and can achieve the same technical effect. To avoid repetition, it will not be elaborated here.

[0191] Among them, the processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory ROM, random access memory RAM, magnetic disks, or optical discs, etc.

[0192] Another embodiment of the present application provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement each process of the above embodiment of the stroboscopic image processing method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0193] It should be understood that the chip mentioned in the embodiments of the present application may also be referred to as a system-on-chip, system chip, chip system, or system-on-chip, etc.

[0194] The embodiments of the present application provide a computer program product. The program product is stored in a storage medium and is executed by at least one processor to implement each process of the above embodiment of the stroboscopic image processing method and can achieve the same technical effects. To avoid repetition, it will not be elaborated here.

[0195] It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such process, method, article, or device. Without more limitations, the element defined by the statement "including one..." does not exclude the existence of other identical elements in the process, method, article, or device including that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed. It may also include performing functions in a substantially simultaneous manner or in a reverse order according to the functions involved. For example, the described methods may be executed in an order different from that described, and various steps may be added, omitted, or combined. Additionally, the features described with reference to certain examples may be combined in other examples.

[0196] Through the description of the above embodiments, those skilled in the art can clearly understand that the above method of the embodiments can be implemented by means of software plus a necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases, the former is a better implementation method. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art can be embodied in the form of a computer software product. The computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions for causing an electronic device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in various embodiments of the present application.

[0197] The embodiments of the present application have been described above in conjunction with the accompanying drawings. However, the present application is not limited to the above specific implementation manners. The above specific implementation manners are merely illustrative rather than restrictive. Under the inspiration of the present application, those of ordinary skill in the art can also make many forms without departing from the purpose of the present application and the scope protected by the claims, and all of them belong to the protection scope of the present application.

Claims

1. A stroboscopic image processing method, characterized in that, Including: Obtain a first image captured under a stroboscopic light source, where the first image includes color bands and is an original RAW domain image; Perform high-frequency and low-frequency image separation on the first image to obtain a first high-frequency image and a first low-frequency image; Determine the area where the color bands are located and the dark area from the first low-frequency image, and determine a target mask based on the area where the color bands are located and the dark area. Among them, the mask value in the target mask is negatively correlated with the brightness and color band degree of the area corresponding to the mask value in the first low-frequency image; Filter the color bands in the first low-frequency image according to the target mask to obtain a second low-frequency image. Among them, the RAW domain value of the second low-frequency image in the first area is larger than the RAW domain value of the first low-frequency image in the second area. The first area includes the area where the color bands are located and does not include the area where the dark area is located. The dark area is an area where the brightness value is less than a preset brightness threshold, and the first area corresponds to the second area; Perform superposition processing on the second low-frequency image and the first high-frequency image to obtain an output image.

2. The method according to claim 1, characterized in that The performing high-frequency and low-frequency image separation on the first image to obtain a first high-frequency image and a first low-frequency image includes: Perform mean filtering processing on the first image to obtain a first low-frequency image; Perform image removal processing on the first image based on the first low-frequency image to obtain a first high-frequency image.

3. The method according to claim 1 or 2, characterized in that, The first image includes a first sub-image and a second sub-image. The first sub-image is captured based on a first shutter speed, and the second sub-image is captured based on a second shutter speed. The first shutter speed is related to the movement speed of the captured object, and the second shutter speed is related to the flash frequency of the stroboscopic light source; The performing high-frequency and low-frequency image separation on the first image to obtain a first high-frequency image and a first low-frequency image includes: Perform high-frequency and low-frequency image separation on the first sub-image to obtain a first sub-high-frequency image and a first sub-low-frequency image; Perform high-frequency and low-frequency image separation on the second sub-image to obtain a second sub-high-frequency image and a second sub-low-frequency image; Among them, the first high-frequency image includes the first sub-high-frequency image and the second sub-high-frequency image, and the first low-frequency image includes the first sub-low-frequency image and the second sub-low-frequency image.

4. The method according to claim 3, wherein The determining the area where the color bands are located and the dark area from the first low-frequency image, and determining a target mask based on the area where the color bands are located and the dark area includes: Determine a mean RAW map corresponding to the first sub-low-frequency image according to the RAW map after stacking four types of data in the first sub-low-frequency image on the channels. The mean RAW map includes the G channel data after average processing, the B channel data after average processing, and the R channel data after average processing. The G channel data is determined according to the average of the Gr channel data and the Gb channel data in the first sub-low-frequency image; Perform normalization processing on the mean RAW map according to the black level value and the maximum number of bits of the mean RAW map to obtain a normalized RAW map; Determine a first mask according to the region in the normalized RAW image where the pixel value is less than or equal to a first preset threshold, where the smaller the mask value in the first mask, the lower the brightness of the corresponding region; After splicing the first sub-low-frequency image and the second sub-low-frequency image on the channel, obtain an intermediate image; Input the intermediate image into a preset color band recognition model to obtain a second mask, where the smaller the mask value in the second mask, the heavier the color band in the corresponding region; Adjust the second mask according to the first mask to obtain a target mask.

5. The method according to claim 4, wherein The adjusting the second mask according to the first mask to obtain a target mask includes: Reduce the mask value in the second mask corresponding to the target region according to the first mask to obtain a target mask, where in the first mask, the mask value corresponding to the target region is less than or equal to a second preset threshold, and in the second mask, the mask value corresponding to the target region is less than or equal to a third preset threshold.

6. The method according to claim 4, wherein The method further includes: Obtain a first mask value corresponding to the Gr data channel in the second mask; Obtain a second mask value corresponding to the Gb data channel in the second mask; Update the mask values in the second mask corresponding to the Gr data channel and the Gr data channel according to the average value of the first mask value and the second mask value; The adjusting the second mask according to the first mask to obtain a target mask includes: Adjust the updated second mask according to the first mask to obtain a target mask.

7. A stroboscopic image processing device, characterized in that, Includes: An acquisition module, configured to acquire a first image captured under a stroboscopic light source, where the first image includes a color band, and the first image is an original RAW domain image; A first processing module, configured to separate the first image into a first high-frequency image and a first low-frequency image; A determination module, configured to determine the region where the color band is located and the dark region from the first low-frequency image, and determine a target mask according to the region where the color band is located and the dark region, where the mask value in the target mask is negatively correlated with the brightness and the color band degree of the region corresponding to the mask value in the first low-frequency image; A second processing module, configured to filter the color band in the first low-frequency image according to the target mask to obtain a second low-frequency image, where the RAW domain value in the second low-frequency image located in the first region is larger than the RAW domain value in the second region in the first low-frequency image, the first region includes the region where the color band is located and does not include the region where the dark region is located, the dark region is a region where the brightness value is less than a preset brightness threshold, and the first region corresponds to the second region; A third processing module, configured to superimpose the second low-frequency image and the first high-frequency image to obtain an output image.

8. The device according to claim 7, characterized in that, The first processing module includes: A first processing unit, configured to perform mean filtering on the first image to obtain a first low-frequency image; A second processing unit, configured to perform image removal on the first image based on the first low-frequency image to obtain a first high-frequency image.

9. The device according to claim 7 or 8, characterized in that The first image includes a first sub-image and a second sub-image. The first sub-image is captured based on a first shutter frequency, and the second sub-image is captured based on a second shutter frequency. The first shutter frequency is related to the moving speed of the object to be photographed, and the second shutter frequency is related to the flashing frequency of the stroboscopic light source; The first processing module includes: A third processing unit for separating the high-frequency and low-frequency images of the first sub-image to obtain a first sub-high-frequency image and a first sub-low-frequency image; A fourth processing unit for separating the high-frequency and low-frequency images of the second sub-image to obtain a second sub-high-frequency image and a second sub-low-frequency image; Wherein, the first high-frequency image includes the first sub-high-frequency image and the second sub-high-frequency image, and the first low-frequency image includes the first sub-low-frequency image and the second sub-low-frequency image.

10. The device according to claim 9, characterized in that, The determination module includes: A first determination unit for determining a mean RAW image corresponding to the first sub-low-frequency image according to the RAW image after stacking four types of data in the first sub-low-frequency image on the channels. The mean RAW image includes the G-channel data after average processing, the B-channel data after average processing, and the R-channel data after average processing. The G-channel data is determined according to the average value of the Gr-channel data and the Gb-channel data in the first sub-low-frequency image; A fifth processing unit for normalizing the mean RAW image according to the black level value and the maximum number of bits of the mean RAW image to obtain a normalized RAW image; A second determination unit for determining a first mask according to the region where the pixel value in the normalized RAW image is less than or equal to a first preset threshold. Among them, the smaller the mask value in the first mask, the lower the brightness of the corresponding region; A sixth processing unit for splicing the first sub-low-frequency image and the second sub-low-frequency image on the channels to obtain an intermediate image; A seventh processing unit for inputting the intermediate image into a preset color band recognition model to obtain a second mask. Among them, the smaller the mask value in the second mask, the heavier the color band of the corresponding region; An adjustment unit for adjusting the second mask according to the first mask to obtain a target mask.

11. The device according to claim 10, wherein The adjustment unit is specifically used for: Reducing the mask value corresponding to the target region in the second mask according to the first mask to obtain a target mask, where, in the first mask, the mask value corresponding to the target region is less than or equal to a second preset threshold, and in the second mask, the mask value corresponding to the target region is less than or equal to a third preset threshold.

12. The device according to claim 10, wherein The determination module includes: A first acquisition unit for acquiring a first mask value corresponding to the Gr data channel in the second mask; A second acquisition unit for acquiring a second mask value corresponding to the Gb data channel in the second mask; An update unit for updating the mask values corresponding to the Gr data channel and the Gr data channel in the second mask according to the average value of the first mask value and the second mask value; The adjustment unit is specifically used for: Adjust the updated second mask according to the first mask to obtain a target mask.

13. An electronic device, characterized in that, It includes a processor and a memory. The memory stores programs or instructions that can run on the processor. When the programs or instructions are executed by the processor, the steps of the stroboscopic image processing method described in any one of claims 1 to 6 are implemented.

14. A readable storage medium, characterized in that, Programs or instructions are stored on the readable storage medium. When the programs or instructions are executed by a processor, the steps of the stroboscopic image processing method described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Image processing method and device

    CN111784617A

  • Method and apparatus for automatically detecting and suppressing fringes, electronic device and computer-readable storage medium

    US20210400171A1