Image processing method and device, electronic equipment and storage medium
By introducing a noise feedback mechanism during image processing, the parameters and areas of the image processing module are adjusted in real time, the image noise problem is solved and image quality and processing efficiency are improved.
Patent Information
- Application Number
- CN202410084644.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-19
- Publication Date
- 2025-07-22
AI Technical Summary
During the image processing process, the prior art fails to effectively solve the noise problem, resulting in a decrease in image quality after processing, and the lack of a noise feedback mechanism leads to poor intelligence.
Through the noise feedback mechanism between multiple image processing modules, the processing parameters or regions of the current image processing module are adjusted in real time to ensure that the noise value meets preset conditions, including global and local processing methods, and improves image quality and efficiency.
The quality and efficiency of the image processing module are improved, the impact of current module processing on subsequent modules is reduced, and the overall quality of the target image is improved.
Smart Images

Figure CN120355608A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of image technology, and in particular, to an image processing method, an apparatus, an electronic device, and a storage medium. Background Art
[0002] During the process of image processing, the image may be processed by multiple modules. For example, there may be a sharpening module, a color encoding module, a color processing module, and so on. During the processing of various different modules, the noise will be affected, and the processed image may have a large noise problem. Summary of the Invention
[0003] Embodiments of the present disclosure disclose an image processing method, an apparatus, an electronic device, and a storage medium.
[0004] According to a first aspect of the embodiments of the present disclosure, there is provided an image processing method, the method comprising:
[0005] Obtaining an image to be processed;
[0006] During the process of processing the image by using multiple image processing modules, determining a noise value of the image after being processed by the current image processing module; wherein, among the multiple image processing modules, an image after being processed by a previous image processing module adjacent to the current image processing module is an input image of the next image processing module;
[0007] In response to the noise value of the image after being processed by the current image processing module not satisfying a first preset noise condition, adjusting the processing of the input image of the current image processing module by the current image processing module, and obtaining a target image after processing the image based on the multiple image processing modules.
[0008] In some embodiments, the method further comprises:
[0009] Determining an image block after region partitioning of the image corresponding to the image after being processed by the current image processing module;
[0010] The determining of the noise value of the image after being processed by the current image processing module comprises:
[0011] Determining the noise value of each image block in the image after being processed by the current image processing module;
[0012] The adjusting of the processing of the input image of the current image processing module by the current image processing module in response to the noise value of the image after being processed by the current image processing module not satisfying the first preset noise condition comprises:
[0013] In response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module.
[0014] In some embodiments, the adjusting the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition includes:
[0015] In response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module based on a preset adjustment method.
[0016] In some embodiments, the adjusting the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition and based on a preset adjustment method includes:
[0017] In response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition and the preset adjustment method is a global processing method, adjust the processing parameters of the current image processing module to perform global processing on the input image of the current image processing module.
[0018] In some embodiments, the adjusting the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition and based on a preset adjustment method includes:
[0019] In response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition and the preset adjustment method is a local processing method, determine the local image blocks to be adjusted in the input image of the current image processing module;
[0020] Process the local image blocks to be adjusted based on the current image processing module.
[0021] In some embodiments, the determining the local image blocks to be adjusted in the input image of the current image processing module includes:
[0022] Determine the target image blocks in the image blocks of the image processed by the current image processing module whose noise values do not meet the second preset noise condition;
[0023] Determine the image block at the same position as the target image block in the input image of the current image processing module as the local image block to be adjusted.
[0024] In some embodiments, the method further includes:
[0025] Determine the image blocks after the region division corresponding to the input image of the current image processing module, and the noise values corresponding to the image blocks;
[0026] For the image blocks at the same position in the input image and the processed image of the current image processing module, determine the first noise difference value corresponding to the image blocks;
[0027] The determining the target image blocks in the processed image of which the noise values of the image blocks do not meet the second preset noise condition includes:
[0028] In response to the first noise difference value corresponding to the image block in the processed image being greater than the first preset noise difference threshold, determine that the image block is the target image block whose noise value does not meet the second preset noise condition.
[0029] In some embodiments, the image blocks after the region division corresponding to the processed image of the current image processing module are the image blocks after image segmentation based on the image content;
[0030] The adjusting the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the processed image of the current image processing module do not meet the first preset noise condition includes:
[0031] For each image block after image segmentation, in response to determining that the noise value of the image block in the processed image of the current image processing module does not meet the first preset noise condition, adjust the processing of the image block after image segmentation in the input image of the current image processing module by the current image processing module.
[0032] In some embodiments, the method further includes:
[0033] Determine the image blocks after the region division corresponding to the input image of the current image processing module, and the noise values corresponding to the image blocks;
[0034] Based on the noise values of the image blocks included in the input image of the current image processing module, determine the first noise statistical value;
[0035] Based on the noise values of the image blocks included in the processed image of the current image processing module, determine the second noise statistical value;
[0036] Determine a second noise difference value based on the first noise statistic value and the second noise statistic value;
[0037] In response to the second noise difference value being greater than a second preset noise difference threshold, determine that the noise value of the image processed by the current image processing module does not meet the first preset noise condition.
[0038] In some embodiments, the image to be processed is a RAW image, and the multiple image processing modules are modules for performing image signal processing on the RAW image.
[0039] According to a second aspect of the embodiments of the present disclosure, there is provided an image processing apparatus, the apparatus including:
[0040] An acquisition module, configured to acquire an image to be processed;
[0041] A first determination module, configured to determine the noise value of the image processed by the current image processing module during the process of processing the image by using multiple image processing modules; wherein, among the multiple image processing modules, the image processed by the previous image processing module adjacent to the current image processing module is the input image of the subsequent image processing module;
[0042] An adjustment module, configured to, in response to the noise value of the image processed by the current image processing module not meeting the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module, and obtain a target image after processing the image based on the multiple image processing modules.
[0043] In some embodiments, the apparatus further includes:
[0044] A second determination module, configured to determine the image blocks after region division of the image corresponding to the image processed by the current image processing module;
[0045] The first determination module is further configured to determine the noise values of the respective image blocks in the image processed by the current image processing module;
[0046] The adjustment module is further configured to, in response to determining that the noise values of the respective image blocks in the image processed by the current image processing module do not meet the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module.
[0047] In some embodiments, the adjustment module is further configured to, in response to determining that the noise values of the respective image blocks in the image processed by the current image processing module do not meet the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module based on a preset adjustment method.
[0048] In some embodiments, the adjustment module is further configured to, in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, and the preset adjustment method is a global processing method, adjust the processing parameters of the current image processing module to globally process the input image of the current image processing module.
[0049] In some embodiments, the adjustment module is further configured to, in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, and the preset adjustment method is a local processing method, determine the local image blocks to be adjusted in the input image of the current image processing module; and process the local image blocks to be adjusted based on the current image processing module.
[0050] In some embodiments, the adjustment module is further configured to determine, among the image blocks of the image processed by the current image processing module, the target image blocks whose noise values do not meet the second preset noise condition; and determine the image blocks at the same positions as the target image blocks in the input image of the current image processing module as the local image blocks to be adjusted.
[0051] In some embodiments, the apparatus further includes:
[0052] A third determination module, configured to determine the image blocks after region division of the input image corresponding to the current image processing module, and the noise values corresponding to the image blocks; and determine the first noise difference value corresponding to the image blocks for the image blocks at the same positions in the input image and the processed image of the current image processing module.
[0053] The adjustment module is further configured to, in response to the first noise difference value corresponding to the image block in the processed image being greater than the first preset noise difference threshold, determine that the image block is a target image block whose noise value does not meet the second preset noise condition.
[0054] In some embodiments, the image blocks after region division of the image processed by the current image processing module are the image blocks after image segmentation based on the image content; the adjustment module is further configured to, for each image block after image segmentation, in response to determining that the noise value of the image block in the image processed by the current image processing module does not meet the first preset noise condition, adjust the processing of the image block after image segmentation in the input image of the current image processing module by the current image processing module.
[0055] In some embodiments, the apparatus further includes:
[0056] A fourth determination module, configured to determine image blocks after region division corresponding to an input image of the current image processing module, and noise values corresponding to the image blocks; determine a first noise statistical value based on the noise values of the image blocks included in the input image of the current image processing module; determine a second noise statistical value based on the noise values of the image blocks included in the image processed by the current image processing module; determine a second noise difference value based on the first noise statistical value and the second noise statistical value; and in response to the second noise difference value being greater than a second preset noise difference threshold, determine that the noise value of the image processed by the current image processing module does not meet the first preset noise condition.
[0057] In some embodiments, the image to be processed is a RAW image, and the multiple image processing modules are modules for performing image signal processing on the RAW image.
[0058] According to a third aspect of the embodiments of the present disclosure, there is provided an electronic device, including:
[0059] A processor;
[0060] A memory for storing instructions executable by the processor;
[0061] Wherein, the processor is configured to execute the image processing method as described in the first aspect above.
[0062] According to a fourth aspect of the embodiments of the present disclosure, there is provided a storage medium, including:
[0063] When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the image processing method as described in the first aspect above.
[0064] The technical solutions provided by the embodiments of the present disclosure may include the following beneficial effects:
[0065] In an embodiment of the present disclosure, during the process of an electronic device processing an image using multiple image processing modules, the noise value of the image after being processed by the current image processing module is determined. When the noise value of the image after being processed by the current image processing module does not meet the first preset noise condition, the processing of the input image of the current image processing module by the current image processing module is adjusted. On the one hand, adjusting the noise value of the current image processing module itself for image processing based on the noise feedback mechanism helps improve the processing quality of the current image processing module. On the other hand, since the image processing modules are interrelated, the output image of the previous image processing module in adjacent image processing modules is the input image of the subsequent image processing module. Therefore, by controlling the noise of the image after being processed by the current image processing module, the influence of the processing of the current image processing module on the subsequent image processing modules can also be reduced, thereby improving the quality of the target image. On the third hand, based on the noise feedback of the current image processing module, when the first preset noise condition is not met, immediate adjustment processing is performed, without waiting for the final target image to adjust the processing of each image processing module. Therefore, the efficiency of obtaining a high-quality target image can also be improved.
[0066] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and do not limit the present disclosure. Brief Description of the Drawings
[0067] The accompanying drawings herein are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure and, together with the specification, are used to explain the principles of the present disclosure.
[0068] Figure 1 is a flowchart showing a method for image processing according to an exemplary embodiment;
[0069] Figure 2 is a schematic diagram showing image processing modules involved in a photographing imaging process according to an exemplary embodiment;
[0070] Figure 3 is a schematic diagram showing a way of image division according to an exemplary embodiment;
[0071] Figure 4 is a schematic diagram showing image blocks included in the processed image of adjacent image processing modules according to an exemplary embodiment;
[0072] Figure 5 is a flowchart showing the processing of a RAW image in a photographing process according to an exemplary embodiment;
[0073] Figure 6 is a diagram showing a selected area according to an exemplary embodiment;
[0074] Figure 7 It is a schematic structural diagram of an image processing device shown according to an exemplary embodiment;
[0075] Figure 8 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. Detailed implementation manners
[0076] Here, the exemplary embodiments will be described in detail, and the examples are shown in the accompanying drawings. When the following description refers to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0077] Figure 1 It is a schematic flowchart of an image processing method shown for an embodiment of the present disclosure. As Figure 1 shown, the image processing method includes the following steps:
[0078] S11. Obtain an image to be processed;
[0079] S12. During the process of processing the image by using a plurality of image processing modules, determine the noise value of the image after being processed by the current image processing module; wherein, among the plurality of image processing modules, the image after being processed by the previous image processing module adjacent to the current image processing module is the input image of the subsequent image processing module;
[0080] S13. In response to the noise value of the image after being processed by the current image processing module not satisfying the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module, and obtain a target image after processing the image based on the plurality of image processing modules.
[0081] An image processing method provided by an embodiment of the present disclosure can be applied to an electronic device. The electronic device can be a terminal or a server. In some possible implementation manners, the image processing method can be implemented by a processor calling computer-readable instructions stored in a memory.
[0082] In an embodiment of the present disclosure, the terminal can be a photographing terminal, or a terminal that does not have a photographing function but has an image display function. For example, it can be a smart phone, a wearable device, a smart speaker, etc., and can also be a device such as an unmanned aerial vehicle or a vehicle-mounted device.
[0083] In an embodiment of the present disclosure, the server can be any device for storing data, processing data, forwarding data, and providing network services.
[0084] In some embodiments, S11 includes at least one of the following:
[0085] Obtaining an image to be processed by capturing with an imaging module;
[0086] Obtaining an image to be processed through network communication.
[0087] In some embodiments, in S12, during the process of the electronic device using multiple image processing modules to process an image, determining the noise value of the image after being processed by the current image processing module may be that the electronic device determines the noise value of the image after being processed by the current image processing module based on a preset noise quantization algorithm. In some embodiments, the electronic device may regard the processed image as a whole and determine the noise value based on a preset noise quantization algorithm. In other embodiments, the electronic device may also divide the processed image into regions and calculate the noise value of the processed image based on the divided image blocks.
[0088] In the embodiments of the present disclosure, the noise quantization algorithm may include but is not limited to: Signal to Noise Ratio (SNR) quantization algorithm, Peak Signal to Noise Ratio (PSNR) quantization algorithm, Mean Square Error (MSE) quantization algorithm, Structural SIMilarity (SSIM) quantization algorithm, and / or gradient-based noise quantization algorithm, etc.
[0089] Figure 2 FIG. is a schematic diagram of an image processing module involved in a photographing and imaging process shown according to an exemplary embodiment. From the optical signal collected by the camera being converted into an electrical signal to the finally displayable image, the image processing modules passed through in the middle are as Figure 2 shown, including: a Raw Image (RAW) input module, a bad pixel correction module, a black level correction module, a digital gain module, a lens shading correction module, an Auto White Balance (AWB) module, a demosaicing module, a Color Correction Matrix (CCM) correction module, a Gamma correction module, a color space conversion module, an Artificial Intelligence (AI) segmentation module, a noise reduction module, a color mapping module, a color processing module, a sharpening module, and / or a color encoding (YUV) module. Each image processing module is connected in sequence and sequentially executes its respective image processing tasks. Among them, the image processed by the previous image processing module of adjacent image processing modules is the input image of the subsequent image processing module. Therefore, the processing of the previous image processing module will affect the processing of the subsequent one or more image processing modules.
[0090] In an embodiment of the present disclosure, the current image processing module may be any one of multiple image processing modules. The electronic device determines the noise value of the image after processing by the current image processing module, so as to guide image processing according to the noise value. In step S13, when the electronic device determines that the noise value of the image after processing by the current image processing module does not meet the first preset noise condition, it can adjust the processing of the input image of the current image processing module by the current image processing module until the noise value of the image after processing by the current image processing module meets the first preset noise condition.
[0091] In an embodiment of the present disclosure, for example, it may be to adjust the image processing parameters of the current image processing module. For example, for the sharpening module, it may be to adjust the sharpening parameters of the image by the sharpening module to adjust the sharpness of the image after processing; for the color processing module, it may be to adjust the color parameters of the image to adjust the color vividness of the image after processing, etc. In addition, adjusting the processing of the input image of the current image processing module by the current image processing module may also be to adjust the processing method. For example, when initially processing, the input image is globally processed, and the adjusted method may be to locally process the input image; conversely, if it is initially locally processed, it is adjusted to globally process after adjustment.
[0092] It should be noted that in an embodiment of the present disclosure, since the current image processing module is one of multiple image processing modules, if the current image processing module is not the last module among the multiple image processing modules, after adjusting the processing of the input image of the current image processing module by the current image processing module, the modules after the current image processing module among the multiple image processing modules will sequentially perform image processing based on the image adjusted by the current image processing module, so that the electronic device can obtain the target image after processing the image based on multiple image processing modules; if the current image processing module is the last module among the multiple image processing modules, the electronic device only needs to reprocess the input image based on the last image processing module to obtain the target image.
[0093] In addition, when determining whether the noise value of the image after processing by the current image processing module meets the first preset noise condition in an embodiment of the present disclosure, in some embodiments, it may be to only compare the noise value of the image after processing by the current image processing module with a noise threshold to determine whether it meets the first preset noise condition. Exemplarily, in response to the noise value of the image after processing by the current image processing module being greater than the first preset noise threshold, it is determined that the first preset noise condition is not met. Among them, the first preset noise threshold may also be a preset threshold corresponding to the current image processing module, and the first preset noise thresholds corresponding to different image processing modules may be different.
[0094] In some other embodiments, the electronic device may also combine the noise value of the image processed by the adjacent previous image processing module (i.e., the noise value of the input image of the current image processing module) based on the noise value of the image processed by the current image processing module, so as to determine whether the noise value of the image processed by the current image processing module meets the first preset noise condition. It can be understood that by correlating the noise values of the input image and the output image of the current image processing module, the noise impact brought by the processing of the current image processing module can be more clearly determined.
[0095] In the related art, each image processing module makes adjustments independently, without a corresponding noise feedback mechanism. For example, the person debugging the brightness only focuses on the debugged brightness and contrast, the person debugging the color module only focuses on the vividness of the debugged color, and the person debugging the sharpening module only focuses on how to enhance the sharpness to improve the details. The above solutions only focus on the visual effect of the image formed by the currently debugged image processing module, rather than whether the currently debugged image processing module will cause side effects. For example, when the sharpening module enhances the sharpness, a large amount of noise is usually introduced, which affects the subsequent image processing modules and results in a poor final image effect. In addition, due to the lack of a feedback mechanism, when encountering a large amount of noise, it is only possible to manually adjust the module according to the result of the final image, and the intelligence is relatively poor.
[0096] In contrast, in the embodiments of the present disclosure, during the process of the electronic device processing an image using multiple image processing modules, the noise value of the image processed by the current image processing module is determined, and when the noise value of the image processed by the current image processing module does not meet the first preset noise condition, the processing of the input image of the current image processing module by the current image processing module is adjusted. On the one hand, adjusting the noise value of the current image processing module itself for image processing based on the noise feedback mechanism helps to improve the processing quality of the current image processing module; on the other hand, since the image processing modules are interconnected, the output image of the previous image processing module in the adjacent image processing modules is the input image of the subsequent image processing module. Therefore, by controlling the noise of the image processed by the current image processing module, the impact of the processing of the current image processing module on the subsequent image processing modules can also be reduced, thereby improving the quality of the target image; on the third hand, based on the noise feedback of the current image processing module, adjustment processing is immediately performed when the first preset noise condition is not met, without waiting for the final target image to adjust the processing of each image processing module. Therefore, the efficiency of obtaining a high-quality target image can also be improved.
[0097] In some embodiments, it is characterized in that the image to be processed is a RAW image, and the multiple image processing modules are modules for performing image signal processing on the RAW image.
[0098] Exemplarily, the RAW image can be the original image captured by a smartphone based on a camera application; or, the RAW image can be the original image acquired by an image sensor of a digital camera, a scanner, or a film scanner. The image processing method of the embodiments of the present disclosure is applied to the image signal processing of the RAW image, which can improve the photographing quality.
[0099] In some embodiments, the method further includes:
[0100] Determining the image blocks after region division corresponding to the image processed by the current image processing module;
[0101] The determining the noise value of the image processed by the current image processing module includes:
[0102] Determining the noise values of the respective image blocks in the image processed by the current image processing module;
[0103] The adjusting the processing of the input image of the current image processing module in response to the noise value of the image processed by the current image processing module not satisfying the first preset noise condition includes:
[0104] In response to determining that the noise values of the respective image blocks in the image processed by the current image processing module do not satisfy the first preset noise condition, adjusting the processing of the input image of the current image processing module.
[0105] In the embodiments of the present disclosure, the electronic device determines the image blocks after region division corresponding to the image processed by the current image processing module. In some embodiments, the region division method may be to divide into a plurality of image blocks according to a fixed size. Figure 3 is a schematic diagram of an image division method shown according to an exemplary embodiment. As Figure 3 shown, the electronic device divides the image into n×m image blocks according to a fixed size.
[0106] In some other embodiments, the region division method may also be the image blocks obtained after image segmentation of the image based on the image content. Exemplarily, the image content of the image includes: people, sky, building, and plants. The electronic device performs image segmentation processing on the image according to the image content, so as to obtain the image blocks of different segmentation contents. The image segmentation method may be to extract the image features of different image contents in the image through a neural network model, and perform segmentation processing on the image according to the image features; or, the image segmentation method may also be to perform segmentation processing on the image according to the color, brightness, and / or texture attributes of the image pixels in different image contents.
[0107] It should be noted that in the embodiments of the present disclosure, the image blocks obtained after the division of the area corresponding to the image processed by the current image processing module may be the image blocks directly obtained by dividing the image processed by the current image processing module according to the above area division method, or may be the image blocks obtained based on the area division positions obtained by the image processing modules before the current image processing module. Exemplarily, Figure 2 if the image processing module shown includes an artificial intelligence segmentation module, then subsequent noise reduction modules, color mapping modules, color processing modules, sharpening modules, etc. can all follow the segmentation positions of the artificial intelligence segmentation module. For example, if the current image processing module is a module after the artificial intelligence segmentation module, then the current image processing module can obtain the image blocks after area division based on this segmentation position.
[0108] In the embodiments of the present disclosure, after the electronic device determines the image blocks obtained after the division of the area corresponding to the processed image, it can determine the noise values of each image block in the image processed by the current image processing module. Exemplarily, for each image block, the noise value can be determined based on the gradient quantization method of the following formula (1):
[0109]
[0110] where I is the input image block; is the component of the gradient of the pixel point (i, j) in the image block I in the x-axis direction; is the component of the gradient of the pixel point (i, j) in the image block I in the y-axis direction; and can be calculated by using, for example, the Sobel operator.
[0111] In the embodiments of the present disclosure, the electronic device determines the noise value e of each image block according to the energy function of the above formula (1) based on the pixel points included in each image block (n,m) (I). Figure 3 is a schematic diagram of an image block shown according to an exemplary embodiment. As Figure 3 shown, the noise value corresponding to the first image block is e (1,1) (I), and the noise value corresponding to the second image block is e (1,2) (I). In the embodiments of the present disclosure, the electronic device can also determine the noise value of the image processed by the current image processing module based on the noise values of the divided image blocks, that is, ∑e (n,m) (I1).
[0112] In the embodiments of the present disclosure, after the electronic device determines the noise values of each image block in the image processed by the current image processing module, it determines whether the first preset noise condition is satisfied based on the noise values of each image block in the image processed by the current image processing module, and adjusts the processing of the input image of the current image processing module by the current image processing module when the condition is not satisfied.
[0113] Exemplarily, the electronic device may determine the noise statistical value corresponding to the processed image based on the noise values of each image block in the image processed by the current image processing module, and determine whether the first preset noise condition is satisfied based on the noise statistical value. Exemplarily, the noise statistical value may be the mean value, sum value, maximum value, etc. of the noise, and the embodiments of the present disclosure do not make limitations.
[0114] It can be understood that in the embodiments of the present disclosure, the electronic device determines the image blocks included in the image processed by the current image processing module, thereby determining the noise values of different image blocks in the image, and can calculate the noise of the processed image more precisely, which helps to improve the necessity of adjusting the secondary processing of the input image by the current image processing module based on the noise feedback mechanism.
[0115] In some embodiments, the method further includes:
[0116] Determining the image blocks after the region division corresponding to the input image of the current image processing module, and the noise values corresponding to the image blocks;
[0117] Determining a first noise statistical value based on the noise values of the image blocks included in the input image of the current image processing module;
[0118] Determining a second noise statistical value based on the noise values of the image blocks included in the image processed by the current image processing module;
[0119] Determining a second noise difference value based on the first noise statistical value and the second noise statistical value;
[0120] In response to the second noise difference value being greater than the second preset noise difference threshold, determining that the noise value of the image processed by the current image processing module does not satisfy the first preset noise condition.
[0121] In the embodiments of the present disclosure, the electronic device determines the image blocks after the region division corresponding to the input image of the current image processing module, and the noise values corresponding to the image blocks, that is, determines the image blocks included in the image processed by the previous image processing module of the current image processing module and the noise values of the image blocks. Among them, the methods for determining the image blocks included in the image processed by the previous image processing module and the noise values of the image blocks are the same as those for processing the image processed by the current image processing module, and will not be elaborated here.
[0122] In the embodiments of the present disclosure, after the electronic device determines the noise value of the image block included in the input image of the current image processing module, it determines the first noise statistical value corresponding to the input image of the current image processing module. The determination method of the first noise statistical value may be the same as the method for determining the noise statistical value corresponding to the processed image described above. In the embodiments of the present disclosure, the noise statistical value corresponding to the processed image described above is the second noise statistical value. It should be noted that the first noise statistical value and the second noise statistical value are noise statistical values of the same type, for example, both are sum values or both are mean values, etc.
[0123] In the embodiments of the present disclosure, the electronic device determines the second noise difference value based on the first noise statistical value and the second noise statistical value, and determines that the noise value of the image processed by the current image processing module does not meet the first preset noise condition when the second noise difference value is greater than the second preset noise difference threshold. Among them, the second noise difference value may be a difference value or a ratio value. In addition, the second preset noise difference threshold may be a threshold corresponding to the current image processing module, and the second preset noise difference thresholds corresponding to different image processing modules may be the same or different.
[0124] Figure 4 is a schematic diagram of an image block included in the processed image of an adjacent image processing module shown according to an exemplary embodiment, as Figure 4 shown. Taking the first noise statistical value and the second noise statistical value both being the sum value of the noise values corresponding to the image block, and the second noise difference value being the difference between the first noise statistical value and the second noise statistical value as an example, the second noise difference value can be the following formula (2):
[0125] e ′ = ∑e (n,m) (I1) - ∑e (n,m) (I2); (2)
[0126] Among them, ∑e (n,m) (I1) is the second noise statistical value of the image processed by the previous image processing module; ∑e (n,m) (I2) is the first noise statistical value of the image processed by the previous image processing module of the current image processing module; e ′ is the second noise difference value.
[0127] It can be understood that in the embodiments of the present disclosure, based on the noise values of the image blocks corresponding to the input image and the output image of the current image processing module respectively, the first noise statistical value and the second noise statistical value are determined, and the influence of the current image processing module on the image noise is measured based on the difference between the first noise statistical value and the second noise statistical value, which can improve the accuracy of measuring the influence of the current image processing module on the noise.
[0128] In some embodiments, in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, adjusting the processing of the input image of the current image processing module by the current image processing module includes:
[0129] In response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, based on a preset adjustment method, adjust the processing of the input image of the current image processing module by the current image processing module.
[0130] In the embodiments of the present disclosure, the electronic device also combines a preset adjustment method to adjust the processing of the input image of the current image processing module by the current image processing module. It should be noted that the preset adjustment method can be an artificially configured method, and the adjustment methods configured for different image processing modules can be the same or different. The embodiments of the present disclosure do not limit this.
[0131] In the embodiments of the present disclosure, the preset adjustment method may include a global processing method and a local processing method. The global processing method is used to indicate operating and processing on the entire image; the local processing method is used to indicate operating and processing on a certain part or area of the image, for example, processing on an image block.
[0132] It can be understood that in the embodiments of the present disclosure, the electronic device combines a preset adjustment method to adjust the processing of the input image of the current image processing module by the current image processing module, which can meet different processing requirements and has a high degree of intelligence.
[0133] In some embodiments, in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, based on a preset adjustment method, adjust the processing of the input image of the current image processing module by the current image processing module includes:
[0134] In response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, and the preset adjustment method is the global processing method, adjust the processing parameters of the current image processing module to perform global processing on the input image of the current image processing module.
[0135] In the embodiments of the present disclosure, if the preset adjustment method is the global processing method, the electronic device adjusts the processing parameters of the current image processing module, such as the weight parameters or threshold parameters involved in the image processing module, etc., to reprocess the input image of the current image processing module.
[0136] Exemplarily, the current image processing module is a sharpening module. If it is determined that the noise values of each image block in the image after being processed by the current image processing module do not meet the first preset noise condition, for example, e ′ >e_global_T(n), the sharpening parameter of the sharpening module can be weakened, so as to reduce the noise value of the image after being processed by the sharpening module. Wherein, e ′ is the second noise difference value; e_global_T(n) is the second preset noise difference threshold corresponding to the sharpening module.
[0137] It can be understood that in the embodiments of the present disclosure, the electronic device can improve the image processing efficiency by adjusting the processing parameters of the current image processing module to globally process the input image of the current image processing module.
[0138] In some embodiments, in response to determining that the noise values of each image block in the image after being processed by the current image processing module do not meet the first preset noise condition, based on a preset adjustment method, adjusting the processing of the input image of the current image processing module by the current image processing module includes:
[0139] In response to determining that the noise values of each image block in the image after being processed by the current image processing module do not meet the first preset noise condition, and the preset adjustment method is a local processing method, determining the local image block to be adjusted in the input image of the current image processing module;
[0140] Processing the local image block to be adjusted based on the current image processing module.
[0141] In the embodiments of the present disclosure, if the preset adjustment method is a local processing method, the electronic device further determines the local image block to be adjusted in the input image of the current image processing module, so as to process the local image block to be adjusted based on the current image processing module. Wherein, the local image block to be adjusted may be an image block with a large noise value, or may be an image block located at the center position of the image in the input image of the current image processing module, and the embodiments of the present disclosure do not limit this.
[0142] It should be noted that since the image processing module usually performs global adjustment on the image, in the embodiments of the present disclosure, when the electronic device processes the local image block to be adjusted using the current image processing module, due to the relationship between the pixel points in the local image being inconsistent with the performance in the global image, processing the local image block based on the original processing parameters using the image processing module can also obtain different adjustment effects. Of course, in the embodiments of the present disclosure, when processing the local image block, the processing parameters of the image processing module can also be adjusted.
[0143] It can be understood that in the embodiments of the present disclosure, when the preset adjustment method is a local processing method, the electronic device determines the local image block to be adjusted in the input image of the current image processing module, and then processes the local image block to be adjusted, which can improve the pertinence of the processing of the current image processing module and contribute to improving the processing efficiency and accuracy.
[0144] In some embodiments, determining the local image block to be adjusted in the input image of the current image processing module includes:
[0145] Determining, among the image blocks of the image processed by the current image processing module, the target image blocks whose noise values do not meet the second preset noise condition;
[0146] Determining the image block at the same position as the target image block in the input image of the current image processing module as the local image block to be adjusted.
[0147] In the embodiments of the present disclosure, for the electronic device to determine the target image blocks whose noise values do not meet the second preset noise condition among the image blocks of the image processed by the current image processing module, the foregoing judgment method for determining whether the first preset noise condition is met can be referred to. For example, it can be based only on comparing the noise value of the image block in the image processed by the current image processing module with the second preset noise threshold, or on the basis of the noise value of the image block in the image processed by the current image processing module, combined with the noise value of the image block in the image processed by the previous adjacent image processing module (i.e., the noise value of the image block in the input image of the current image processing module), to determine the target image blocks whose noise values do not meet the second preset noise condition among the image blocks of the image processed by the current image processing module.
[0148] After the electronic device determines the target image blocks in the image processed by the current image processing module, it can determine the image block at the same position as the target image block in the input image of the current image processing module as the local image block to be adjusted. It can be understood that by determining the local image block to be adjusted in the input image of the current image processing module based on the noise value of the image block, the accuracy of determining the local image block to be adjusted can be improved, thereby improving the effect of reprocessing by the current image processing module.
[0149] In some embodiments, the method further includes:
[0150] Determining the image blocks after the regional division of the input image corresponding to the current image processing module, and the noise values corresponding to the image blocks;
[0151] For the image blocks at the same position in the input image and the processed image of the current image processing module, determining the first noise difference value corresponding to the image block;
[0152] Determining the target image blocks in each image block of the processed image whose noise values do not meet the second preset noise condition includes:
[0153] In response to the first noise difference value corresponding to the image block in the processed image being greater than the first preset noise difference threshold, determining that the image block is a target image block whose noise value does not meet the second preset noise condition.
[0154] In the embodiments of the present disclosure, for an electronic device to determine the image blocks after region division corresponding to the input image of the current image processing module and the noise values corresponding to the image blocks, reference may be made to the foregoing. After the electronic device determines the noise values of the image blocks in the input image of the current image processing module and the noise values of the image blocks in the processed image of the current image processing module, the first noise difference value corresponding to the image blocks at the same position in the input image and the processed image can be determined. The first noise difference value can be a difference or a ratio. Exemplarily, the first noise difference value corresponding to the image blocks at the same position can be shown by the following formula (3):
[0155] e ′ (n,m) = e (n,m) (I1) - e (n,m) (I2); (3)
[0156] Wherein, e (n,m) (I1) is the noise value of the image block in the processed image of the current image processing module; e (n,m) (I2) is the noise value of the image block at the same position in the input image of the current image processing module; e ′ (n,m) is the first noise difference value.
[0157] In the embodiments of the present disclosure, when the first noise difference value corresponding to the image blocks at the same position is greater than the first preset noise difference threshold, the electronic device determines the image block in the processed image as a target image block whose noise value does not meet the second preset noise condition. It should be noted that the first preset noise difference threshold can be a threshold corresponding to the current image processing module, and the first preset noise difference thresholds corresponding to different image processing modules can be the same or different. In addition, the first preset noise difference threshold can also be a threshold corresponding to the image block position. For example, the first preset noise difference threshold corresponding to the image block near the center of the image can be greater than the first preset noise difference threshold corresponding to the image block far from the center of the image.
[0158] It can be understood that in the embodiments of the present disclosure, the electronic device measures the influence of the current image processing module on image noise based on the noise difference between the image blocks at the same position, which helps to accurately determine the target image blocks, thereby improving the effect of local processing using the current image processing module.
[0159] In an embodiment of the present disclosure, when it is determined that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, and the preset adjustment method is a local processing method, the target image block in the processed image is determined based on the noise difference between the input image of the current image processing module and the image blocks at the same position in the processed image, so as to locally adjust the image block at the same position as the target image block in the input image of the current image processing module, thereby improving the processing effect of the current image processing module and further improving the effect of the target image processed by multiple image processing modules.
[0160] Exemplarily, taking the current image processing module as a sharpening module as an example, the electronic device can further determine e ′ >e_global_T(n), and further determine the image blocks of e ′ (n,m) >e_Local_T(n) to weaken the sharpening degree of the sharpening module on the image block located at the position (n, m) in the input image, thereby reducing the noise value of the image block located at the position (n, m) in the processed image. Wherein, e_Local_T(n) is the first preset noise difference threshold corresponding to the nth image processing module.
[0161] In some embodiments, the image blocks after the region division of the image processed by the current image processing module are the image blocks after image segmentation based on the image content;
[0162] Responding to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, and adjusting the processing of the input image of the current image processing module by the current image processing module includes:
[0163] For each image block after image segmentation, in response to determining that the noise values of the image blocks in the image processed by the current image processing module do not meet the first preset noise condition, adjusting the processing of the image block after image segmentation in the input image of the current image processing module by the current image processing module.
[0164] In an embodiment of the present disclosure, the image blocks after the region division of the image processed by the current image processing module are the image blocks after image segmentation based on the image content, such as the aforementioned image blocks of people, sky, buildings, plants, etc. It should be noted that the image processed by the current image processing module can be multiple image blocks after image segmentation.
[0165] In the embodiments of the present disclosure, for the image blocks obtained by the electronic device based on image segmentation, each image block after image segmentation is independently processed. When it is determined that the noise value based on the image block does not meet the first preset noise condition, the current image processing module is adjusted to process the image block after image segmentation in the input image of the current image processing module. Among them, when the electronic device determines whether the image block after image segmentation meets the first preset noise condition, it can refer to the method of determining whether the noise value of the image block meets the second preset noise condition as described above, which will not be elaborated here. Taking the image blocks with the same image segmentation content in the image processed by the current image processing module and the image processed by the previous adjacent image processing module of the current image processing module (i.e., the input image of the current image processing module) as an example, the calculation method of the difference between the image blocks with the same image segmentation content is as follows in formula (4):
[0166] e n _seg′ = e n _seg(I1) - e n _seg(I2); (4)
[0167] Among them, e n _seg(I1) is the noise value of the image block of the segmentation content in the processed image I1; e n _seg(I2) is the noise value of the image block of the same segmentation content in the input image I2; e n _seg′ can be the third noise difference value.
[0168] In the embodiments of the present disclosure, the electronic device may determine that the first preset noise condition is not met when e n _seg′ > e m _seg_T(n), and adjust the processing of the image block corresponding to the image segmentation content by the current image processing module. Among them, e m _seg_T(n) is the third preset noise difference threshold corresponding to the mth image segmentation content and the nth image processing module (for example, the current image processing module). The third preset noise difference threshold may be related to the image segmentation content and may also be related to the image processing module. The embodiments of the present disclosure do not limit this. Exemplarily, m = 1 represents the sky, and m = 2 represents green plants.
[0169] Exemplarily, taking the sharpening module in Figure 2 as the current image processing module, when e1_seg′ > em_seg_T(15), it means that after passing through the sharpening module, the noise level of the sky exceeds the third preset noise difference threshold, and the sharpening module will separately reduce the sharpening level of the sky area.
[0170] It can be understood that in the embodiments of the present disclosure, the electronic device independently processes each image block after image segmentation. When it is determined that the noise value based on a single image block does not meet the first preset noise condition, the processing of the image block after image segmentation in the input image by the current image processing module is adjusted, which can improve the processing effect.
[0171] A specific example is provided below in combination with any of the above embodiments, which is applied to the photographing process of a terminal device. Figure 5 It is a schematic diagram of the processing flow of the RAW image in the photographing process shown according to an exemplary embodiment, as Figure 5 shown. Figure 2 As shown, in addition to the original image (RAW image) input module, there are a total of 15 modules. When the RAW image reaches any image processing module, the noise value of the image processed by the current image processing module (that is, the noise level is calculated) can be determined, and based on the calculated noise value, the current image processing module is re-directed to re-process the input image until the noise value of the image processed by the current image processing module meets the first preset noise condition. Figure 5 In this figure, the artificial intelligence segmentation module segments the image, and sequentially transmits the segmented image to the noise reduction module, color mapping module, color processing module, and sharpening module according to the module connection sequence. That is, the subsequent processing modules of the artificial intelligence segmentation module can follow the image segmentation result of the artificial intelligence segmentation module, so as to facilitate each module to perform the foregoing targeted processing for each image block corresponding to the image segmentation. In the embodiments of the present disclosure, the terminal can divide the image into n×m image blocks and determine the energy value e (n,m) (I) and the total energy value ∑e (n,m) (I) of the image. In addition, for each module after the artificial intelligence segmentation module of the terminal, the energy value e n _seg(I) of each image segmentation region (such as buildings, green plants, sky, ground, and people, etc.) can be determined. Based on the determination of the above energy value (noise value), the terminal can determine whether the noise value of the image processed by the current image processing module meets the first preset noise condition, so as to re-adjust the processing of the input image by the current image processing module when it does not meet the condition.
[0172] It should be noted that in the embodiments of the present disclosure, the terminal can use the image processing method of the embodiments of the present disclosure to optimize image photographing, or not. The user of the terminal can set whether to use the optimization method of image photographing. For example, the terminal device can accept the user's setting of not using the image photographing optimization method, and set the feedback parameter feedback_flag = 0, so as not to execute the image processing method of the embodiments of the present disclosure. If the terminal device accepts the user's adoption of the image photographing optimization method, the feedback parameter feedback_flag = 1 is set to execute the image processing method of the embodiments of the present disclosure.
[0173] In addition, in the embodiments of the present disclosure, the user of the terminal can set the adjustment method of the image. For example, if the terminal device receives the global processing method set by the user, the processing method parameter Adjust_Flag = 0 is set to execute the method corresponding to the foregoing global processing method; if the terminal device receives the local processing method set by the user, the processing method parameter Adjust_Flag = 1 is set to execute the method corresponding to the foregoing local processing method.
[0174] It should be noted that when the method of the embodiments of the present disclosure is applied to the image processing process participated by the debugger, the electronic device can also receive the frame selection operation of the debugger. Figure 6 It is a schematic diagram of the frame selection area shown according to an exemplary embodiment, as Figure 6 shown, the debugger frames an image area on the image. For example, the area framed is in the target image output by the image output module. The electronic device will calculate the noise values of the previous modules (such as the image encoding module, the sharpening module and trace back to the white balance correction module) for the area framed by the debugger and then output, so as to facilitate the debugger to trace which module causes the increase in the noise level of this area, greatly improving the efficiency of the debugger.
[0175] It can be understood that the image processing method in the embodiments of the present disclosure helps to improve the processing quality of the current image processing module, and can also reduce the impact of the processing of the current image processing module on the subsequent image processing modules, thereby improving the quality and processing efficiency of the target image.
[0176] Figure 7 It is a diagram of an image processing device shown according to an exemplary embodiment. The image processing device includes:
[0177] An acquisition module 101 configured to acquire an image to be processed;
[0178] A first determination module 102 configured to determine the noise value of the image after being processed by the current image processing module during the process of processing the image by using a plurality of image processing modules; wherein, among the plurality of image processing modules, the image after being processed by the previous image processing module adjacent to the current image processing module is the input image of the subsequent image processing module;
[0179] An adjustment module 103 configured to, in response to the noise value of the image after being processed by the current image processing module not satisfying the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module, and obtain a target image after processing the image based on the plurality of image processing modules.
[0180] In some embodiments, the device further includes:
[0181] A second determination module, configured to determine image blocks after region division corresponding to the image processed by the current image processing module;
[0182] The first determination module 102 is further configured to determine the noise value of each image block in the image processed by the current image processing module;
[0183] The adjustment module 103 is further configured to, in response to determining that the first preset noise condition is not satisfied based on the noise values of the image blocks in the image processed by the current image processing module, adjust the processing of the input image of the current image processing module by the current image processing module.
[0184] In some embodiments, the adjustment module 103 is further configured to, in response to determining that the first preset noise condition is not satisfied based on the noise values of the image blocks in the image processed by the current image processing module, adjust the processing of the input image of the current image processing module by the current image processing module based on a preset adjustment method.
[0185] In some embodiments, the adjustment module 103 is further configured to, in response to determining that the first preset noise condition is not satisfied based on the noise values of the image blocks in the image processed by the current image processing module, and the preset adjustment method is a global processing method, adjust the processing parameters of the current image processing module to perform global processing on the input image of the current image processing module.
[0186] In some embodiments, the adjustment module 103 is further configured to, in response to determining that the first preset noise condition is not satisfied based on the noise values of the image blocks in the image processed by the current image processing module, and the preset adjustment method is a local processing method, determine the local image blocks to be adjusted in the input image of the current image processing module; process the local image blocks to be adjusted based on the current image processing module.
[0187] In some embodiments, the adjustment module 103 is further configured to determine target image blocks in the image blocks of the image processed by the current image processing module whose noise values do not satisfy the second preset noise condition; determine the image blocks at the same positions as the target image blocks in the input image of the current image processing module as the local image blocks to be adjusted.
[0188] In some embodiments, the apparatus further includes:
[0189] A third determination module, configured to determine the image blocks after region division corresponding to the input image of the current image processing module, and the noise values corresponding to the image blocks; for the image blocks at the same positions in the input image and the processed image of the current image processing module, determine the first noise difference value corresponding to the image blocks.
[0190] The adjustment module 103 is further configured to, in response to the first noise difference value corresponding to the image block in the processed image being greater than the first preset noise difference threshold, determine that the image block is a target image block whose noise value does not meet the second preset noise condition.
[0191] In some embodiments, the image blocks after region division corresponding to the processed image of the current image processing module are the image blocks after image segmentation based on the image content; the adjustment module 103 is further configured to, for each image block after image segmentation, in response to determining that the noise value of the image block in the processed image of the current image processing module does not meet the first preset noise condition, adjust the processing of the image block after image segmentation in the input image of the current image processing module by the current image processing module.
[0192] In some embodiments, the apparatus further includes:
[0193] A fourth determination module, configured to determine the image blocks after region division corresponding to the input image of the current image processing module, and the noise values corresponding to the image blocks; determine a first noise statistical value based on the noise values of the image blocks included in the input image of the current image processing module; determine a second noise statistical value based on the noise values of the image blocks included in the processed image of the current image processing module; determine a second noise difference value based on the first noise statistical value and the second noise statistical value; in response to the second noise difference value being greater than the second preset noise difference threshold, determine that the noise value of the processed image of the current image processing module does not meet the first preset noise condition.
[0194] In some embodiments, the image to be processed is a RAW image, and the multiple image processing modules are modules for performing image signal processing on the RAW image.
[0195] Regarding the apparatus in the above embodiments, the specific manners in which each module performs operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0196] An embodiment of the present disclosure provides an electronic device, including:
[0197] A processor;
[0198] A memory for storing instructions executable by the processor;
[0199] Wherein, the processor is configured to implement the image processing method according to any embodiment of the present disclosure when running the executable instructions.
[0200] The memory can be various types of memories, such as random access memory, read-only memory, flash memory, etc. The memory can be used for information storage. For example, it stores computer-executable instructions, etc. The computer-executable instructions can be various program instructions, such as target program instructions and / or source program instructions, etc.
[0201] The processor can be various types of processors, such as a central processing unit, a microprocessor, a digital signal processor, a programmable array, a digital signal processor, an application-specific integrated circuit, or an image processor, etc. The processor can be connected to the memory through a bus. The bus can be an integrated circuit bus, etc.
[0202] Figure 8 It is a schematic structural diagram of an electronic device shown according to an exemplary embodiment. The method of the embodiments of the present disclosure can be applied to electronic devices such as mobile phone terminals. The structure of the electronic device is as Figure 8 the electronic device 900 in.
[0203] Referring to Figure 8 , the electronic device 900 may include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.
[0204] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above method. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.
[0205] The memory 904 is configured to store various types of data to support the operation of the device 900. Examples of such data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, and the like. The memory 904 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0206] The power supply component 906 provides power to various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 900.
[0207] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of touch or swipe actions, but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have focal length and optical zoom capabilities.
[0208] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice determination mode. The received audio signals can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.
[0209] The I / O interface 912 provides an interface between the processing component 902 and a peripheral interface module, which can be a keyboard, a click wheel, buttons, etc. These buttons can include, but are not limited to: a home button, a volume button, a start button, and a lock button.
[0210] The sensor assembly 914 includes one or more sensors for providing an assessment of various aspects of the state of the electronic device 900. For example, the sensor assembly 914 can detect the on / off state of the device 900, the relative positioning of components, such as the display and keypad of the electronic device 900. The sensor assembly 914 can also detect a change in the position of the electronic device 900 or a component of the electronic device 900, the presence or absence of user contact with the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and a change in the temperature of the electronic device 900. The sensor assembly 914 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 914 can also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0211] The communication component 916 is configured to facilitate communication between the electronic device 900 and other devices in a wired or wireless manner. The electronic device 900 can access a wireless network based on communication standards, such as WiFi, 2G, or 3G, or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0212] In an exemplary embodiment, the electronic device 900 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method.
[0213] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions, such as the memory 904 including instructions, is also provided. The above instructions can be executed by the processor 920 of the electronic device 900 to complete the above-described method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, and an optical data storage device, etc.
[0214] In the above embodiments provided by the present disclosure, it should be understood that the disclosed methods and devices can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of the modules is only a logical function division. In actual implementation, there may be other division methods. For example, multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical, or other forms.
[0215] The units described above as separate components may or may not be physically separated. The components shown as units may or may not be physical units, that is, they can be located in one place or distributed to multiple network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.
[0216] In addition, each functional unit in the embodiments of the present disclosure can be all integrated in a calling module, or each unit can be separately used as a unit, or two or more units can be integrated in one unit; the above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0217] It should be noted that "first", "second", etc. are used to distinguish similar objects and do not necessarily have to be used to describe a specific order or sequence.
[0218] In addition, the technical solutions described in the embodiments of the present disclosure can be arbitrarily combined without conflict.
[0219] Those skilled in the art will readily think of other implementation schemes of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common general knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims above.
[0220] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only limited by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: Obtain an image to be processed; During the process of processing the image by using multiple image processing modules, determine the noise value of the image after being processed by the current image processing module; wherein, among the multiple image processing modules, the image after being processed by the previous image processing module adjacent to the current image processing module is the input image of the next image processing module; In response to the noise value of the image after being processed by the current image processing module not meeting the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module, and obtain a target image after processing the image based on the multiple image processing modules.
2. The method according to claim 1, characterized in that, The method further includes: Determine the image blocks after regional division corresponding to the image after being processed by the current image processing module; The determination of the noise value of the image after being processed by the current image processing module includes: Determine the noise value of each image block in the image after being processed by the current image processing module; The adjustment of the processing of the input image of the current image processing module by the current image processing module in response to the noise value of the image after being processed by the current image processing module not meeting the first preset noise condition includes: In response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module.
3. The method according to claim 2, wherein The adjustment of the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition includes: In response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition, adjust the processing of the input image of the current image processing module by the current image processing module based on a preset adjustment method.
4. The method according to claim 3, wherein The adjustment of the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition and based on a preset adjustment method includes: In response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition and the preset adjustment method is a global processing method, adjust the processing parameters of the current image processing module to perform global processing on the input image of the current image processing module.
5. The method according to claim 3, characterized in that, The adjustment of the processing of the input image of the current image processing module by the current image processing module in response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition and based on a preset adjustment method includes: In response to determining that the noise values of the image blocks in the image after being processed by the current image processing module do not meet the first preset noise condition and the preset adjustment method is a local processing method, determine the local image blocks to be adjusted in the input image of the current image processing module; Process the local image block to be adjusted based on the current image processing module.
6. The method according to claim 5, wherein Determining the local image block to be adjusted in the input image of the current image processing module includes: Determining, among the image blocks of the image processed by the current image processing module, a target image block whose noise value does not meet the second preset noise condition; Determining the image block at the same position as the target image block in the input image of the current image processing module as the local image block to be adjusted.
7. The method according to claim 6, wherein The method further includes: Determining the image blocks after regional division of the input image corresponding to the current image processing module, and the noise values corresponding to the image blocks; Determining, for the image blocks at the same position in the input image and the processed image of the current image processing module, the first noise difference value corresponding to the image blocks; Determining, among the image blocks of the processed image, a target image block whose noise value does not meet the second preset noise condition includes: In response to the first noise difference value corresponding to the image block in the processed image being greater than the first preset noise difference threshold, determining the image block as a target image block whose noise value does not meet the second preset noise condition.
8. The method according to claim 2, characterized in that The image blocks after regional division of the image processed by the current image processing module are the image blocks after image segmentation based on the image content; In response to determining that the noise value of each image block in the image processed by the current image processing module does not meet the first preset noise condition, adjusting the processing of the input image of the current image processing module by the current image processing module includes: For each image block after image segmentation, in response to determining that the noise value of the image block in the image processed by the current image processing module does not meet the first preset noise condition, adjusting the processing of the image block after image segmentation in the input image of the current image processing module by the current image processing module.
9. The method according to any one of claims 2-8, characterized in that The method further includes: Determining the image blocks after regional division of the input image corresponding to the current image processing module, and the noise values corresponding to the image blocks; Determining a first noise statistical value based on the noise values of the image blocks included in the input image of the current image processing module; Determining a second noise statistical value based on the noise values of the image blocks included in the image processed by the current image processing module; Determining a second noise difference value based on the first noise statistical value and the second noise statistical value; In response to the second noise difference value being greater than the second preset noise difference threshold, determining that the noise value of the image processed by the current image processing module does not meet the first preset noise condition.
10. The method according to any one of claims 1-8, characterized in that, The image to be processed is a RAW image, and the multiple image processing modules are modules for performing image signal processing on the RAW image.
11. An image processing apparatus, characterized in that, The apparatus includes: An acquisition module configured to acquire an image to be processed; A first determination module configured to determine the noise value of the image processed by the current image processing module during the process of processing the image using multiple image processing modules; wherein, among the multiple image processing modules, the image processed by the previous image processing module adjacent to the current image processing module is the input image of the subsequent image processing module; An adjustment module, configured to adjust the processing of the input image of the current image processing module in response to the noise value of the image processed by the current image processing module not meeting the first preset noise condition, and obtain a target image obtained by processing the image based on the multiple image processing modules.
12. An electronic device, characterized in that, Comprising: A processor; A memory for storing processor-executable instructions; Wherein, the processor is configured to: when running the executable instructions, implement the image processing method according to any one of claims 1 to 10.
13. A computer-readable storage medium, characterized in that, The readable storage medium stores an executable program, wherein the executable program implements the image processing method according to any one of claims 1 to 10 when executed by the processor.