Image processing apparatus, method, electronic device and computer-readable storage medium
By applying different noise reduction levels and brightness gains to each pixel of the image, and combining lens shadow correction and local tone mapping modules to enhance image brightness, the problem of uneven image noise distribution is solved, thus improving image quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-04
- Publication Date
- 2026-04-03
AI Technical Summary
Existing technologies suffer from uneven image noise distribution, making it impossible to balance noise reduction and image clarity.
By applying different noise reduction intensities to each pixel of the image to be denoised, the brightness is enhanced using the lens shadow correction module and the local tone mapping module. The brightness gain information is determined based on the distance between the pixel and the image center or the initial brightness information. The brightness gain information is then integrated with the histogram equalization algorithm for noise reduction processing.
It effectively balances noise reduction and image sharpness, thus improving image quality.
Smart Images

Figure CN115841424B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information processing, and more specifically, to an image processing apparatus, method, electronic device, and computer-readable storage medium. Background Technology
[0002] Image noise refers to unnecessary or redundant interference information present in image data. The presence of noise seriously affects image quality, and therefore it needs to be corrected before image enhancement and classification processing.
[0003] Image acquisition devices typically use image sensors to convert the light signals captured by the lens into analog electrical signals, and then into digital information for subsequent image processing. This process often generates image noise, and reducing image noise usually reduces image sharpness.
[0004] In related technologies, there are schemes that apply different brightness gains to different parts of the original image to improve image brightness. However, this scheme suffers from uneven image noise distribution, making it difficult to balance noise reduction and image sharpness. Summary of the Invention
[0005] The purpose of this application is to provide an image processing apparatus, method, electronic device, and computer-readable storage medium for applying different noise reduction intensities to different pixels of an image to be denoised, thereby balancing noise reduction intensity and image clarity and improving image quality.
[0006] In a first aspect, embodiments of this application provide an image processing apparatus, comprising: an image acquisition module for acquiring an image to be processed; at least one brightness enhancement module for enhancing the brightness of the image to be processed to obtain a denoised image; a determination module for determining brightness gain information for each pixel of the image to be denoised; and at least one denoising module for performing denoising processing on the image to be denoised based on the brightness gain information corresponding to each pixel. In this way, different denoising intensities can be applied to different pixels of the image to be denoised, achieving a balance between denoising intensity and image sharpness, thereby improving image quality.
[0007] Optionally, the at least one brightness enhancement module includes a lens shading correction module; the lens shading correction module is used to: determine the distance information between each pixel of the image to be processed and the center pixel of the image; determine the brightness intensity applied to the pixel based on the distance information between the pixel and the center pixel of the image, thereby obtaining the image to be denoised; and the determining module is specifically used to: determine the brightness gain information corresponding to the pixel according to a first preset rule based on the distance information between the pixel and the center pixel of the image; wherein, the distance information and the brightness gain information in the first preset rule are positively correlated. In this way, the lens shading correction module can enhance the brightness of the image to be processed based on the distance information of pixels from near to far, and the determining module can output the brightness gain information corresponding to each pixel of the image to be denoised, effectively balancing the noise reduction effort and image clarity, and improving image quality.
[0008] Optionally, the at least one brightness enhancement module includes a local tone mapping module; the local tone mapping module is used to: determine the initial brightness information of each pixel in the image to be processed; determine the brightness intensity applied to the pixel based on the initial brightness information to obtain the image to be denoised; and the determining module is specifically used to: determine the brightness gain information corresponding to the pixel according to a second preset rule based on the initial brightness information of the pixel; wherein the second preset rule includes a histogram equalization algorithm. In this way, the brightness of the image to be processed can be enhanced by the local tone mapping module according to the brightness of the pixels, and the brightness gain information corresponding to each pixel in the image to be denoised can be output by the determining module, effectively balancing the denoising effort and image clarity, and improving image quality.
[0009] Optionally, the at least one brightness enhancement module includes a lens shading correction module and a local tone mapping module; wherein, the lens shading correction module is used to: determine the distance information between each pixel of the image to be processed and the center pixel of the image; and determine the brightness intensity applied to the pixel based on the distance information between the pixel and the center pixel of the image to obtain an initial image to be denoised; the local tone mapping module is used to: determine the initial brightness information of each pixel of the initial image to be denoised; and determine the brightness intensity applied to the pixel based on the initial brightness information to obtain the image to be denoised. In this way, the brightness of the image to be processed can be enhanced by combining the lens shading correction module and the local tone mapping module, thereby more comprehensively improving image clarity; and the noise reduction intensity can be determined simultaneously based on the brightness gain information of the image to be denoised. This effectively balances the noise reduction intensity and image clarity, improving image quality.
[0010] Optionally, the at least one brightness enhancement module includes a lens shading correction module and a local tone mapping module; wherein, the local tone mapping module is used to: determine the initial brightness information of each pixel in the image to be processed; and determine the brightness intensity applied to the pixel based on the initial brightness information to obtain an initial image to be denoised; the lens shading correction module is used to: determine the distance information between each pixel in the initial image to be denoised and the center pixel of the image; and determine the brightness intensity applied to the pixel based on the distance information between the pixel and the center pixel of the image to obtain the image to be denoised. This effectively balances noise reduction and image sharpness, improving image quality.
[0011] Optionally, the determining module is specifically configured to: determine first brightness gain information corresponding to the pixel based on the distance information between the pixel and the center pixel of the image, according to a first preset rule; wherein the distance information in the first preset rule is positively correlated with the first brightness gain information; determine second brightness gain information corresponding to the pixel based on the initial brightness information of the pixel, according to a second preset rule; wherein the second preset rule includes a histogram equalization algorithm; and determine the brightness gain information based on the first brightness gain information and the second brightness gain information. In this way, the first brightness gain information and the second brightness gain information can be integrated to obtain more comprehensive brightness gain information.
[0012] Optionally, the determining module is specifically used to: integrate the first brightness gain information and the second brightness gain information according to a preset rule to obtain the brightness gain information; wherein, the preset rule includes: assigning a first weight to the first brightness gain information and assigning a second weight to the second brightness gain information; and determining the brightness gain information based on the first brightness gain information, the first weight, the second brightness gain information, and the second weight. In this way, the weights can be adaptively adjusted according to the importance of the first brightness gain information and the second brightness gain information to obtain brightness gain information that better meets actual needs.
[0013] Optionally, the determining module is specifically used to: integrate the first brightness gain information and the second brightness gain information according to a preset rule to obtain the brightness gain information; wherein, the preset rule includes: multiplying the first brightness gain information and the second brightness gain information corresponding to the same pixel to obtain the brightness gain product of that pixel; and determining the brightness gain information based on the brightness gain product corresponding to each pixel. In this way, the two brightness gain information can be multiplied to obtain the brightness gain information. This avoids the influencing factors and yields more accurate brightness gain information.
[0014] Optionally, the image processing device further includes an image downsizing module, which is used to: for each pixel in the image to be denoised, arrange the pixels according to their positions on the image to be denoised to obtain an initial brightness gain image; downscale the initial brightness gain image according to a preset ratio to obtain a brightness gain image; and the denoising module is specifically used to: enlarge the brightness gain image according to the preset ratio to restore the initial brightness gain image, so as to obtain the brightness gain information corresponding to each pixel based on the initial brightness gain image. This saves transmission bandwidth and memory.
[0015] Secondly, embodiments of this application provide an image processing method, which includes: acquiring an image to be processed; performing at least one brightness enhancement operation, the brightness enhancement operation including: enhancing the brightness of the image to be processed to obtain a denoised image; determining brightness gain information for each pixel of the denoised image; and performing at least one denoising operation, the denoising operation including: performing denoising processing on the denoised image according to the brightness gain information corresponding to each pixel. This method can apply different denoising intensities to different pixels of the denoised image, achieving a balance between denoising intensity and image clarity, thereby improving image quality.
[0016] Thirdly, embodiments of this application provide an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method provided in the second aspect above are performed.
[0017] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method provided in the second aspect above.
[0018] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 A structural block diagram of an image processing apparatus provided in an embodiment of this application;
[0021] Figure 2 This is a schematic diagram of an image to be processed acquired by the image acquisition module according to an embodiment of this application;
[0022] Figure 3 This is an initial brightness gain image for the noise-reducing image output by the lens shadow correction module, as described in the embodiments of this application.
[0023] Figure 4 This is an initial brightness gain image for the image to be denoised, output by the local tone mapping module, as described in the embodiments of this application.
[0024] Figure 5 This is a schematic diagram of a brightness gain image according to an embodiment of this application;
[0025] Figure 6 This is a schematic diagram of a denoised image according to an embodiment of this application;
[0026] Figure 7 A flowchart illustrating an image processing method provided in an embodiment of this application;
[0027] Figure 8 This is a schematic diagram of the structure of an electronic device for performing an image processing method, provided as an embodiment of this application.
[0028] Specific implementation method
[0029] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0030] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0031] It should be noted that, unless otherwise specified, the embodiments or technical features in the embodiments of this application may be combined.
[0032] In related technologies, uneven image noise distribution due to varying local brightness gains makes it difficult to balance noise reduction efforts and image sharpness. To address this issue, this application provides an image processing apparatus, method, electronic device, and computer-readable storage medium. Furthermore, by determining the brightness gain information of each pixel in the image to be denoised, image noise at different pixels is reduced based on different brightness gain information. Thus, by applying different noise reduction efforts to different pixels, each pixel exhibits varying levels of sharpness, effectively improving image quality.
[0033] In some applications, the aforementioned image processing device can be used on a server-side device. This server can receive images captured by an image acquisition device and then determine the noise reduction level based on the brightness gain information of each pixel in the image. In other applications, the aforementioned image processing method can also be applied to image acquisition devices such as cameras and mobile phones, which are essentially used to acquire images, to perform noise reduction processing on the acquired images.
[0034] The defects in the solutions in the above-mentioned related technologies are all the result of the inventors' practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present invention in the following text should be the inventors' contributions to the present invention.
[0035] Please refer to Figure 1 This illustrates a structural block diagram of an image processing apparatus provided in an embodiment of this application. Figure 1 As shown, the image processing device includes an image acquisition module, at least one brightness enhancement module, a determination module, and at least one noise reduction module. The working process of each module is as follows:
[0036] Image acquisition module 101 is used to acquire the image to be processed;
[0037] The image acquisition module 101 mentioned above may include, for example, an image sensor that can essentially obtain digital signal images, such as a CMOS image sensor or a CCD image sensor.
[0038] In some application scenarios, the digital signal image acquired by the image acquisition module 101 can be regarded as the image to be processed, and subsequent modules can perform corresponding processing operations based on the image to be processed.
[0039] At least one brightness enhancement module 102 is used to enhance the brightness of the image to be processed, so as to obtain the image to be denoised;
[0040] The brightness enhancement module 102 described above may include modules that can essentially be used to enhance image brightness, such as modules for correcting lens shading, performing tone mapping, and dehazing. In some applications, the brightness enhancement module may include an image intensifier.
[0041] In some applications, the image processing device may include a single brightness enhancement module 102. In this case, a single brightness enhancement operation can be performed on the image to be processed. In other applications, the image processing device may include multiple brightness enhancement modules 102. In this case, multiple brightness enhancement operations can be performed on the image to be processed. Here, the various brightness enhancement modules 102 can be the same module or different modules. For example, the first brightness enhancement module 102 may be a module for dehazing, and the second brightness enhancement module 102 may be a module for dehazing or a module for correcting lens shading.
[0042] After the image to be processed is processed by at least one brightness enhancement module 102, although the image brightness is improved, image noise is also introduced. The image to be processed after the introduction of image noise can be regarded as an image to be denoised.
[0043] The determining module 103 is used to determine the brightness gain information of each pixel in the image to be denoised.
[0044] In some application scenarios, the image processing device can use the determination module 103 to determine the brightness gain information of a pixel. Specifically, the determination module 103 can determine the brightness gain information corresponding to each pixel in the image to be denoised.
[0045] In these application scenarios, for example, the initial brightness of each pixel in the image to be processed can be obtained first, and then the final brightness of each pixel in the image to be denoised can be determined. In this way, for the same pixel, brightness gain information can be determined based on the final brightness and the initial brightness. In these application scenarios, the determining module 103 may, for example, include a central processing unit (CPU) to achieve the purpose of determining brightness gain information.
[0046] At least one noise reduction module 104 is used to perform noise reduction processing on the image to be denoised based on the brightness gain information corresponding to each pixel.
[0047] After the determination module 103 determines the brightness gain information of each pixel in the image to be denoised, the noise of the image to be denoised can be reduced by the noise reduction module 104.
[0048] The aforementioned noise reduction module 104 can achieve noise reduction using techniques such as spatial filtering and temporal filtering. Spatial filtering and temporal filtering are existing technologies and will not be elaborated upon here.
[0049] In some applications, the image processing device may include a single noise reduction module 104. In this case, a single noise reduction operation can be performed on the image to be denoised. In other applications, the image processing device may include multiple noise reduction modules 104. In this case, multiple noise reduction operations can be performed on the image to be denoised. Here, the various noise reduction modules 104 may be the same module or different modules. For example, the first noise reduction module 104 may use temporal filtering techniques for noise reduction, and the second noise reduction module 104 may use either spatial filtering techniques or temporal filtering techniques for noise reduction.
[0050] In this embodiment, the image processing device described above can apply different noise reduction intensities to different pixels of the image to be denoised, thereby balancing the noise reduction intensity and image clarity and improving image quality.
[0051] In some optional implementations, the at least one brightness enhancement module 102 includes a lens shading correction module; the lens shading correction module is used to perform the following steps:
[0052] Step a: For each pixel in the image to be processed, determine the distance information between that pixel and the center pixel of the image;
[0053] In some application scenarios, the brightness enhancement module 102 may include a lens shading correction module, which can increase the brightness of a pixel based on the distance information between each pixel and the center pixel of the image. Here, the center pixel of the image can be, for example, the center pixel on the diagonal of the image to be processed.
[0054] For each pixel in the image to be processed, after determining the image center pixel, the lens shading correction module can further determine the distance between that pixel and the image center pixel. In some applications, for example, the straight-line distance between the pixel and the image center pixel in the pixel coordinate system can be determined as the distance between them.
[0055] Step b: Based on the distance information between the pixel and the center pixel of the image, determine the brightness intensity applied to the pixel to obtain the image to be denoised;
[0056] After determining the distance between a pixel and the image center pixel, the lens shading correction module applies different brightness intensities to each pixel based on this distance. In some applications, image areas far from the image center pixel are darker; therefore, the brightness of the pixel can be increased by applying greater brightness intensity as the distance increases. Since the brightness intensities applied to each pixel differ, the noise levels of each pixel also differ. It should be noted that the greater the brightness intensity applied to a pixel, the greater its noise. That is, after processing by this lens shading correction module, the noise intensity at the edges of the image is stronger than the noise intensity at the center.
[0057] It should be noted that the image processing device may include multiple lens shading correction modules. Each time an image to be processed undergoes processing by a lens shading correction module, a noise-reducing image is obtained. At this point, the image to be processed input to the next lens shading correction module is the image output by the previous lens shading correction module. Furthermore, the image obtained after processing by all lens shading correction modules can be considered as the noise-reducing image that can be input to the determination module 103 for noise reduction processing.
[0058] Thus, the determining module 103 is specifically used to perform step c: based on the distance information between the pixel and the center pixel of the image, determine the brightness gain information corresponding to the pixel according to a first preset rule; wherein, the distance information in the first preset rule is positively correlated with the brightness gain information.
[0059] After receiving the image to be denoised, the determining module 103 can determine the brightness gain information of each pixel according to the distance information between the pixel and the center pixel of the image, based on a first preset rule. Here, the first preset rule can be considered as a rule that the pixel farther away from the center pixel of the image has a greater brightness gain. In some application scenarios, the brightness gain information can be determined using a preset algorithm. This preset algorithm can be, for example, g = 1 + a0 * r 2 +a1*r 4 +a2*r 6 +a3*r 8 +a4*r 10 Where g represents the value corresponding to the brightness gain; a represents the parameter obtained by calibrating and fitting the inherent characteristics of image acquisition devices such as lenses and image sensors; and r represents the distance between a pixel and the center pixel of the image.
[0060] In this implementation, the brightness of the image to be processed can be improved by the lens shadow correction module based on the distance information of the pixels from near to far, and the brightness gain information corresponding to each pixel of the image to be denoised can be output by the determination module 103, which effectively balances the denoising strength and image clarity and improves the image quality.
[0061] In some optional implementations, the at least one brightness enhancement module 102 includes a local tone mapping module; the local tone mapping module is used to perform the following steps:
[0062] Step A: For each pixel in the image to be processed, determine the initial brightness information of that pixel;
[0063] In some application scenarios, the brightness enhancement module 102 may include a local tone mapping module, which can increase the brightness of each pixel based on the initial brightness information of that pixel. In these application scenarios, for example, the brightness components in the image to be processed can be separated and extracted using the YUV color space to obtain the initial brightness information.
[0064] Step B: Based on the initial brightness information, determine the brightness intensity applied to the pixel to obtain the image to be denoised.
[0065] After determining the initial brightness information, the local tone mapping module can enhance the brightness of the image to be processed based on this information. For example, different brightness gains can be applied to pixels based on the initial brightness information to make the brightness of each pixel in the image to be processed consistent.
[0066] Similarly, because the brightness intensity applied to each pixel is different, the noise of each pixel is also different. It should be noted that the greater the brightness intensity applied to a pixel, the greater the noise of that pixel. That is, in the image to be processed by this local tone mapping module, the originally darker image areas have stronger noise intensity compared to the originally brighter image areas.
[0067] It should be noted that the image processing apparatus may include multiple local tone mapping modules. Each time an image to be processed undergoes processing by a local tone mapping module, a denoising image is obtained. At this point, the image to be processed input to the next local tone mapping module is the image output by the previous local tone mapping module. Furthermore, the image obtained after processing by all local tone mapping modules can be considered as the denoising image to be input into the determination module 103 for denoising processing.
[0068] Thus, the determining module 103 is specifically used to perform step C: based on the initial brightness information of the pixel, determine the brightness gain information corresponding to the pixel according to the second preset rule; wherein, the second preset rule includes a histogram equalization algorithm.
[0069] After receiving the image to be denoised from the local tone mapping module, the determining module 103 can determine the brightness gain information of each pixel according to the initial brightness information of the pixels and a second preset rule. Here, the second preset rule can be regarded as a rule that makes the brightness gain of the darker the pixel, the greater. In some application scenarios, for example, the brightness gain of the pixel can be determined by a histogram equalization algorithm.
[0070] In this implementation, the brightness of the image to be processed can be increased by the local tone mapping module according to the brightness of the pixels, and the brightness gain information corresponding to each pixel of the image to be denoised can be output by the determination module 103, which effectively balances the denoising strength and image clarity and improves the image quality.
[0071] In some optional implementations, the at least one brightness enhancement module 102 includes a lens shading correction module and a local tone mapping module; wherein, the lens shading correction module is used to: determine the distance information between each pixel of the image to be processed and the center pixel of the image; and determine the brightness intensity applied to the pixel based on the distance information between the pixel and the center pixel of the image to obtain an initial image to be denoised; the local tone mapping module is used to: determine the initial brightness information of each pixel of the initial image to be denoised; and determine the brightness intensity applied to the pixel based on the initial brightness information to obtain the image to be denoised.
[0072] In some application scenarios, the image processing device may include at least one brightness enhancement module 102, which may include a lens shading correction module and a local tone mapping module. The execution steps and technical effects of the lens shading correction module may be the same as or similar to steps a and b above, and the execution steps and technical effects of the local tone mapping module may be the same as or similar to steps A and B above, which will not be elaborated here.
[0073] In some optional implementations, the at least one brightness enhancement module includes a lens shading correction module and a local tone mapping module; wherein, the local tone mapping module is used to: determine the initial brightness information of each pixel in the image to be processed; and determine the brightness intensity applied to the pixel based on the initial brightness information to obtain an initial image to be denoised; the lens shading correction module is used to: determine the distance information between each pixel in the initial image to be denoised and the center pixel of the image; and determine the brightness intensity applied to the pixel based on the distance information between the pixel and the center pixel of the image to obtain the image to be denoised.
[0074] In some application scenarios, the image processing device may include at least one brightness enhancement module 102, which may include a lens shading correction module and a local tone mapping module. The execution steps and technical effects of the lens shading correction module may be the same as or similar to steps a and b above, and the execution steps and technical effects of the local tone mapping module may be the same as or similar to steps A and B above, which will not be elaborated here.
[0075] It should be noted that the implementation in this application only describes one or two of the positional arrangements of the lens shading correction module and the local tone mapping module. In practical applications, this application does not limit the position of the lens shading correction module and the local tone mapping module in the image processing process. That is, the lens shading correction module can be located before the local tone mapping module, processing the image to be processed first, and then inputting the initial image to be denoised into the local tone mapping module for processing. Alternatively, the local tone mapping module can also be located before the lens shading correction module, processing the image to be processed first, and then inputting the initial image to be denoised into the lens shading correction module for processing. The image finally input to the determining module 103 can also be considered as the image to be denoised.
[0076] In some optional implementations, the determining module 103 is specifically used to: determine first brightness gain information corresponding to the pixel according to a first preset rule based on the distance information between the pixel and the center pixel of the image; wherein the distance information in the first preset rule is positively correlated with the first brightness gain information; determine second brightness gain information corresponding to the pixel according to a second preset rule based on the initial brightness information of the pixel; wherein the second preset rule includes a histogram equalization algorithm; and determine the brightness gain information according to the first brightness gain information and the second brightness gain information.
[0077] In this implementation, the determining module 103 can process the image to be denoised obtained after processing by the lens shadow correction module and the local tone mapping module. The processing procedure and the resulting technical effects can be the same as or similar to the corresponding positions of steps c and C above, and will not be elaborated here.
[0078] Furthermore, after obtaining the first brightness gain information by referring to step c above, and the second brightness gain information by referring to step C above, the brightness gain information of the image to be denoised input to the determination module 103 can be determined based on these two information.
[0079] In this implementation, the brightness of the image to be processed can be enhanced by combining the lens shadow correction module and the local tone mapping module, thereby improving image clarity more comprehensively. Furthermore, the noise reduction intensity can be determined based on the brightness gain information of the image to be denoised. This effectively balances noise reduction intensity and image clarity, improving image quality.
[0080] In some optional implementations, the determining module 103 is specifically used to perform step 1: integrating the first brightness gain information and the second brightness gain information according to a preset rule to obtain the brightness gain information;
[0081] In some application scenarios, when the lens shadow correction module and the local tone mapping module coexist in the image processing device, the first brightness gain information and the second brightness gain information can be integrated and determined to determine the noise reduction strength for each pixel of the image to be denoised.
[0082] In these application scenarios, the preset rules include: assigning a first weight to the first brightness gain information and assigning a second weight to the second brightness gain information; and determining the brightness gain information based on the first brightness gain information, the first weight, the second brightness gain information, and the second weight.
[0083] In other words, the rules for determining brightness gain information in the determination module 103 can be preset. According to the rules, after obtaining the first brightness gain information and the second brightness gain information, the determination module 103 can assign different or the same weights to them, and further obtain the brightness gain information based on the assigned weights. For example, a weight of 0.5 can be assigned to the first brightness gain information g1, and a weight of 0.5 can be assigned to the second brightness gain information g2. In this case, the brightness gain information G can be: G = 0.5g1 + 0.5g2.
[0084] In this implementation, the brightness gain information can be determined by pre-assigning weights to the first and second brightness gain information. This allows for adaptive adjustment of the weights based on the relative importance of the first and second brightness gain information, resulting in brightness gain information that better meets actual needs.
[0085] In some optional implementations, the determining module 103 is specifically used to perform step one: integrating the first brightness gain information and the second brightness gain information according to a preset rule to obtain the brightness gain information;
[0086] The implementation process and technical effects of step one above can be the same as or similar to those of step 1 above, and will not be repeated here.
[0087] In this implementation, the preset rules include: multiplying the first brightness gain information and the second brightness gain information corresponding to the same pixel to obtain the brightness gain product of that pixel; and determining the brightness gain information based on the brightness gain product corresponding to each pixel.
[0088] In some applications, the first and second luminance gain information of the same pixel can be multiplied, and the luminance gain information can be determined based on the product. For example, the luminance gain product can be used to determine the luminance gain information.
[0089] In this implementation, the two brightness gain information pieces can be multiplied to obtain the brightness gain information. This avoids the influencing factors and yields more accurate brightness gain information.
[0090] In some optional implementations, when integrating the first and second brightness gain information, the preset rules may also include: first determining the first value corresponding to the first brightness gain information and the second value corresponding to the second brightness gain information; then, the final brightness gain information can be determined based on the relationship between the first and second values. For example, for the same pixel, if its corresponding first value is 2 and its second value is 3, then the second brightness gain information can be determined as the integrated brightness gain information. In this way, by using the first or second brightness gain information with the larger gain, the goal of balancing noise reduction and image sharpness can be achieved to a certain extent.
[0091] In some alternative implementations, the image processing apparatus further includes an image downsizing module, which performs the following steps:
[0092] Step 1: For each pixel in the image to be denoised, the brightness gain information is arranged according to the position of the pixel in the image to be denoised to obtain an initial brightness gain image.
[0093] In some applications, the brightness gain information can be arranged according to the pixel positions to ensure an orderly arrangement. The image obtained after this orderly arrangement can be considered the initial brightness gain image.
[0094] In these application scenarios, if the image to be denoised is the output of the lens shading correction module, the initial brightness gain image corresponding to this image may exhibit a phenomenon where the brightness gain is small at the edges and large in the center of the image. For example, for the image acquired by the image acquisition module 101, such as... Figure 2 The image to be processed shown can be obtained as follows: Figure 3 The initial brightness gain image is shown.
[0095] Furthermore, if the image to be denoised is the output of a local tone mapping module, then the initial brightness gain image corresponding to that image can exhibit the following phenomenon: image regions with high initial brightness have low gain, while image regions with low initial brightness have high gain. For example, for the image acquired by image acquisition module 101, such as... Figure 2 The image to be processed shown can be obtained as follows: Figure 4 The initial brightness gain image is shown.
[0096] Step 2: Reduce the initial brightness gain image according to a preset ratio to obtain a brightness gain image;
[0097] In some applications, after obtaining the initial luminance gain image, it can be scaled down by a ratio such as 1:5 or 1:10. The scaled-down initial luminance image can then be considered as the luminance gain image. Here, regarding the above... Figure 3 , Figure 4 The initial brightness gain image shown can be obtained by integrating the above-mentioned preset algorithm as G = 0.5g1 + 0.5g2. Figure 5 The brightness gain image shown.
[0098] Thus, the noise reduction module 104 is specifically used to: enlarge the brightness gain image according to the preset ratio, restore the initial brightness gain image, and obtain the brightness gain information corresponding to each pixel based on the initial brightness gain image.
[0099] After receiving the brightness gain image, the noise reduction module 104 can enlarge the brightness gain image according to the reduction ratio to restore the initial brightness gain image. Then, the noise reduction module 104 can perform noise reduction processing on the image to be denoised based on the initial brightness gain image. This achieves the purpose of saving transmission bandwidth and memory. Here, if we consider… Figure 5 The brightness gain image shown can be used to obtain the following: Figure 6 The image shown is after noise reduction.
[0100] In some applications, the image processing device may also include a storage module and an imaging module. The storage module may include, for example, Static Random-Access Memory (SRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDR), or Hard Disk Drive (HDD). The imaging module may include modules for performing white balance processing, depigmentation, gamma compression, etc., on the image.
[0101] In some application scenarios, all modules in this application can be hardware modules. In these scenarios, the image processing device's processing of the image to be processed may include, for example, the following steps: after the image sensor acquires the image to be processed, the image to be processed is passed through an image intensifier to enhance its brightness, resulting in an image to be denoised. Then, the central processing unit determines the brightness gain information corresponding to each pixel of the image to be denoised, and this brightness gain information can be transmitted to the denoising module 104. The denoising module 104 performs denoising processing on the image to be denoised based on the brightness gain information. The denoised image can then be input into the imaging module, where it can perform processes such as white balance processing and de-mosaic processing to obtain a final image that meets the actual requirements. This image can then be stored on a hard disk. In this process, the storage module can also be used to store the image to be denoised, the initial brightness gain information, and / or the brightness gain information, depending on the actual application scenario, and is not limited here.
[0102] In other application scenarios, the solution of this application can also be implemented by the processor executing program, with different modules corresponding to the functions of different parts of the processor executing program.
[0103] Please refer to Figure 7 It shows a flowchart of an image processing method provided in an embodiment of this application. Figure 1 The image processing apparatus of the illustrated embodiment can be used with Figure 7 The corresponding method implementation is capable of execution. Figure 7 The specific implementation process of the method can be found in the description above for each step involved in the method embodiment. To avoid repetition, detailed descriptions are omitted here.
[0104] like Figure 7 As shown, the image processing method includes the following steps:
[0105] Step 701: Obtain the image to be processed;
[0106] Step 702: Perform at least one brightness enhancement operation, the brightness enhancement operation including: enhancing the brightness of the image to be processed to obtain the image to be denoised;
[0107] Step 703: For each pixel of the image to be denoised, determine the brightness gain information of that pixel;
[0108] Step 704: Perform at least one noise reduction operation, the noise reduction operation including: performing noise reduction processing on the image to be denoised based on the brightness gain information corresponding to each pixel.
[0109] Optionally, increasing the brightness of the image to be processed to obtain a noise-reduced image includes: for each pixel of the image to be processed, determining the distance information between the pixel and the center pixel of the image; determining the brightness intensity applied to the pixel based on the distance information between the pixel and the center pixel of the image to obtain the noise-reduced image; and determining the brightness gain information of each pixel of the image to be noise-reduced includes: determining the brightness gain information corresponding to the pixel according to a first preset rule based on the distance information between the pixel and the center pixel of the image; wherein, the distance information in the first preset rule is positively correlated with the brightness gain information.
[0110] Optionally, increasing the brightness of the image to be processed to obtain a denoised image includes: determining the initial brightness information of each pixel in the image to be processed; determining the applied brightness intensity based on the initial brightness information to obtain the denoised image; and determining the brightness gain information of each pixel in the image to be denoised includes: determining the brightness gain information corresponding to the pixel according to a second preset rule based on the initial brightness information of the pixel; wherein the second preset rule includes a histogram equalization algorithm.
[0111] Optionally, increasing the brightness of the image to be processed to obtain a denoised image includes: for each pixel of the image to be processed, determining the distance information between the pixel and the center pixel of the image; based on the distance information between the pixel and the center pixel of the image, determining the brightness intensity applied to the pixel to obtain an initial denoised image; for each pixel of the initial denoised image, determining the initial brightness information of the pixel; and based on the initial brightness information, determining the brightness intensity applied to the pixel to obtain the denoised image.
[0112] Optionally, increasing the brightness of the image to be processed to obtain a denoised image includes: determining initial brightness information for each pixel of the image to be processed; determining the applied brightness intensity based on the initial brightness information to obtain an initial denoised image; determining the distance information between each pixel and the center pixel of the image for each pixel of the initial denoised image; and determining the applied brightness intensity based on the distance information between the pixel and the center pixel of the image to obtain the denoised image.
[0113] Optionally, determining the brightness gain information for each pixel in the image to be denoised includes: determining first brightness gain information corresponding to the pixel according to a first preset rule based on the distance information between the pixel and the center pixel of the image; wherein the distance information in the first preset rule is positively correlated with the first brightness gain information; determining second brightness gain information corresponding to the pixel according to a second preset rule based on the initial brightness information of the pixel; wherein the second preset rule includes a histogram equalization algorithm; and determining the brightness gain information based on the first brightness gain information and the second brightness gain information.
[0114] Optionally, determining the brightness gain information based on the first brightness gain information and the second brightness gain information includes: integrating the first brightness gain information and the second brightness gain information according to a preset rule to obtain the brightness gain information; wherein the preset rule includes: assigning a first weight to the first brightness gain information and assigning a second weight to the second brightness gain information; and determining the brightness gain information based on the first brightness gain information, the first weight, the second brightness gain information, and the second weight.
[0115] Optionally, determining the brightness gain information based on the first brightness gain information and the second brightness gain information includes: integrating the first brightness gain information and the second brightness gain information according to a preset rule to obtain the brightness gain information; wherein the preset rule includes: multiplying the first brightness gain information and the second brightness gain information corresponding to the same pixel to obtain the brightness gain product of that pixel; and determining the brightness gain information based on the brightness gain product corresponding to each pixel.
[0116] Optionally, the image processing method further includes: for each pixel of the image to be denoised, arranging the pixels according to their positions on the image to be denoised to obtain an initial brightness gain image; reducing the initial brightness gain image by a preset ratio to obtain a brightness gain image; and performing noise reduction processing on the image to be denoised based on the brightness gain information corresponding to each pixel, including: enlarging the brightness gain image by the preset ratio to restore the initial brightness gain image, so as to obtain the brightness gain information corresponding to each pixel based on the initial brightness gain image.
[0117] It should be noted that those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the method described above can be referred to the corresponding process in the foregoing device embodiments, and will not be repeated here.
[0118] Please refer to Figure 8 , Figure 8 This is a schematic diagram of an electronic device for executing an image processing method, provided in an embodiment of this application. The electronic device may include: at least one processor 801, such as a CPU, at least one communication interface 802, at least one memory 803, and at least one communication bus 804. The communication bus 804 is used to establish direct communication between these components. In this embodiment, the communication interface 802 is used for signaling or data communication with other node devices. The memory 803 may be a high-speed RAM or a non-volatile memory, such as at least one disk storage device. Optionally, the memory 803 may also be at least one storage device located remotely from the aforementioned processor. The memory 803 stores computer-readable instructions. When these computer-readable instructions are executed by the processor 801, the electronic device can perform the aforementioned... Figure 7 The method and process are shown.
[0119] Understandable. Figure 8 The structure shown is for illustrative purposes only; the electronic device may also include components that are more advanced than those shown. Figure 8 The more or fewer components shown, or having the same Figure 8 The different configurations shown. Figure 8 The components shown can be implemented using hardware, software, or a combination thereof.
[0120] This application provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it can perform actions such as... Figure 7 The method process executed by the electronic device in the illustrated method embodiment.
[0121] This application provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can perform the methods provided in the above-described method embodiments. For example, the method may include: acquiring an image to be processed; performing at least one brightness enhancement operation, the brightness enhancement operation including: enhancing the brightness of the image to be processed to obtain a denoised image; determining brightness gain information for each pixel of the image to be denoised; and performing at least one denoising operation, the denoising operation including: performing denoising processing on the image to be denoised according to the brightness gain information corresponding to each pixel.
[0122] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.
[0123] Furthermore, the units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0124] Furthermore, the functional modules in the various embodiments of this application can be integrated together to form an independent part, or each module can exist independently, or two or more modules can be integrated to form an independent part.
[0125] In this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between these entities or operations.
[0126] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. An image processing apparatus, characterized in that, include: The image acquisition module is used to acquire the image to be processed. At least one brightness enhancement module is used to enhance the brightness of the image to be processed, so as to obtain the image to be denoised; The determination module is used to determine the brightness gain information of each pixel in the image to be denoised. At least one noise reduction module is used to perform noise reduction processing on the image to be denoised based on the brightness gain information corresponding to each pixel: The at least one brightness enhancement module includes a lens shadow correction module and a local tone mapping module; The lens shading correction module is used for: For each pixel in the image to be processed, determine the distance information between that pixel and the center pixel of the image; Based on the distance information between a pixel and the center pixel of the image, the brightness intensity applied to that pixel is determined to obtain the initial image to be denoised; The local tone mapping module is used for: For each pixel in the initial image to be denoised, determine the initial brightness information of that pixel; Based on the initial brightness information, the brightness intensity applied to the pixel is determined to obtain the image to be denoised.
2. The apparatus according to claim 1, characterized in that, The determining module is specifically used for: Based on the distance information between a pixel and the center pixel of the image, the first brightness gain information corresponding to the pixel is determined according to a first preset rule; wherein, the distance information in the first preset rule is positively correlated with the first brightness gain information; Based on the initial brightness information of the pixel, the second brightness gain information corresponding to the pixel is determined according to the second preset rule; wherein, the second preset rule includes a histogram equalization algorithm; The brightness gain information is determined based on the first brightness gain information and the second brightness gain information.
3. The apparatus according to claim 2, characterized in that, The determining module is specifically used for: The first brightness gain information and the second brightness gain information are integrated according to a preset rule to obtain the brightness gain information; wherein, the preset rule includes: Assign a first weight to the first brightness gain information and a second weight to the second brightness gain information; The brightness gain information is determined based on the first brightness gain information, the first weight, the second brightness gain information, and the second weight.
4. The apparatus according to claim 2, characterized in that, The determining module is specifically used for: The first brightness gain information and the second brightness gain information are integrated according to a preset rule to obtain the brightness gain information; wherein, the preset rule includes: Multiply the first brightness gain information and the second brightness gain information corresponding to the same pixel to obtain the brightness gain product of that pixel. The brightness gain information is determined based on the brightness gain product corresponding to each pixel.
5. The apparatus according to claim 1, characterized in that, The image processing device further includes an image reduction module, which is used for: For each pixel in the image to be denoised, the brightness gain information is arranged according to the position of the pixel in the image to be denoised to obtain an initial brightness gain image. The initial brightness gain image is reduced by a preset ratio to obtain a brightness gain image; and The noise reduction module is specifically used for: The brightness gain image is magnified according to the preset ratio to restore the initial brightness gain image, so as to obtain the brightness gain information corresponding to each pixel based on the initial brightness gain image.
6. An image processing method, characterized in that, include: Obtain the image to be processed; Perform at least one brightness enhancement operation, the brightness enhancement operation including: enhancing the brightness of the image to be processed to obtain the image to be denoised; For each pixel in the image to be denoised, determine the brightness gain information of that pixel; Perform at least one noise reduction operation, the noise reduction operation including: performing noise reduction processing on the image to be denoised based on the brightness gain information corresponding to each pixel: The process of increasing the brightness of the image to be processed to obtain the image to be denoised includes: For each pixel in the image to be processed, determine the distance information between that pixel and the center pixel of the image; Based on the distance information between a pixel and the center pixel of the image, the brightness intensity applied to that pixel is determined to obtain the initial image to be denoised; For each pixel in the initial image to be denoised, determine the initial brightness information of that pixel; Based on the initial brightness information, the brightness intensity applied to the pixel is determined to obtain the image to be denoised.
7. An electronic device, characterized in that, It includes a processor and a memory, the memory storing computer-readable instructions that, when executed by the processor, perform the method as described in claim 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it performs the method as described in claim 6.
Citation Information
Patent Citations
Image processing method and electronic equipment
CN111131716A
Image noise reduction method and device, electronic equipment and storage medium
CN112085682A