Method for adjusting image noise, storage medium and electronic device

By acquiring and analyzing the brightness value and noise size of the image area, determining the adjustment status parameters, and dynamically adjusting the noise, the problem of increasing noise caused by brightness adjustment in high-speed mobile scenes is solved, and the image is improved adaptive clarity and signal noise are achieved. Improved.

CN118921560BActive Publication Date: 2025-01-10ZHEJIANG DAHUA TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411408286.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-10
Publication Date
2025-01-10
Estimated Expiration
2044-10-10

Smart Images

  • Figure CN118921560B_ABST
    Figure CN118921560B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a method, storage medium and electronic device for adjusting image noise, comprising: obtaining target brightness values ​​of various regions of a target image, wherein the target image is divided into multiple regions, each region includes at least one pixel, and the target image is an image obtained by adjusting the brightness of an original image; obtaining noise magnitudes of various regions obtained by performing an i-th noise adjustment on the target image, wherein i is an integer greater than or equal to 0; determining adjustment state parameters of various regions according to the target brightness value and the noise magnitude, wherein the adjustment state parameters are used to indicate whether various regions require an i+1th noise adjustment; and when the adjustment state parameters of the target region indicate that the target region requires an i+1th noise adjustment, adjusting the noise magnitude of the target region according to the adjustment state parameters and the target brightness value of the target region, wherein the multiple regions include the target region.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to the field of image processing, and in particular to a method for adjusting image noise, a storage medium and an electronic device. Background Art

[0002] In scenes such as highways or railways, the light in the scene changes frequently due to the high speed of vehicles, and the dynamic range of the images captured by the camera changes frequently. In order to solve this problem, the dark areas are usually brightened or the bright areas are darkened to achieve the balance and unity of the overall picture. However, when using the above processing methods, the noise in the dark areas of the picture will increase. Especially for ordinary cameras, a single clarity noise reduction parameter is obviously not enough to fully take into account multiple scenes.

[0003] To address this problem, the usual approach is to identify the scene and use multiple parameter configuration switches to adapt to clarity and noise reduction. However, such operations depend on the camera development environment. If the camera's on-site environment and development environment are very different, such methods will still not be able to improve the image's signal-to-noise ratio.

[0004] There is currently no effective solution to the above problems. Summary of the invention

[0005] Embodiments of the present invention provide a method for adjusting image noise, a storage medium, and an electronic device, so as to at least solve the problem of increased image noise caused by adjusting the brightness of an image in the related art.

[0006] According to an embodiment of the present invention, a method for adjusting image noise is provided, comprising: obtaining a target brightness value of each region of a target image, wherein the target image is divided into a plurality of regions, each region includes at least one pixel, and the target image is an image obtained by adjusting the brightness of an original image; obtaining a noise size of each region obtained by performing an i-th noise adjustment on the target image, wherein i is an integer greater than or equal to 0, and the noise size of each region obtained by the 0th noise adjustment is the noise size of the target image without the noise adjustment; determining an adjustment state parameter of each region according to the target brightness value and the noise size, wherein the adjustment state parameter is used to indicate whether each region requires an i+1th noise adjustment; and in a case where the adjustment state parameter of a target region indicates that the target region requires an i+1th noise adjustment, adjusting the noise size of the target region according to the adjustment state parameter of the target region and the target brightness value, wherein a plurality of regions include the target region.

[0007] In an exemplary embodiment, determining the adjustment state parameters of each of the regions according to the brightness value and the noise size includes: acquiring the original brightness value of each of the regions of the original image; determining the adjustment state parameters of each of the regions according to the original brightness value and the target brightness value, and / or the noise size of each of the regions.

[0008] In an exemplary embodiment, the adjustment state parameters of each of the areas are determined based on the original brightness value and the target brightness value, and / or the noise level of each of the areas, including: determining the difference between the target brightness value and the original brightness value of each of the areas to obtain the brightness difference of each of the areas; determining the adjustment state parameters of each of the areas based on the relationship between the brightness difference and a preset brightness threshold range, and / or the relationship between the noise level and a preset noise threshold range.

[0009] In an exemplary embodiment, the adjustment state parameter of each of the regions is determined according to the relationship between the brightness difference value and the preset brightness threshold range, and / or the relationship between the noise level and the preset noise threshold range, including: performing the following operations on each of the regions, the region performing the following operations is the current region: when the brightness difference value of the current region is greater than or equal to the preset maximum brightness threshold, and the noise level of the current region is greater than or equal to the preset maximum noise threshold, determining that the adjustment state parameter of the current region is a first parameter, wherein the first parameter is used to indicate that the current region requires the i+1th noise adjustment, the preset maximum brightness threshold is the maximum value in the preset brightness threshold range, and the preset maximum noise threshold is the maximum value in the preset a maximum value in a noise threshold range; when the noise size of the current area is within the preset noise threshold range, determining that the adjustment state parameter of the current area is a second parameter, wherein the second parameter is used to indicate that the current area does not need the i+1th noise adjustment; when the brightness difference value of the current area is less than or equal to a preset minimum brightness threshold, and the noise size of the current area is less than or equal to a preset minimum noise threshold, determining that the adjustment state parameter of the current area is a third parameter, wherein the third parameter is used to indicate that the current area needs brightness adjustment, the preset minimum brightness threshold is the minimum value in the preset brightness threshold range, and the preset minimum noise threshold is the minimum value in the preset noise threshold range.

[0010] In an exemplary embodiment, the noise level of the target area is adjusted according to the adjustment state parameter and the target brightness value of the target area, including: determining a target adjustment value of the target area according to the adjustment state parameter and the target brightness value; and adjusting the noise level of the target area according to the target adjustment value.

[0011] In an exemplary embodiment, determining the target adjustment value of the target area according to the adjustment state parameter and the target brightness value includes: determining a target parameter intensity that matches the target brightness value in a first preset relationship table, wherein the first preset relationship table records the correspondence between the brightness value and the parameter intensity; determining a target parameter intensity adjustment step that matches the adjustment state parameter of the target area in a second preset relationship table, wherein the second preset relationship table records the correspondence between the adjustment state parameter and the parameter intensity adjustment step; determining the target adjustment value according to the target parameter intensity and the target parameter intensity adjustment step.

[0012] In an exemplary embodiment, the target adjustment value is determined according to the target parameter intensity and the target parameter intensity adjustment step, including: determining the brightness difference value of the target area as the target brightness difference value, wherein the target brightness difference value is the difference between the original brightness value of the target area and the target brightness value of the target area; determining the maximum value among the brightness values ​​of each of the areas of the target image as the target brightness value, wherein the brightness difference value of the area is the difference between the target brightness value of the area and the original brightness value; determining the target adjustment value according to the target brightness difference value, the target brightness value, the target parameter intensity and the target parameter intensity adjustment step.

[0013] In an exemplary embodiment, the target adjustment value is determined based on the target brightness difference, the target brightness value, the target parameter intensity and the target parameter intensity adjustment step, including: determining the ratio of the target brightness difference to the target brightness value as the target ratio; determining the product of the target parameter intensity adjustment step and the target ratio as the target product value; and determining the sum of the target parameter intensity and the target product value as the target adjustment value.

[0014] According to another embodiment of the present invention, there is provided an apparatus for adjusting image noise, comprising: a first acquisition module, configured to acquire target brightness values ​​of respective regions of a target image, wherein the target image is divided into a plurality of regions, each region comprising at least one pixel, and the target image is an image obtained by adjusting the brightness of an original image; a second acquisition module, configured to acquire noise magnitudes of respective regions obtained by performing an i-th noise adjustment on the target image, wherein i is an integer greater than or equal to 0, and the noise magnitudes of respective regions obtained by the 0th noise adjustment are noise magnitudes of the target image without the noise adjustment; a determination module, configured to determine adjustment state parameters of respective regions according to the target brightness values ​​and the noise magnitudes, wherein the adjustment state parameters are used to indicate whether each region requires an i+1th noise adjustment; and an adjustment module, configured to adjust the noise magnitude of the target region according to the adjustment state parameters of the target region and the target brightness value when the adjustment state parameters of the target region indicate that the target region requires an i+1th noise adjustment, wherein the plurality of regions include the target region.

[0015] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0016] According to yet another embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0017] According to yet another embodiment of the present invention, a computer program product is provided, comprising computer instructions, which implement the steps of any of the above methods when executed by a processor.

[0018] Through the present invention, by obtaining the brightness value of each area of ​​the target image and the noise size of each area of ​​the image after the target image is adjusted for noise, the adjustment state parameters of each area of ​​the target image are determined, so that the noise size of each area of ​​the target image is adjusted according to the adjustment state parameters and the brightness value, so that the image after the dynamic range is improved is evaluated in multiple dimensions through the dynamic range increment and the noise level, and at the same time, according to the evaluation state, the clarity noise reduction parameter intensity of the brightness linkage in the image processing system is adjusted to form adaptive feedback, thereby improving the clarity noise reduction adaptability of the camera in the scene with drastic changes in the high dynamic range. Therefore, the problem of increased image noise caused by brightness adjustment of the image in the related art can be solved, and the effect of reducing image noise can be achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 is a flowchart of a method according to an embodiment of the present invention;

[0020] Figure 2 is a flow chart of a method for adjusting image noise according to an embodiment of the present invention;

[0021] Figure 3 is a flowchart of adaptive noise reduction adjustment according to an embodiment of the present invention;

[0022] Figure 4 4 is a structural block diagram of a device for adjusting image noise according to an embodiment of the present invention. DETAILED DESCRIPTION

[0023] In order to better understand the present invention, some terms in the specific embodiments are explained below:

[0024] Brighten dark areas: Use image processing to increase the brightness of dark areas of the image.

[0025] Darken bright areas: Use image processing to suppress the brightness of overexposed areas of the image.

[0026] Noise: refers to unnecessary or redundant interference information present in image data.

[0027] Signal-to-noise ratio: refers to the ratio of signal to noise in an electronic device or electronic system.

[0028] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings and in combination with the embodiments.

[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.

[0030] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a method for adjusting image noise according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0031] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for adjusting image noise in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0032] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0033] In this embodiment, a method running on the above mobile terminal or network architecture is provided. Figure 2 is a flow chart of a method for adjusting image noise according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0034] Step S202, obtaining a target brightness value of each area of ​​a target image, wherein the target image is divided into a plurality of areas, each area includes at least one pixel point, and the target image is an image obtained by adjusting the brightness of an original image;

[0035] The above-mentioned original image can be an image captured by a mobile terminal, and the mobile terminal can be a mobile phone, a tablet, a camcorder, a camera, etc.; the above-mentioned target image can be an image obtained by adjusting the brightness of the original image by increasing the brightness, reducing the brightness, improving the contrast, etc.; the above-mentioned area can be a part of the target image, wherein each area includes one or more pixels in the target image, and the size of each area can be the same or different. A complete target image can be obtained by splicing the various areas of the target image; the above-mentioned target brightness value is the brightness value of each area of ​​the target image, and the brightness value can be directly read by using the functions provided in image processing libraries such as OpenCV and PIL, or read after normalizing the pixel values ​​(i.e., the values ​​of the pixel points) of each area of ​​the target image. By normalizing the brightness in the image, the brightness of different areas can be kept consistent, so that the overall image looks more unified and balanced, and the brightness difference in the image is eliminated, which is convenient for subsequent processing and analysis.

[0036] Step S204, obtaining the noise magnitude of each of the regions obtained by performing the i-th noise adjustment on the target image, wherein i is an integer greater than or equal to 0, and the noise magnitude of each of the regions obtained by the 0th noise adjustment is the noise magnitude of the target image without the noise adjustment;

[0037] The above noise size can be represented by the ratio of the noise part to the signal part in the image, wherein the noise part refers to the part of the image that represents interference or random changes, and the signal part refers to the part of the image that represents the main information. The higher the ratio, the greater the noise in the image and the worse the image quality. The noise size of the image can be determined by the ratio of the noise part to the signal part in the image; or the noise size of the image can be evaluated by the neighborhood variance estimation method, that is, a neighborhood window of a fixed size, such as 3x3 or 5x5, is selected, and for each pixel in the image, the variance of the pixels in the neighborhood window around the pixel is calculated, and the neighborhood variance values ​​of all pixels are averaged to obtain the average neighborhood variance of the entire image. The noise level of the image is evaluated according to the size of the average neighborhood variance, wherein the larger the average neighborhood variance, the higher the noise level in the image and the worse the image quality. Noise adjustment is performed on the target image, and the noise size of the image is obtained after each adjustment, wherein the target image is the image obtained after the 0th noise adjustment, that is, the image without noise adjustment.

[0038] Step S206, determining an adjustment state parameter of each of the regions according to the target brightness value and the noise level, wherein the adjustment state parameter is used to indicate whether each of the regions requires an (i+1)th noise adjustment;

[0039] The adjustment state parameter may be any form of parameter, such as text, numbers, or letters, etc., used to indicate whether noise adjustment is needed again. Optionally, 0 may be used to indicate an enhanced state, 1 may indicate a non-adjustment state, 2 may indicate an adjustment state, etc. Based on the acquired target brightness value and noise level, it is determined whether to perform the next noise adjustment on the target image.

[0040] Specifically, the original brightness value of each of the regions of the original image is obtained; and the adjustment state parameter of each of the regions is determined according to the original brightness value and the target brightness value, and / or the noise level of each of the regions.

[0041] The above original brightness values ​​are the brightness values ​​of each area of ​​the original image. The brightness values ​​can be directly read by using the functions provided in image processing libraries such as OpenCV and PIL, or read after normalizing the pixel values ​​(i.e., the values ​​of the pixel points) of each area of ​​the target image. By normalizing the brightness in the image, the brightness of different areas can be kept consistent, making the image as a whole look more unified and balanced, eliminating the brightness differences in the image, and facilitating subsequent processing and analysis.

[0042] By calculating the brightness value of the original image and the brightness value of the image after dynamic range processing, the dynamic range increment of a certain point or area can be expressed. At the same time, combined with the noise level of the image, the image after dynamic range enhancement is evaluated in multiple dimensions. According to the evaluation status, the intensity of the clarity noise reduction parameters linked to brightness in the image processing system is adjusted to form adaptive feedback, thereby obtaining a clearer and more informative image, effectively improving the quality and visualization of the image, and enabling the image to better convey information and express intentions.

[0043] Step S208, when the adjustment state parameter of the target area indicates that the target area needs the (i+1)th noise adjustment, adjusting the noise level of the target area according to the adjustment state parameter of the target area and the target brightness value, wherein the multiple areas include the target area.

[0044] The above-mentioned target area can be any area in the target image, and the target area includes one or more pixel points; the noise of the target area is adjusted according to the adjustment state parameters of the target area and the brightness value of the target area. The dynamic range increment and the noise level can be combined to guide the clarity noise reduction adjustment state from multiple dimensions. According to the specific image characteristics and requirements, the noise information in the image can be reduced, the clarity of the image can be increased, and the image can achieve the best effect. At the same time, the clarity noise reduction adaptability of the camera in the scene with drastic changes in the high dynamic range can be improved.

[0045] Specifically, a target adjustment value of the target area is determined according to the adjustment state parameter and the target brightness value; and the noise level of the target area is adjusted according to the target adjustment value.

[0046] Optionally, the executor of the above steps may be a background processor, or other devices with similar processing capabilities, or a machine that integrates at least an image acquisition device and a data processing device, wherein the image acquisition device may include a graphics acquisition module such as a camera, and the data processing device may include a computer, a mobile phone or other terminal, but is not limited thereto.

[0047] Through the above steps, by obtaining the brightness value of each area of ​​the target image and the noise size of each area of ​​the image after the noise adjustment of the target image, the adjustment state parameters of each area of ​​the target image are determined, so that the noise size of each area of ​​the target image is adjusted according to the adjustment state parameters and the brightness value, so that the image after the dynamic range is improved is evaluated in multiple dimensions through the dynamic range increment and the noise level, and at the same time, according to the evaluation state, the intensity of the clarity noise reduction parameter linked to the brightness in the image processing system is adjusted, so as to form adaptive feedback and improve the clarity noise reduction adaptability of the camera in the scene with drastic changes in the high dynamic range. The problem of increased image noise caused by brightness adjustment of the image in the related technology is solved, and the signal-to-noise ratio of the image is improved.

[0048] The execution order of step S202 and step S204 is interchangeable, that is, step S204 may be executed first, and then step S202.

[0049] As an optional implementation, the adjustment state parameters of each of the areas are determined based on the original brightness value and the target brightness value, and / or the noise level of each of the areas, including: determining the difference between the target brightness value and the original brightness value of each of the areas to obtain the brightness difference of each of the areas; determining the adjustment state parameters of each of the areas based on the relationship between the brightness difference and a preset brightness threshold range, and / or the relationship between the noise level and a preset noise threshold range.

[0050] The brightness difference value may be the difference between the brightness of the original image and the brightness of the image after brightness adjustment; the preset brightness threshold range may be the most suitable brightness adjustment range, which may be set according to actual conditions; the preset noise threshold range may be the range of noise levels allowed to exist in the image, which may be set according to actual application needs; the adjustment state parameter may be determined by the relationship between the brightness difference value and the preset brightness threshold range, and / or the relationship between the noise level and the preset noise threshold range, wherein the brightness difference value may be determined by the following formula:

[0051]

[0052] In the formula, is the brightness difference value, is the target brightness value, is the original brightness value.

[0053] As an optional implementation, determining the adjustment state parameter of each of the regions according to the relationship between the brightness difference value and the preset brightness threshold range, and / or the relationship between the noise level and the preset noise threshold range, includes: performing the following operations on each of the regions, the region performing the following operations being the current region: when the brightness difference value of the current region is greater than or equal to a preset maximum brightness threshold, and the noise level of the current region is greater than or equal to a preset maximum noise threshold, determining that the adjustment state parameter of the current region is a first parameter, wherein the first parameter is used to indicate that the current region requires an i+1th noise adjustment, the preset maximum brightness threshold is the maximum value in the preset brightness threshold range, and the preset maximum noise threshold is the maximum value in the preset Assume the maximum value in the noise threshold range; when the noise size of the current area is within the preset noise threshold range, determine that the adjustment state parameter of the current area is the second parameter, wherein the second parameter is used to indicate that the current area does not need the i+1th noise adjustment; when the brightness difference value of the current area is less than or equal to the preset minimum brightness threshold, and the noise size of the current area is less than or equal to the preset minimum noise threshold, determine that the adjustment state parameter of the current area is the third parameter, wherein the third parameter is used to indicate that the current area needs brightness adjustment, the preset minimum brightness threshold is the minimum value in the preset brightness threshold range, and the preset minimum noise threshold is the minimum value in the preset noise threshold range.

[0054] The first parameter, the second parameter, and the third parameter are parameters in any form, such as text, numbers, or letters, etc., wherein the first parameter is used to indicate that the next noise adjustment is required, the second parameter is used to indicate that the next noise adjustment is not required, and the third parameter is used to indicate that brightness adjustment is required; optionally, the adjustment state parameter can be determined by the following formula:

[0055]

[0056] in, is the adjustment state parameter, 2 is the first parameter, 1 is the second parameter, 0 is the third parameter, is the brightness difference value, is the preset maximum brightness threshold, is the preset minimum brightness threshold, is the noise magnitude, is the preset maximum noise threshold, is the preset minimum noise threshold.

[0057] As an optional implementation, determining the target adjustment value of the target area based on the adjustment state parameter and the target brightness value includes: determining a target parameter intensity that matches the target brightness value in a first preset relationship table, wherein the first preset relationship table records the correspondence between the brightness value and the parameter intensity; determining a target parameter intensity adjustment step that matches the adjustment state parameter of the target area in a second preset relationship table, wherein the second preset relationship table records the correspondence between the adjustment state parameter and the parameter intensity adjustment step; determining the target adjustment value based on the target parameter intensity and the target parameter intensity adjustment step.

[0058] The above parameter intensity can be the degree of change or intensity of the adjustment parameter, that is, the degree of influence of the adjustment parameter on the image brightness. The adjustment parameter can be a parameter used to adjust the image brightness, such as contrast, exposure, etc. The image brightness can be accurately controlled and adjusted through the parameter intensity; the above first preset relationship table can be a record of the relationship between the brightness value and the parameter intensity; the above parameter intensity adjustment step can be the amplitude of each adjustment of the parameter intensity, and the parameter intensity adjustment step can be adjusted according to the experimental requirements. Through the parameter intensity adjustment step, you can choose to gradually increase or decrease the step to adjust the parameter more finely; the above second preset relationship table can be a record of the relationship between the adjustment state parameter and the parameter intensity adjustment step. The target parameter intensity corresponding to the target brightness value is found through the first preset relationship table, and the target parameter intensity adjustment step matching the adjustment state parameter of the target area is found through the second preset relationship table, and the adjustment ratio is determined according to the target parameter intensity and the target parameter intensity adjustment step, so as to adjust the target area. By designing debugging steps of different gradients, the image processing system can perform parameter debugging of different magnitudes with reference, so as to achieve the effect of rapid convergence of the problem area parameters and retention of the normal area effects.

[0059] As an optional implementation, the target adjustment value is determined according to the target parameter intensity and the target parameter intensity adjustment step, including: determining the brightness difference value of the target area as the target brightness difference value, wherein the target brightness difference value is the difference between the original brightness value of the target area and the target brightness value of the target area; determining the maximum value among the brightness values ​​of each of the areas of the target image as the target brightness value, wherein the brightness difference value of the area is the difference between the target brightness value of the area and the original brightness value; determining the target adjustment value according to the target brightness difference value, the target brightness value, the target parameter intensity and the target parameter intensity adjustment step.

[0060] The above-mentioned target brightness difference value can be the brightness difference value of the target area, that is, the difference between the brightness of the target area in the original image and the brightness of the target area in the target image; the above-mentioned target brightness value can be the maximum brightness value in the target area in the target image, that is, the value of the pixel with the maximum brightness; the target adjustment value of the target area can be determined according to the target brightness difference value, the target brightness value, the target parameter intensity and the target parameter intensity adjustment step.

[0061] Specifically, the ratio of the target brightness difference value to the target brightness value is determined as the target ratio; the product of the target parameter intensity adjustment step and the target ratio is determined as the target product value; and the sum of the target parameter intensity and the target product value is determined as the target adjustment value.

[0062] As an optional implementation, the target adjustment value may be determined by the following formula:

[0063]

[0064]

[0065] in, is the target ratio, is the target brightness difference, is the target brightness value, is the target adjustment value, is the target parameter strength, is the target parameter intensity adjustment step size.

[0066] As an optional implementation, you can set the upper limit of parameter strength and lower limit Parameter overshoot protection is performed on noise adjustment to ensure that the system operates within the set range. When the parameter exceeds the set upper or lower limit, the system will automatically adjust or issue an alarm to avoid overloading or damaging the equipment. Effectively protect the system from unnecessary damage, extend the service life of the equipment, and improve the stability and reliability of the system.

[0067] As an optional implementation, Figure 3 is a flowchart of adaptive noise reduction adjustment according to an embodiment of the present invention. Figure 3 As shown, the specific process includes:

[0068] S1, dynamic range increment (brightness), noise estimation: through data processing, calculate the change in brightness dimension between the original image and the image after dynamic range processing (i.e., the target image), and express the dynamic range stretching of a certain point or a certain area; through neighborhood variance estimation, evaluate the noise size of the image after dynamic range processing and the noise size of the image after noise adjustment;

[0069] S2, multi-dimensional adjustment state judgment: set the preset brightness threshold range and the preset noise threshold range, and distinguish the dynamic range increment and noise level calculated in S1 into high, medium and low. For the area with high dynamic range increment and noise level, output the adjustment state parameter 2; for the area with medium noise level, output the adjustment state parameter 1; for the area with low dynamic range increment and noise level, output the adjustment state parameter 0, as follows:

[0070]

[0071] in, is the adjustment state parameter, 2 is the first parameter, 1 is the second parameter, 0 is the third parameter, is the brightness difference value, is the preset maximum brightness threshold, is the preset minimum brightness threshold, is the noise magnitude, is the preset maximum noise threshold, is the preset minimum noise threshold;

[0072] S3, multi-level parameter adjustment: It is divided into two operations: parameter generation and parameter restriction.

[0073] The parameter generation is used to link the corresponding target parameter intensity according to the brightness after dynamic range adjustment (i.e., target brightness value), and at the same time, adjust the step length of the target parameter intensity corresponding to the adjustment state parameter index output in S2, and normalize the target brightness difference by the maximum value of the dynamic range increment (i.e., target brightness value) to obtain the adjustment ratio (i.e., target ratio), so as to determine the target adjustment value according to the target ratio, target parameter intensity, and target parameter intensity adjustment step length, and adjust the target image;

[0074] Parameter limit is used to set the upper and lower limits of parameter strength and to protect against parameter overshoot;

[0075] At the same time, the generated parameters are sent to the image processing system through S3 to adjust the image effect. After the adjustment is completed, S1 continues to count the dynamic range increment and noise level of the picture, thus forming a feedback closed loop.

[0076] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course 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 invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0077] In this embodiment, a device for adjusting image noise is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0078] Figure 4 is a structural block diagram of a device for adjusting image noise according to an embodiment of the present invention. Figure 4 As shown, the device includes: a first acquisition module 402, used to acquire target brightness values ​​of each area of ​​a target image, wherein the target image is divided into a plurality of areas, each area includes at least one pixel, and the target image is an image to which brightness is adjusted for the original image; a second acquisition module 404, used to acquire the noise magnitude of each area obtained by performing an i-th noise adjustment on the target image, wherein i is an integer greater than or equal to 0, and the noise magnitude of each area obtained by the 0th noise adjustment is the noise magnitude of the target image without the noise adjustment; a determination module 406, used to determine an adjustment state parameter of each area according to the target brightness value and the noise magnitude, wherein the adjustment state parameter is used to indicate whether each area requires an i+1th noise adjustment; an adjustment module 408, used to adjust the noise magnitude of the target area according to the adjustment state parameter of the target area and the target brightness value when the adjustment state parameter of the target area indicates that the target area requires an i+1th noise adjustment, wherein the plurality of areas include the target area.

[0079] In an exemplary embodiment, the device is also used to obtain the original brightness value of each of the regions of the original image; and determine the adjustment state parameters of each of the regions based on the original brightness value and the target brightness value, and / or the noise level of each of the regions.

[0080] In an exemplary embodiment, the device is also used to determine the difference between the target brightness value and the original brightness value of each of the areas, and obtain the brightness difference value of each of the areas; and determine the adjustment state parameters of each of the areas based on the relationship between the brightness difference value and a preset brightness threshold range, and / or the relationship between the noise size and a preset noise threshold range.

[0081] In an exemplary embodiment, the device is further used to perform the following operations on each of the regions, and the region performing the following operations is the current region: when the brightness difference value of the current region is greater than or equal to a preset maximum brightness threshold, and the noise size of the current region is greater than or equal to the preset maximum noise threshold, determining that the adjustment state parameter of the current region is a first parameter, wherein the first parameter is used to indicate that the current region requires an i+1th noise adjustment, the preset maximum brightness threshold is a maximum value in the preset brightness threshold range, and the preset maximum noise threshold is a maximum value in the preset noise threshold range; when the noise size of the current region is within the preset noise threshold range, determining that the adjustment state parameter of the current region is a second parameter, wherein the second parameter is used to indicate that the current region does not require an i+1th noise adjustment; when the brightness difference value of the current region is less than or equal to a preset minimum brightness threshold, and the noise size of the current region is less than or equal to the preset minimum noise threshold, determining that the adjustment state parameter of the current region is a third parameter, wherein the third parameter is used to indicate that the current region requires brightness adjustment, the preset minimum brightness threshold is the minimum value in the preset brightness threshold range, and the preset minimum noise threshold is the minimum value in the preset noise threshold range.

[0082] In an exemplary embodiment, the device is further configured to determine a target adjustment value of the target area according to the adjustment state parameter and the target brightness value; and adjust the noise level of the target area according to the target adjustment value.

[0083] In an exemplary embodiment, the device is also used to determine a target parameter intensity that matches the target brightness value in a first preset relationship table, wherein the first preset relationship table records the correspondence between the brightness value and the parameter intensity; determine a target parameter intensity adjustment step that matches the adjustment state parameter of the target area in a second preset relationship table, wherein the second preset relationship table records the correspondence between the adjustment state parameter and the parameter intensity adjustment step; and determine the target adjustment value based on the target parameter intensity and the target parameter intensity adjustment step.

[0084] In an exemplary embodiment, the device is also used to determine the brightness difference value of the target area as the target brightness difference value, wherein the target brightness difference value is the difference between the original brightness value of the target area and the target brightness value of the target area; determine the maximum value of the brightness values ​​of each of the areas of the target image as the target brightness value, wherein the brightness difference value of the area is the difference between the target brightness value of the area and the original brightness value; determine the target adjustment value based on the target brightness difference value, the target brightness value, the target parameter intensity and the target parameter intensity adjustment step.

[0085] In an exemplary embodiment, the device is also used to determine the ratio of the target brightness difference value to the target brightness value as the target ratio; determine the product of the target parameter intensity adjustment step and the target ratio as the target product value; and determine the sum of the target parameter intensity and the target product value as the target adjustment value.

[0086] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0087] An embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0088] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.

[0089] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0090] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0091] An embodiment of the present invention further provides a computer program product, including a computer program, which implements the steps of the method described in each embodiment of the present application when executed by a processor.

[0092] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail herein.

[0093] Obviously, those skilled in the art should understand that the above modules or steps of the present invention can be implemented by a general computing device, they can be concentrated on a single computing device, or distributed on a network composed of multiple computing devices, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, and in some cases, the steps shown or described can be executed in a different order than here, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. Thus, the present invention is not limited to any specific combination of hardware and software.

[0094] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for adjusting image noise, characterized in that: include: Acquire a target brightness value of each area of ​​a target image, wherein the target image is divided into a plurality of areas, each area includes at least one pixel, the target image is an image obtained by adjusting the brightness of an original image, and the target brightness value is a maximum value among the brightness values ​​of each area of ​​the target image; Obtaining the noise magnitude of each of the regions obtained by performing the i-th noise adjustment on the target image, wherein i is an integer greater than or equal to 0, and the noise magnitude of each of the regions obtained by the 0-th noise adjustment is the noise magnitude of the target image without the noise adjustment; determining an adjustment state parameter of each of the regions according to the target brightness value and the noise level, wherein the adjustment state parameter is used to indicate whether each of the regions requires an (i+1)th noise adjustment; In a case where the adjustment state parameter of the target area indicates that the target area needs an (i+1)th noise adjustment, determining a target parameter intensity that matches the target brightness value and a target parameter intensity adjustment step that matches the adjustment state parameter of the target area; Determine a difference between an original brightness value of the target area and a target brightness value of the target area as a target brightness difference; Determine a target adjustment value according to the target brightness difference value, the target brightness value, the target parameter intensity and the target parameter intensity adjustment step; The noise level of the target area is adjusted according to the target adjustment value, wherein the plurality of areas include the target area.

2. The method according to claim 1, characterized in that Determining adjustment state parameters of each of the regions according to the brightness value and the noise magnitude includes: Acquire the original brightness value of each area of ​​the original image; The adjustment state parameter of each of the regions is determined according to the original brightness value and the target brightness value, and / or the noise level of each of the regions.

3. The method according to claim 2, characterized in that Determining the adjustment state parameter of each of the regions according to the original brightness value and the target brightness value, and / or the noise level of each of the regions, includes: Determine the difference between the target brightness value and the original brightness value of each of the regions to obtain the brightness difference value of each of the regions; The adjustment state parameters of each of the regions are determined according to the relationship between the brightness difference and a preset brightness threshold range, and / or the relationship between the noise level and a preset noise threshold range.

4. The method according to claim 3, characterized in that Determining the adjustment state parameters of each of the regions according to the relationship between the brightness difference and the preset brightness threshold range, and / or the relationship between the noise level and the preset noise threshold range, includes: The following operations are performed on each of the areas, and the area in which the operations are performed is the current area: When the brightness difference value of the current area is greater than or equal to a preset maximum brightness threshold, and the noise level of the current area is greater than or equal to a preset maximum noise threshold, determining that the adjustment state parameter of the current area is a first parameter, wherein the first parameter is used to indicate that the current area requires an i+1th noise adjustment, the preset maximum brightness threshold is a maximum value in the preset brightness threshold range, and the preset maximum noise threshold is a maximum value in the preset noise threshold range; When the noise level of the current area is within the preset noise threshold range, determining that the adjustment state parameter of the current area is a second parameter, wherein the second parameter is used to indicate that the current area does not require an (i+1)th noise adjustment; When the brightness difference value of the current area is less than or equal to the preset minimum brightness threshold, and the noise level of the current area is less than or equal to the preset minimum noise threshold, it is determined that the adjustment state parameter of the current area is a third parameter, wherein the third parameter is used to indicate that the current area requires brightness adjustment, the preset minimum brightness threshold is the minimum value in the preset brightness threshold range, and the preset minimum noise threshold is the minimum value in the preset noise threshold range.

5. The method according to claim 1, characterized in that Determining a target parameter intensity that matches the target brightness value and a target parameter intensity adjustment step that matches an adjustment state parameter of the target area includes: Determining the target parameter intensity that matches the target brightness value in a first preset relationship table, wherein the first preset relationship table records the corresponding relationship between the brightness value and the parameter intensity; The target parameter intensity adjustment step length that matches the adjustment state parameter of the target area is determined in a second preset relationship table, wherein the second preset relationship table records the corresponding relationship between the adjustment state parameter and the parameter intensity adjustment step length.

6. The method according to claim 1, characterized in that Determining the target adjustment value according to the target brightness difference value, the target brightness value, the target parameter intensity, and the target parameter intensity adjustment step length includes: Determine a ratio of the target brightness difference value to the target brightness value as a target ratio; Determine the product of the target parameter intensity adjustment step length and the target ratio as a target product value; The sum of the target parameter intensity and the target product value is determined as a target adjustment value.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 6 when executed by a processor.

8. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fast image denoising method and apparatus

    CN105005973A

  • Method for reducing image noise, terminal and computer readable storage medium

    CN107948550A