Image processing method, apparatus, device, readable storage medium and program product

By acquiring the base layer and detail layer of the target image, detail enhancement and noise halo suppression are performed to generate a tone-mapped image, which solves the problems of noise and halo effects in tone mapping and improves image quality.

CN115170412BActive Publication Date: 2026-02-13BEIJING ESWIN COMPUTING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210744771.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-27
Publication Date
2026-02-13
Estimated Expiration
2042-06-27

AI Technical Summary

Technical Problem

In existing technologies, the amplification noise and halo effect that occur during tone mapping severely affect image quality, especially when displaying high dynamic range images on media with limited dynamic range.

Method used

By acquiring the base layer and the first detail layer of the target image, performing detail enhancement processing, noise halo suppression, determining the third detail layer, and generating a tone-mapped image based on the base layer and the third detail layer.

Benefits of technology

It effectively suppresses noise amplification and halo effect caused by detail enhancement in tone mapping, thus improving the visual effect of the image.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115170412B_ABST
    Figure CN115170412B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide an image processing method, device and equipment, readable storage medium and program product, which relate to the field of image processing. The method comprises: obtaining a target image; determining a base layer and a first detail layer of the target image, the base layer being used to represent the overall structure of the target image, and the first detail layer being used to represent the detail texture of the target image; performing a detail enhancement processing on the first detail layer to determine a second detail layer; performing a noise and halo suppression processing on the second detail layer to determine a third detail layer; and determining a tone mapping image corresponding to the target image based on the base layer and the third detail layer. Thus, the noise amplification and halo effect caused by the detail enhancement in the tone mapping based on layer decomposition can be effectively suppressed, and the tone mapping image has better visual effect.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular, the present application relates to an image processing method and device, equipment, readable storage medium and program product. BACKGROUND

[0002] In the prior art, due to the fact that the dynamic range of real scene and human eye is very wide, the display of 12bit, 20bit HDR (High Dynamic Range) image or video on 8bit display cannot match the human eye perception and real scene. Tone mapping is an image processing technology for approximating the display of high dynamic range image on limited dynamic range medium. Tone mapping will enhance the details of the image details layer. Since the noise in the image will be accompanied by detail edge information being divided into the detail layer, detail enhancement will cause amplified noise and halo effect (halo effect). The halo effect generally occurs at the edge of the image, which is manifested as a circle of halo-shaped objects. The image obtains a tone mapping image through tone mapping, but the amplified noise and halo effect in tone mapping will seriously affect the quality of the tone mapping image. SUMMARY

[0003] The present application aims at the shortcomings of the prior art and provides an image processing method, device, equipment, computer readable storage medium and computer program product, which are used to solve the problem of how to suppress the amplified noise and halo effect in tone mapping.

[0004] In a first aspect, the present application provides an image processing method, comprising:

[0005] obtaining a target image;

[0006] determining a base layer and a first detail layer of the target image, the base layer being used to represent the overall structure of the target image, and the first detail layer being used to represent the detail texture of the target image;

[0007] performing detail enhancement processing on the first detail layer to determine a second detail layer;

[0008] performing noise halo suppression processing on the second detail layer to determine a third detail layer;

[0009] determining a tone mapping image corresponding to the target image based on the base layer and the third detail layer.

[0010] In one embodiment, the noise halo suppression processing on the second detail layer to determine the third detail layer comprises:

[0011] if the noise variance of the target image is less than or equal to the preset variance threshold, determining a third detail layer based on the second detail layer, a preset first parameter and a preset second parameter;

[0012] if the noise variance of the target image is greater than the preset variance threshold, determining the third detail layer based on the first detail layer, the second detail layer and a preset third parameter.

[0013] In an embodiment, if the noise variance of the target image is less than or equal to the preset variance threshold, determining the third detail layer based on the second detail layer, a preset first parameter and a preset second parameter, comprises:

[0014] if the noise variance of the target image is less than or equal to the preset variance threshold, and the value of the second detail layer is greater than or equal to a detail layer threshold, obtaining the third detail layer based on a product between the second detail layer and the preset first parameter;

[0015] if the noise variance of the target image is less than or equal to the preset variance threshold, and the value of the second detail layer is less than the detail layer threshold, obtaining the third detail layer based on a product between the second detail layer and the preset second parameter.

[0016] In an embodiment, the preset first parameter is used for halo suppression of positive details in the second detail layer, and the preset second parameter is used for increasing negative details in the second detail layer.

[0017] In an embodiment, if the noise variance of the target image is greater than the preset variance threshold, determining the third detail layer based on the first detail layer, the second detail layer and a preset third parameter, comprises:

[0018] if the noise variance of the target image is greater than the preset variance threshold, determining the third detail layer based on a product between the first detail layer and the preset third parameter, a product between the second detail layer and the preset third parameter, and the second detail layer.

[0019] In an embodiment, the preset third parameter is used for noise suppression and halo suppression of the second detail layer.

[0020] In an embodiment, determining the base layer and the first detail layer of the target image comprises:

[0021] determining a first luminance map corresponding to the target image;

[0022] inputting the first luminance map into a preset low-pass filter to obtain the base layer and the first detail layer of the target image.

[0023] In an embodiment, performing detail enhancement processing on the first detail layer to determine a second detail layer, comprises:

[0024] The first detail layer is subjected to linear detail enhancement processing or nonlinear detail enhancement processing based on a preset amplification coefficient, to obtain a second detail layer.

[0025] In one embodiment, the tone mapping image corresponding to the target image is determined based on the base layer and the third detail layer, including:

[0026] The base layer and the third detail layer are fused based on the base layer, the third detail layer, and a preset proportion coefficient, to obtain a second luminance map;

[0027] If the target image is a grayscale image, the second luminance map is taken as the tone mapping image corresponding to the target image;

[0028] If the target image is a color image, the second luminance map is subjected to color correction processing, to obtain the tone mapping image corresponding to the target image.

[0029] In a second aspect, the present application provides an image processing device, including:

[0030] A first processing module is configured to acquire a target image;

[0031] A second processing module is configured to determine a base layer and a first detail layer of the target image, the base layer being used to represent the overall structure of the target image, and the first detail layer being used to represent the detail texture of the target image;

[0032] A third processing module is configured to perform detail enhancement processing on the first detail layer, to determine a second detail layer;

[0033] A fourth processing module is configured to perform noise and halo suppression processing on the second detail layer, to determine a third detail layer;

[0034] A fifth processing module is configured to determine a tone mapping image corresponding to the target image based on the base layer and the third detail layer.

[0035] In a third aspect, the present application provides an electronic device, including a processor, a memory, and a bus;

[0036] The bus is configured to connect the processor and the memory;

[0037] The memory is configured to store operation instructions;

[0038] The processor is configured to execute the image processing method of the first aspect of the present application by invoking the operation instructions.

[0039] In a fourth aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is used to execute the image processing method of the first aspect of the present application.

[0040] In a fifth aspect, the present application provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the image processing method of the first aspect of the present application.

[0041] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:

[0042] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects: The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:

[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments of the present application will be briefly introduced.

[0044] Figure 1 The architecture schematic diagram of the image processing system provided by the embodiments of the present application is shown in the figure.

[0045] Figure 2 The flow schematic diagram of the image processing method provided by the embodiments of the present application is shown in the figure.

[0046] Figure 3 The schematic diagram of the image processing provided by the embodiments of the present application is shown in the figure.

[0047] Figure 4 The schematic diagram of the image processing provided by the embodiments of the present application is shown in the figure.

[0048] Figure 5 The flow schematic diagram of another image processing method provided by the embodiments of the present application is shown in the figure.

[0049] Figure 6 The schematic diagram of the image processing provided by the embodiments of the present application is shown in the figure.

[0050] Figure 7 The structure schematic diagram of the image processing device provided by the embodiments of the present application is shown in the figure.

[0051] Figure 8 The structure schematic diagram of the electronic device provided by the embodiments of the present application is shown in the figure. DETAILED DESCRIPTION

[0052] The embodiments of the present application will be described below in conjunction with the accompanying drawings. It should be understood that the embodiments described below in conjunction with the accompanying drawings are exemplary descriptions of the technical solutions of the embodiments of the present application, and do not constitute a limitation on the technical solutions of the embodiments of the present application.

[0053] Those skilled in the art can understand that, unless specifically stated otherwise, the singular forms "a", "an" and "the" used herein also include the plural forms. It should be further understood that the terms "comprise" and "include" used in the embodiments of the present application mean that the corresponding features can be implemented as the presented features, information, data, steps, operations, elements and / or components, but do not exclude other features, information, data, steps, operations, elements, components and / or combinations thereof supported by the present technology. It should be understood that when we say that an element is "connected" or "coupled" to another element, the element can be directly connected or coupled to the other element, or can mean that the element and the other element are connected through an intermediate element. In addition, "connected" or "coupled" used herein can include wireless connection or wireless coupling. The term "and / or" used herein indicates at least one of the items defined by the term, for example, "A and / or B" indicates implementation as "A", or implementation as "B", or implementation as "A and B".

[0054] It can be understood that in the specific embodiments of the present application, data related to image processing is involved, and when the above embodiments of the present application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions.

[0055] In order to make the purpose, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below in conjunction with the accompanying drawings.

[0056] The embodiments of the present application are an image processing method provided by an image processing system, which relates to the fields of computer vision and image processing.

[0057] In order to better understand and illustrate the scheme of the embodiments of the present application, some technical terms involved in the embodiments of the present application will be briefly described below.

[0058] Tone mapping: Tone mapping is divided into GTM (Global Tone Mapping) and LTM (Local Tone Mapping), wherein the principle of layer decomposition technology is relatively simple, the performance is superior, the image enhancement effect is excellent, and it is a tone mapping technology researched in recent years; the basic idea of the tone mapping method based on layer decomposition is: a to-be-processed image is divided into a base layer with only a main structure and a detail layer rich in detail texture through a low-pass filter, then the detail layer is further enhanced, including linear detail enhancement and nonlinear detail enhancement, so as to improve the imaging quality of the edge region of the image and enhance the detail information, and the local contrast of the image is improved.

[0059] Black edge: After negative detail enhancement in the image, the amplitude of the negative detail will increase, and after being superimposed on the original image, this part of the detail may shrink close to 0, or may be less than 0, because there is no negative value in the image, so this part will be cut to 0, and this part of the detail is shown on the image in the form of becoming darker, which is called black edge.

[0060] The scheme provided by the embodiments of the present application relates to image processing technology, and the technical scheme of the present application will be described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of the present application will be described below with reference to the drawings.

[0061] In order to better understand the scheme provided by the embodiments of the present application, the scheme will be described below in combination with a specific application scenario.

[0062] In one embodiment, Figure 1 Fig. 1 shows a schematic diagram of the architecture of an image processing system to which the embodiments of the present application are applicable, and it can be understood that the image processing method provided by the embodiments of the present application can be applied to but not limited to the application scenarios shown in Fig. 1. Figure 1

[0063] In this example, as shown in Fig. 1, the image processing system includes an image acquisition module 101, an image preprocessing module 102, an image enhancement module 103, an image post-processing module 104, and an image output module 105. Figure 1 ​As shown, the architecture of the image processing system in this example may include, but is not limited to, an image processing device 10, a terminal 20, and a network 30. The image processing device 10 and the terminal 20 can interact via the network 30. The image processing device 10 may be an in-vehicle device, a camera, etc. The image processing device 10 acquires a target image through a sensor; the image processing device 10 determines the base layer and a first detail layer of the target image through a chip (e.g., an image processing chip). The base layer characterizes the overall structure of the target image, and the first detail layer characterizes the detailed texture of the target image; the image processing device 10 performs detail enhancement processing on the first detail layer through the chip to determine a second detail layer; the image processing device 10 performs noise and halo suppression processing on the second detail layer through the chip to determine a third detail layer; the image processing device 10 determines the tone mapping image corresponding to the target image based on the base layer and the third detail layer through the chip; the tone mapping image is displayed through the display of the image processing device 10 (e.g., an in-vehicle device), or the tone mapping image is sent to the terminal 20 through the image processing device 10 (e.g., a camera), and displayed through the display of the terminal 20.

[0064] It is understood that the above is only one example, and this embodiment is not limited here.

[0065] Terminals include, but are not limited to, smartphones, mobile phone emulators, tablets, laptops, digital broadcast receivers, MIDs (Mobile Internet Devices), PDAs (Personal Digital Assistants), smart voice interaction devices, smart home appliances, and in-vehicle terminals.

[0066] The aforementioned networks may include, but are not limited to, wired networks and wireless networks. Wired networks include local area networks (LANs), metropolitan area networks (MANs), and wide area networks (WANs). Wireless networks include Bluetooth, Wi-Fi, and other networks that enable wireless communication. Specific details can be determined based on actual application scenario requirements and are not limited here.

[0067] See Figure 2 , Figure 2 This illustration shows a flowchart of an image processing method provided in an embodiment of this application. This method can be executed by any electronic device, such as an image processing device. As an optional implementation, the method can be executed by an image processing device. For ease of description, in the following description of some optional embodiments, an image processing device will be used as the execution subject of the method. Figure 2 As shown, the image processing method provided in this application includes the following steps:

[0068] S201, acquire the target image.

[0069] Specifically, the image processing device can acquire a target image through a sensor, and the target image can be a color image or a grayscale image.

[0070] In S202, a base layer and a first detail layer of the target image are determined, the base layer is used to represent the overall structure of the target image, and the first detail layer is used to represent the detailed texture of the target image.

[0071] Specifically, the formula (1) for calculating the luminance image I of the target image src is as follows:

[0072]

[0073] wherein src r represents the R (Red) channel of src, src g represents the G (Green) channel of src, and src b represents the B (Blue) channel of src.

[0074] The luminance image I is input into a low-pass filter LPF (*), which can be a local filter or a global filter; by layering through the low-pass filter LPF (*), a base layer B that retains the overall structure of the image and has smooth details, and a detail layer D (the first detail layer) that is rich in detailed texture can be determined, and the formula (2) and the formula (3) for calculating the base layer B and the detail layer D are as follows:

[0075] B = LPF (I) formula (2)

[0076] D = I-B formula (3)

[0077] In S203, a second detail layer is determined by performing a detail enhancement process on the first detail layer.

[0078] Specifically, the detail enhancement process includes linear detail enhancement, nonlinear detail enhancement, etc.; the linear detail enhancement mainly linearly magnifies the first detail layer D by k1 times to obtain the second detail layer D', and the formula (4) for calculating the second detail layer D' is as follows:

[0079] D' = k1 x D formula (4)

[0080] wherein k1 ≥ 1; the formula (4) indicates that the degree of linear detail enhancement is only related to the magnification coefficient k1.

[0081] The nonlinear detail enhancement is realized through the magnification coefficient k1 and an S-shaped curve together to obtain the second detail layer D', and the formula (5) and the formula (6) for calculating the second detail layer D' are as follows:

[0082] D s = Scurve (D) Formula (5)

[0083] D' = k1 x D s Formula (6)

[0084] wherein, since the detail layer D has positive details and negative details, S curve (*) The curve is a symmetric curve; the S-shaped curve is as shown in Figure 3 When D≥0, the S-shaped curve is similar to the gamma curve; at a smaller D, the S-shaped curve increases at a larger amplitude; at a larger D, the S-shaped curve increases at a smaller amplitude.

[0085] S204, performing noise and halo suppression on the second detail layer D' to determine a third detail layer D".

[0086] Specifically, the second detail layer is subjected to noise suppression and halo suppression to determine the third detail layer.

[0087] S205, determining a tone mapping image corresponding to the target image based on the base layer and the third detail layer.

[0088] Specifically, the base layer B and the third detail layer D" are subjected to fusion processing to obtain a luminance map T; the formula (7) for calculating the luminance map T is as follows:

[0089] T = k2 x B + D" Formula (7)

[0090] wherein, k2 ∈ (0, 1), and the local contrast and details are improved through enhancement of the details.

[0091] After the luminance map T is calculated, the luminance map T can be subjected to linear stretching for further improving the contrast of the overall luminance map.

[0092] If the target image is a grayscale image, the luminance map T is taken as the tone mapping image corresponding to the target image; if the target image is a color image, the luminance map T is subjected to color correction processing to obtain the tone mapping image corresponding to the target image.

[0093] If the target image is a color image, the luminance map T is subjected to color correction processing to obtain a tone-mapped image (the tone mapping image corresponding to the target image); the formula (8) for the color correction processing is as follows:

[0094]

[0095] wherein, out c represents the tone mapping image corresponding to the target image, c represents a color channel of the target image, r is a color correction coefficient, and r ∈ (0, 1); the greater the r, the more severe the color correction; the smaller the r, the closer the target image to a grayscale image.

[0096] In the embodiments of the present application, a target image is acquired; a base layer and a first detail layer of the target image are determined, the base layer is used to represent the overall structure of the target image, and the first detail layer is used to represent the detailed texture of the target image; the first detail layer is subjected to a detail enhancement processing to determine a second detail layer; the second detail layer is subjected to a noise halo suppression processing to determine a third detail layer; a tone mapping image corresponding to the target image is determined based on the base layer and the third detail layer; in this way, the noise amplification and halo effect caused by the detail enhancement in the tone mapping based on layer decomposition can be effectively suppressed, and the tone mapping image has a better visual effect.

[0097] In one embodiment, the noise halo suppression processing is performed on the second detail layer to determine the third detail layer, including:

[0098] If the noise variance of the target image is less than or equal to a preset variance threshold, the third detail layer is determined based on the second detail layer, a preset first parameter and a preset second parameter;

[0099] If the noise variance of the target image is greater than the preset variance threshold, the third detail layer is determined based on the first detail layer, the second detail layer and a preset third parameter.

[0100] Specifically, if the target image contains less noise (the noise variance of the target image is less than or equal to a preset variance threshold), after layering by the low-pass filter LPF(*), the detail layer also contains less noise components, and therefore, the main reason for the poor image visual effect after the detail enhancement is the halo effect. According to the formula (4), the formula (5) and the formula (6), the essence of the two kinds of detail enhancement (linear detail enhancement and nonlinear detail enhancement) is to increase the amplitude of the detail layer to achieve the purpose of detail enhancement, and the detail layer D (the first detail layer) has positive details and negative details; if the noise variance of the target image is less than or equal to a preset variance threshold, the third detail layer D" is determined based on the second detail layer D', a preset first parameter a1 and a preset second parameter a2. The calculation formula (9) of the third detail layer D" is as follows:

[0101]

[0102] It should be noted that a1 and a2 are explained as follows:

[0103] (1) a1∈(0, 1), because halo is caused by over-enhancement of positive details in the detail layer, and because the essence of the two kinds of detail enhancement is to increase the amplitude of the detail layer to achieve the purpose of detail enhancement, therefore, by setting a1 to scale the value of D' after detail enhancement, for the part of the details that will cause halo, after scaling, the positive amplitude enhancement transition of D' can be weakened, thereby achieving the purpose of halo suppression.

[0104] (2) a2≥0, because over-enhancement of negative details in the detail layer will present black edges at the edges of the image, by appropriately increasing the negative details, the local contrast of the image can be increased, and the image perception can be improved. When the negative details are too large, black edges will occur at the edges, which will also affect the image quality. By setting a2∈(0, 1), the black edges can be scaled. When it is necessary to further increase the negative details to improve the perception, a2>1 can be set to further expand the negative details.

[0105] Specifically, if the target image contains more noise (the noise variance of the target image is greater than a preset variance threshold), after being layered by the low-pass filter LPF(*), the detail layer also contains more noise components, therefore, after detail enhancement, the main reason for poor image perception is the amplified noise and halo effect. Since there is generally no separate noise reduction step in tone mapping, the purpose of noise processing is to keep the target image noise from being amplified.

[0106] According to the detail layer D (the first detail layer) and the detail layer D' after detail enhancement (the second detail layer), it can be determined that D contains the noise and details of the target image, but the details are not enhanced, and cannot achieve the purpose of local contrast and detail enhancement; the details in D' are nonlinearly enhanced, but the noise and halo effect are also enhanced at the same time, which will directly affect the image quality and visual perception; D and D' complement each other and are fused with each other, which can meet the requirements, therefore, the advantages of D and D' can be selected by the trapezoidal curve as shown in Figure 4 If the noise variance of the target image is greater than the preset variance threshold, a third detail layer D'' is determined based on the first detail layer D, the second detail layer D', and a preset third parameter w. The calculation formula (10) of the third detail layer D'' is as follows:

[0107] D'' = w × D + (1 - w) × D' Formula (10)

[0108] wherein, wherein the value of x is consistent with the range of |D|, x is an independent variable, and |D| represents the absolute value of D; th1 and th2 are two threshold values, th1≤th2, and th1 and th2 are used to determine whether D or D' is selected.

[0109] It should be noted that the setting of the threshold values th1 and th2 is explained in detail as follows:

[0110] (1) Since the noise is relatively small structure compared with the details, in the small structure part of |D|, it is desired that the final noise is not amplified from the original level, thus, when |D|≤th1, w=1, at this time D"=D, which means that D" will be consistent with D when the amplitude of D is small.

[0111] (2) The part with large value in |D| is usually the structural information in the image, which is more prominent in the image, and it is desired that this part can be enhanced, thus, when |D|≥th2, w=0, at this time D"=D', which means that D" will be consistent with D' when the amplitude of D is large.

[0112] (3) The part in |D| between the details and the structure is usually the place where halo effect is most likely to occur, thus, when th1

[0113] In an embodiment, if the noise variance of the target image is less than or equal to a preset variance threshold, a third detail layer is determined based on the second detail layer, a preset first parameter and a preset second parameter, including:

[0114] If the noise variance of the target image is less than or equal to the preset variance threshold, and the value of the second detail layer is greater than or equal to a detail layer threshold, the third detail layer is obtained based on the product between the second detail layer and the preset first parameter.

[0115] If the noise variance of the target image is less than or equal to the preset variance threshold, and the value of the second detail layer is less than the detail layer threshold, the third detail layer is obtained based on the product between the second detail layer and the preset second parameter.

[0116] Specifically, as shown in formula (9), if the noise variance of the target image is less than or equal to the preset variance threshold, and the value of the second detail layer D' is greater than or equal to the detail layer threshold 0, the third detail layer D" is obtained based on the product between the second detail layer D' and the preset first parameter a1; if the noise variance of the target image is less than or equal to the preset variance threshold, and the value of the second detail layer D' is less than the detail layer threshold 0, the third detail layer D" is obtained based on the product between the second detail layer D' and the preset second parameter a2.

[0117] In one embodiment, the preset first parameter is used for halo suppression of positive details in the second detail layer, and the preset second parameter is used for increasing negative details in the second detail layer.

[0118] Specifically, as shown in equation (9), the preset first parameter a1 is used for halo suppression of positive details in the second detail layer, and the preset second parameter a2 is used for increasing negative details in the second detail layer.

[0119] In one embodiment, if the noise variance of the target image is greater than a preset variance threshold, a third detail layer is determined based on the first detail layer, the second detail layer, and a preset third parameter.

[0120] If the noise variance of the target image is greater than a preset variance threshold, a third detail layer is determined based on a product between the first detail layer and the preset third parameter, a product between the second detail layer and the preset third parameter, and the second detail layer.

[0121] Specifically, as shown in equation (10), if the noise variance of the target image is greater than a preset variance threshold, a third detail layer D" is determined based on a product between the first detail layer D and a preset third parameter w, a product between the second detail layer D' and the preset third parameter w, and the second detail layer D'.

[0122] In one embodiment, the preset third parameter is used for noise suppression and halo suppression of the second detail layer.

[0123] Specifically, as shown in equation (10), the preset third parameter w is used for noise suppression and halo suppression of the second detail layer.

[0124] In one embodiment, the base layer and the first detail layer of the target image are determined, including:

[0125] A first luminance map corresponding to the target image is determined.

[0126] The first luminance map is input into a preset low-pass filter to obtain the base layer and the first detail layer of the target image.

[0127] Specifically, as shown in equation (1), a first luminance map I corresponding to the target image is determined; as shown in equations (2) and (3), the first luminance map I is input into a preset low-pass filter LPF(*) to obtain the base layer B and the first detail layer D of the target image.

[0128] In one embodiment, the first detail layer is subjected to detail enhancement processing to determine a second detail layer, including:

[0129] The first detail layer is subjected to linear detail enhancement processing or nonlinear detail enhancement processing based on a preset amplification coefficient to obtain the second detail layer.

[0130] Specifically, as shown in formula (4), the first detail layer is subjected to linear detail enhancement processing based on a preset amplification coefficient k1 to obtain a second detail layer D'.

[0131] In one embodiment, based on the base layer and the third detail layer, a tone mapping image corresponding to the target image is determined, including:

[0132] Based on the base layer, the third detail layer and a preset proportion coefficient, the base layer and the third detail layer are fused to obtain a second luminance map;

[0133] If the target image is a grayscale image, the second luminance map is taken as the tone mapping image corresponding to the target image.

[0134] If the target image is a color image, the second luminance map is subjected to color correction processing to obtain the tone mapping image corresponding to the target image.

[0135] Specifically, as shown in formula (7), based on the base layer B, the third detail layer D" and a preset proportion coefficient k2, the base layer B and the third detail layer D" are fused to obtain a second luminance map T; if the target image is a grayscale image, the second luminance map T is taken as the tone mapping image corresponding to the target image; if the target image is a color image, as shown in formula (8), the second luminance map T is subjected to color correction processing to obtain the tone mapping image out corresponding to the target image. c .

[0136] The embodiments of the present application have at least the following beneficial effects:

[0137] The noise amplification and halo effect caused by detail enhancement in tone mapping can be effectively suppressed, so that the tone mapping image has better visual effect, and only a small amount of calculation is needed to achieve the effect; in hardware implementation, a small amount of hardware resources can achieve noise amplification suppression and halo effect suppression; for halo effect caused by poor layer decomposition quality, even if the edge-preserving performance of the low-pass filter used is not very strong, noise amplification and halo effect can be well suppressed, and better image quality can be obtained.

[0138] In order to better understand the method provided by the embodiments of the present application, the scheme of the embodiments of the present application will be further described below in combination with specific application scenarios.

[0139] In one specific application scenario embodiment, for example, in an image processing scenario, referring to Figure 5 , a processing flow of an image processing method is shown, as Figure 5As shown, the processing flow of the image processing method provided by the embodiments of the present application includes the following steps:

[0140] S501, determine the brightness map I of the target image.

[0141] Specifically, as shown in formula (1), determine the brightness map I corresponding to the target image src.

[0142] S502, input the brightness map I to a low-pass filter, and obtain a base layer and a first detail layer through low-pass filter layer decomposition.

[0143] Specifically, as shown in formula (2) and formula (3), input the brightness map I to a low-pass filter LPF (*), and obtain the base layer B and the first detail layer D of the target image src through LPF layer decomposition (as shown in formula (2) and formula (3)). Figure 6

[0144] S503, perform detail enhancement processing on the first detail layer to obtain a second detail layer.

[0145] Specifically, as shown in formula (4), based on a preset amplification coefficient k1, perform linear detail enhancement processing (as shown in formula (4)) on the first detail layer D to obtain a second detail layer D'. Figure 6 Figure 6 As shown in formula (5) and formula (6), based on a preset amplification coefficient k1, perform nonlinear detail enhancement processing (as shown in formula (5) and formula (6)) on the first detail layer D to obtain a second detail layer D'.

[0146] S504, perform noise halo suppression on the second detail layer to obtain a third detail layer.

[0147] Specifically, as shown in formula (9), if the noise variance of the target image src is less than or equal to a preset variance threshold, and the value of the second detail layer D' is greater than or equal to a detail layer threshold 0, then based on the product between the second detail layer D' and a preset first parameter a1, obtain a third detail layer D"; if the noise variance of the target image src is less than or equal to a preset variance threshold, and the value of the second detail layer D' is less than a detail layer threshold 0, then based on the product between the second detail layer D' and a preset second parameter a2, obtain a third detail layer D".

[0148] As shown in formula (10), if the noise variance of the target image src is greater than a preset variance threshold, then based on the product between the first detail layer D and a preset third parameter w, the product between the second detail layer D' and the preset third parameter w, and the second detail layer D', determine a third detail layer D".

[0149] S505, fuse the third detail layer with the base layer B to obtain a brightness map T.

[0150] ​​Specifically, as shown in formula (7), based on the base layer B, the third detail layer D" and the preset proportion coefficient k2, the base layer B and the third detail layer D" are fused (as shown in formula (7)) to obtain the luminance map T. Figure 6

[0151] S506, if the target image is a gray image, the luminance map T is taken as the tone mapping image corresponding to the target image; if the target image is a color image, the luminance map T is subjected to color correction processing to obtain the tone mapping image corresponding to the target image.

[0152] Specifically, if the target image src is a gray image, the luminance map T is taken as the tone mapping image corresponding to the target image src; if the target image src is a color image, as shown in formula (8), the luminance map T is subjected to color correction processing to obtain the tone mapping image out corresponding to the target image src. c .

[0153] It should be noted that the tone mapping based on layer decomposition (tone mapping algorithm) includes a single-scale algorithm and a multi-scale algorithm. The single-scale algorithm only divides the target image src into two layers, which are the base layer B and the detail layer D, i.e. src=B+D. The multi-scale algorithm divides the target image src into multiple layers, for example, the multi-scale algorithm divides the target image src into three layers, i.e. the target image src is divided into a base layer B1 and a detail layer D1, and the base layer B1 is divided into a base layer B2 and a detail layer D2, i.e. src=B1+D1, B1=B2+D2; and more than three layers are divided in the same way.

[0154] For another example, the luminance map I of the target image src is determined; the luminance map I is input into a low-pass filter LPF, and the base layer B2, the detail layer D1 and the detail layer D2 are obtained through LPF layer decomposition, i.e. the target image src is divided into three layers; the detail layer D1 is subjected to detail enhancement processing to obtain the detail layer D1', and the detail layer D2 is subjected to detail enhancement processing to obtain the detail layer D2'; the detail layer D1' and the detail layer D2' are subjected to noise and halo suppression respectively to obtain the detail layer D1" and the detail layer D2"; and the base layer B2, the detail layer D1" and the detail layer D2" are fused to obtain the luminance map T.

[0155] By applying the embodiments of the present application, the following beneficial effects can be achieved:

[0156] The noise amplification and halo effect caused by detail enhancement in tone mapping can be effectively suppressed, so that the tone mapping image has better visual effect and can be realized with very little calculation; in hardware implementation, very little hardware resource can achieve noise amplification suppression and halo effect suppression; for halo effect caused by poor layer decomposition quality, even if the edge-preserving performance of the low-pass filter used is not very strong, noise amplification and halo effect can be well suppressed, and better image quality can be obtained.​

[0157] The embodiment of the present application further provides an image processing device, a structural schematic diagram of which is shown as Figure 7 The image processing device 70 comprises a first processing module 701, a second processing module 702, a third processing module 703, a fourth processing module 704 and a fifth processing module 705.

[0158] The first processing module 701 is used for acquiring a target image.

[0159] The second processing module 702 is used for determining a base layer and a first detail layer of the target image, wherein the base layer is used for representing an overall structure of the target image, and the first detail layer is used for representing a detail texture of the target image.

[0160] The third processing module 703 is used for performing a detail enhancement processing on the first detail layer to determine a second detail layer.

[0161] The fourth processing module 704 is used for performing a noise halo suppression processing on the second detail layer to determine a third detail layer.

[0162] The fifth processing module 705 is used for determining a tone mapping image corresponding to the target image based on the base layer and the third detail layer.

[0163] In one embodiment, the fourth processing module 704 is specifically used for:

[0164] If a noise variance of the target image is less than or equal to a preset variance threshold, the third detail layer is determined based on the second detail layer, a preset first parameter and a preset second parameter.

[0165] If the noise variance of the target image is greater than the preset variance threshold, the third detail layer is determined based on the first detail layer, the second detail layer and a preset third parameter.

[0166] In one embodiment, the fourth processing module 704 is specifically used for:

[0167] If the noise variance of the target image is less than or equal to the preset variance threshold and a value of the second detail layer is greater than or equal to a detail layer threshold, the third detail layer is obtained based on a product between the second detail layer and the preset first parameter.

[0168] If the noise variance of the target image is less than or equal to the preset variance threshold and the value of the second detail layer is less than the detail layer threshold, the third detail layer is obtained based on a product between the second detail layer and the preset second parameter.

[0169] In one embodiment, the preset first parameter is used for halo suppression on positive details in the second detail layer, and the preset second parameter is used for increasing negative details in the second detail layer.

[0170] In one embodiment, the fourth processing module 704 is specifically configured to:

[0171] If the noise variance of the target image is greater than the preset variance threshold, a third detail layer is determined based on a product between the first detail layer and a preset third parameter, a product between the second detail layer and the preset third parameter, and the second detail layer.

[0172] In one embodiment, the preset third parameter is used to perform noise suppression and halo suppression on the second detail layer.

[0173] In one embodiment, the second processing module 702 is specifically configured to:

[0174] determine a first luminance map corresponding to the target image;

[0175] input the first luminance map into a preset low-pass filter to obtain a base layer and a first detail layer of the target image.

[0176] In one embodiment, the third processing module 703 is specifically configured to:

[0177] perform linear detail enhancement processing or nonlinear detail enhancement processing on the first detail layer based on a preset amplification coefficient to obtain a second detail layer.

[0178] In one embodiment, the fifth processing module 705 is specifically configured to:

[0179] perform fusion processing on the base layer and the third detail layer based on the base layer, the third detail layer, and a preset proportion coefficient to obtain a second luminance map;

[0180] if the target image is a grayscale image, the second luminance map is taken as a tone mapping image corresponding to the target image;

[0181] if the target image is a color image, the second luminance map is subjected to color correction processing to obtain a tone mapping image corresponding to the target image.

[0182] The embodiments of the present application have at least the following beneficial effects:

[0183] obtain a target image; determine a base layer and a first detail layer of the target image, the base layer being used to represent the overall structure of the target image and the first detail layer being used to represent the detail texture of the target image; perform detail enhancement processing on the first detail layer to determine a second detail layer; perform noise and halo suppression processing on the second detail layer to determine a third detail layer; and determine a tone mapping image corresponding to the target image based on the base layer and the third detail layer; in this way, noise amplification and halo effect caused by detail enhancement in tone mapping based on layer decomposition can be effectively suppressed, and the tone mapping image has better visual effect.

[0184] This application also provides an electronic device, the structural schematic diagram of which is shown below. Figure 8 As shown, Figure 8 The illustrated electronic device 4000 includes a processor 4001 and a memory 4003. The processor 4001 and the memory 4003 are connected, for example, via a bus 4002. Optionally, the electronic device 4000 may further include a transceiver 4004, which can be used for data interaction between the electronic device and other electronic devices, such as sending and / or receiving data. It should be noted that in practical applications, the transceiver 4004 is not limited to one type, and the structure of the electronic device 4000 does not constitute a limitation on the embodiments of this application.

[0185] Processor 4001 may be a CPU (Central Processing Unit), a general-purpose processor, a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Gate Array), or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It can implement or execute the various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure of this application. Processor 4001 may also be a combination that implements computational functions, such as including one or more microprocessor combinations, a combination of a DSP and a microprocessor, etc.

[0186] Bus 4002 may include a pathway for transmitting information between the aforementioned components. Bus 4002 may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. Bus 4002 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0187] The memory 4003 can be a ROM (Read Only Memory) or other type of static storage device that can store static information and instructions, a RAM (Random Access Memory) or other type of dynamic storage device that can store information and instructions, an EEPROM (Electrically Erasable Programmable Read Only Memory), a CD-ROM (Compact Disc Read Only Memory) or other optical disk storage, a magnetic disk storage or other magnetic storage devices, or any other medium capable of storing computer instructions and capable of being read by a computer, without limitation.

[0188] The memory 4003 is configured to store a computer program for implementing the embodiments of the present application, and the processor 4001 is configured to control the execution of the computer program stored in the memory 4003. The processor 4001 is configured to execute the computer program stored in the memory 4003 to implement the steps shown in the foregoing method embodiments.

[0189] The electronic device includes, but is not limited to, an image processing device, and the like.

[0190] The embodiments of the present application have at least the following beneficial effects:

[0191] The target image is acquired, and a base layer and a first detail layer of the target image are determined. The base layer is used to represent the overall structure of the target image, and the first detail layer is used to represent the detail texture of the target image. The first detail layer is subjected to a detail enhancement process to determine a second detail layer. The second detail layer is subjected to a noise and halo suppression process to determine a third detail layer. A tone mapping image corresponding to the target image is determined based on the base layer and the third detail layer. In this way, the noise amplification and halo effect caused by the detail enhancement in the tone mapping based on layer decomposition can be effectively suppressed, and the tone mapping image has better visual effects.

[0192] The embodiments of the present application provide a computer readable storage medium, and the computer readable storage medium stores a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.

[0193] The embodiments of the present application also provide a computer program product, and the computer program product includes a computer program. When the computer program is executed by a processor, the steps and corresponding contents of the foregoing method embodiments can be implemented.

[0194] Based on the same principle as the method provided in the embodiments of the present application, the embodiments of the present application also provide a computer program product or computer program, which comprises computer instructions stored in a computer readable storage medium. The processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to perform the method provided in any of the optional embodiments of the present application.

[0195] It should be understood that, although the flowcharts of the embodiments of the present application indicate the implementation order of each operation step by arrows, the implementation order of these steps is not limited to the order indicated by the arrows. Unless otherwise specified herein, in some implementation scenarios of the embodiments of the present application, the implementation steps in each flowchart can be executed in other orders as required. In addition, part or all of the steps in each flowchart can include multiple sub-steps or multiple stages based on the actual implementation scenario. Part or all of these sub-steps or stages can be executed at the same time, and each of these sub-steps or stages can also be executed at different times. In the scenario where the execution times are different, the execution order of these sub-steps or stages can be flexibly configured as required, and the embodiments of the present application do not limit this.

[0196] The above is only an optional implementation of some implementation scenarios of the present application. It should be pointed out that, for those skilled in the art, other similar implementation means based on the technical concept of the present application can also be adopted without departing from the technical concept of the present application, and these also belong to the protection scope of the embodiments of the present application.

Claims

1. An image processing method, characterized by, The method comprises: obtaining a target image; determining a base layer and a first detail layer of the target image, the base layer being used to represent the overall structure of the target image, and the first detail layer being used to represent the detailed texture of the target image; performing a detail enhancement process on the first detail layer to determine a second detail layer; performing a noise and halo suppression process on the second detail layer to determine a third detail layer; determining a tone mapping image corresponding to the target image based on the base layer and the third detail layer; the noise and halo suppression process on the second detail layer to determine a third detail layer comprises: if the noise variance of the target image is less than or equal to a preset variance threshold, determining the third detail layer based on the second detail layer, a preset first parameter and a preset second parameter; if the noise variance of the target image is greater than the preset variance threshold, determining the third detail layer based on the first detail layer, the second detail layer and a preset third parameter; the determination of the tone mapping image corresponding to the target image based on the base layer and the third detail layer comprises: performing a fusion process on the base layer and the third detail layer based on the base layer, the third detail layer and a preset proportion coefficient to obtain a second luminance map; if the target image is a grayscale image, taking the second luminance map as the tone mapping image corresponding to the target image; if the target image is a color image, performing a color correction process on the second luminance map to obtain the tone mapping image corresponding to the target image.

2. The method of claim 1, wherein, the determination of the third detail layer based on the second detail layer, the preset first parameter and the preset second parameter when the noise variance of the target image is less than or equal to the preset variance threshold comprises: if the noise variance of the target image is less than or equal to the preset variance threshold and the value of the second detail layer is greater than or equal to a detail layer threshold, obtaining the third detail layer based on the product between the second detail layer and the preset first parameter; if the noise variance of the target image is less than or equal to the preset variance threshold and the value of the second detail layer is less than the detail layer threshold, obtaining the third detail layer based on the product between the second detail layer and the preset second parameter.

3. The method of claim 2, wherein, the preset first parameter is used for halo suppression of positive details in the second detail layer, and the preset second parameter is used for increasing negative details in the second detail layer.

4. The method of claim 1, wherein, the determination of the third detail layer based on the first detail layer, the second detail layer and the preset third parameter when the noise variance of the target image is greater than the preset variance threshold comprises: if the noise variance of the target image is greater than the preset variance threshold, determining the third detail layer based on the product between the first detail layer and the preset third parameter, the product between the second detail layer and the preset third parameter, and the second detail layer.

5. The method of claim 4, wherein, the preset third parameter is used for noise suppression and halo suppression of the second detail layer.

6. The method of claim 1, wherein, the determination of the base layer and the first detail layer of the target image comprises: determining a first luminance map corresponding to the target image; The first luminance map is input into a preset low-pass filter to obtain a base layer and a first detail layer of the target image.

7. The method of claim 1, wherein, The first detail layer is subjected to a detail enhancement process to determine a second detail layer, including: The first detail layer is subjected to linear or nonlinear detail enhancement processing based on a preset amplification coefficient to obtain a second detail layer.

8. An image processing apparatus characterized by comprising: including: The first processing module is configured to acquire a target image. The second processing module is configured to determine a base layer and a first detail layer of the target image, the base layer being used to represent the overall structure of the target image, and the first detail layer being used to represent the detailed texture of the target image. The third processing module is configured to subject the first detail layer to a detail enhancement process to determine a second detail layer. The fourth processing module is configured to subject the second detail layer to noise and halo suppression processing to determine a third detail layer. The fifth processing module is configured to determine a tone mapping image corresponding to the target image based on the base layer and the third detail layer. The fourth processing module is specifically configured to: If the noise variance of the target image is less than or equal to a preset variance threshold, determine a third detail layer based on the second detail layer, a preset first parameter, and a preset second parameter. If the noise variance of the target image is greater than the preset variance threshold, determine a third detail layer based on the first detail layer, the second detail layer, and a preset third parameter. The fifth processing module is specifically configured to: Fuse the base layer and the third detail layer based on the base layer, the third detail layer, and a preset proportion coefficient to obtain a second luminance map. If the target image is a grayscale image, the second luminance map is used as the tone mapping image corresponding to the target image. If the target image is a color image, the second luminance map is subjected to color correction processing to obtain the tone mapping image corresponding to the target image.

9. An electronic device comprising a memory, a processor, and a computer program stored on the memory, wherein the computer program comprises instructions that, when executed by the processor, cause the electronic device to perform the method of any one of claims 1-8. The processor executes the computer program to implement the steps of the method of any one of claims 1-7.

10. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-7.

11. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to implement the steps of the method of any one of claims 1-7.

Citation Information

Patent Citations

  • Image enhancement method and device, electronic equipment and medium

    CN112348763A