Image processing method, image processing device, storage medium and electronic device
By acquiring scene information in image processing and adaptively determining the filter parameters for airspace denoising processing, the problem of poor image denoising processing in the prior art is solved, and more efficient image denoising and detail information retention is achieved.
Patent Information
- Application Number
- CN202111418060.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-25
- Publication Date
- 2025-04-01
- Estimated Expiration
- 2041-11-25
AI Technical Summary
In the prior art, the image denoising effect needs to be improved, especially in the process of reducing noise while maintaining image detail information.
By obtaining scene information of the image to be processed, its filtering parameters are determined, and airspace denoising processing is performed based on these parameters. This method adapts to the needs of different shooting scenes and balances the noise removal force with the retention of detailed information.
The effect of image denoising processing is improved, and the detailed information loss caused by excessive denoising force is reduced, or the noise retention caused by insufficient denoising force is reduced, which significantly improves the image quality after denoising process.
Smart Images

Figure CN114119414B_ABST
Abstract
Description
Background Art
[0002] Image noise refers to the interference information existing in image data, which usually comes from external influences on the image system and errors and jitters within the image system, which will affect the visual effect of the image. In related technologies, the effect of image denoising needs to be improved.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to those skilled in the art. Summary of the invention
[0004] The present disclosure provides an image processing method, an image processing device, a computer-readable storage medium and an electronic device, so as to improve the effect of image denoising processing at least to a certain extent.
[0005] According to a first aspect of the present disclosure, there is provided an image processing method, comprising: obtaining an image to be processed and obtaining scene information of the image to be processed; determining filtering parameters of the image to be processed according to the scene information; and performing spatial domain denoising on the image to be processed based on the filtering parameters.
[0006] According to a second aspect of the present disclosure, there is provided an image processing device, comprising: an image acquisition module, configured to acquire an image to be processed and acquire scene information of the image to be processed; a filtering parameter determination module, configured to determine filtering parameters of the image to be processed according to the scene information; and a spatial denoising module, configured to perform spatial denoising on the image to be processed based on the filtering parameters.
[0007] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the image processing method of the first aspect and possible implementation methods thereof are implemented.
[0008] According to a fourth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute the image processing method of the above-mentioned first aspect and its possible implementation method by executing the executable instructions.
[0009] The technical solution disclosed in this disclosure has the following beneficial effects:
[0010] On the one hand, this scheme determines the filtering parameters of the image to be processed according to the scene information, so that the filtering parameters can adapt to the shooting scene of the image to be processed, so as to meet the needs and preferences of the shooting scene for the image denoising strength or image detail information, and then use the filtering parameters to perform spatial denoising processing, thereby improving the image denoising effect. On the other hand, the filtering parameters used in this scheme correspond to the image denoising strength suitable for the shooting scene, which can reduce the excessive loss of detail information due to excessive denoising strength, or the situation where more image noise is retained due to insufficient denoising strength, in the spatial denoising processing, and better balance the image denoising strength and the retention of image detail information, thereby improving the image quality after denoising processing.
[0011] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0013] Figure 1 A schematic diagram showing a system architecture in this exemplary embodiment;
[0014] Figure 2 A schematic diagram showing the structure of an electronic device in this exemplary embodiment is shown;
[0015] Figure 3 A flowchart showing an image processing method in this exemplary embodiment is shown;
[0016] Figure 4 A schematic diagram showing global filtering parameters and local filtering parameters in this exemplary embodiment;
[0017] Figure 5 A flow chart of determining global filtering parameters and local filtering parameters in this exemplary embodiment is shown;
[0018] Figure 6 A schematic diagram showing the determination of global guided filtering parameters and local guided filtering parameters in this exemplary embodiment is shown;
[0019] Figure 7 A flowchart of performing image enhancement processing in this exemplary embodiment is shown;
[0020] Figure 8A schematic flowchart showing an image processing method in this exemplary embodiment;
[0021] Fig. 9 A schematic structural diagram of an image processing device in this exemplary embodiment is shown. DETAILED DESCRIPTION
[0022] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concepts of the example embodiments are fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced while omitting one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.
[0023] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0024] Spatial Noise Reduction (SNR) refers to denoising based on the continuity of image signals in the spatial domain. It is usually performed by filtering within a single frame image to achieve local smoothing of the image, thereby suppressing noise. In related technologies, spatial denoising often leads to the loss of image detail information, such as destroying the original image detail texture, edge information, etc. The greater the denoising intensity, the more image detail information is lost. Therefore, it is difficult to guarantee the quality of the denoised image.
[0025] In view of the above problems, an exemplary embodiment of the present disclosure provides an image processing method. Figure 1 The system architecture and application scenarios of the operating environment of this exemplary embodiment are exemplarily described.
[0026] Figure 11 shows a schematic diagram of a system architecture, which may include a terminal 110 and a server 120. The terminal 110 may be a terminal device such as a smart phone, a tablet computer, a desktop computer, a laptop computer, etc. The server 120 generally refers to a background system that provides image processing related services in this exemplary embodiment, and may be a server or a cluster formed by multiple servers. The terminal 110 and the server 120 may be connected via a wired or wireless communication link to perform data exchange.
[0027] In one implementation, the image processing method in this exemplary implementation may be performed by terminal 110. For example, when a user uses terminal 110 to shoot a video image or video, or when a user selects an image or video in a local library of terminal 110, terminal 110 performs denoising on one or more frames of the image or video, and outputs the denoised image or video.
[0028] In one implementation, the image processing method may be executed by the server 120. For example, after a user uses the terminal 110 to shoot an image or video, or after a user selects an image or video from a local library of the terminal 110, the terminal 110 uploads the image or video to the server 120, and the server 120 performs denoising on the image or one or more frames of the image in the video, and returns the denoised image or video to the terminal 110.
[0029] As can be seen from the above, the execution subject of the image processing method in this exemplary embodiment may be the terminal 110 or the server 120, and the present disclosure does not limit this.
[0030] The exemplary embodiment of the present disclosure also provides an electronic device for executing the image processing method, which may be the above-mentioned terminal 110 or server 120. Generally, the electronic device may include a processor and a memory, the memory is used to store executable instructions of the processor, and the processor is configured to execute the above-mentioned image processing method by executing the executable instructions.
[0031] Below Figure 2 The mobile terminal 200 in FIG. 1 is taken as an example to exemplify the structure of the electronic device. It should be understood by those skilled in the art that, in addition to the components specifically used for mobile purposes, Figure 2 The construction in can also be applied to fixed type equipment.
[0032] like Figure 2 As shown, the mobile terminal 200 may specifically include: a processor 201, a memory 202, a bus 203, a mobile communication module 204, an antenna 1, a wireless communication module 205, an antenna 2, a display screen 206, a camera module 207, an audio module 208, a power module 209 and a sensor module 210.
[0033] The processor 201 may include one or more processing units, for example, the processor 201 may include an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor and / or an NPU (Neural-Network Processing Unit), etc. The image processing method in this exemplary embodiment may be executed by an AP, a GPU or a DSP. When the method involves processing related to a neural network, it may be executed by an NPU, for example, the NPU may load neural network parameters and execute algorithm instructions related to the neural network.
[0034] The encoder can encode (i.e. compress) an image or video to reduce the data size for easy storage or transmission. The decoder can decode (i.e. decompress) the encoded data of an image or video to restore the image or video data. The mobile terminal 200 can support one or more encoders and decoders, such as: image formats such as JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), BMP (Bitmap), and video formats such as MPEG (Moving Picture Experts Group) 1, MPEG2, H.263, H.264, and HEVC (High Efficiency Video Coding).
[0035] The processor 201 may be connected to the memory 202 or other components via a bus 203 .
[0036] The memory 202 can be used to store computer executable program codes, which include instructions. The processor 201 executes various functional applications and data processing of the mobile terminal 200 by running the instructions stored in the memory 202. The memory 202 can also store application data, such as images, videos and other files.
[0037] The communication function of the mobile terminal 200 can be realized by the mobile communication module 204, the antenna 1, the wireless communication module 205, the antenna 2, the modulation and demodulation processor, and the baseband processor. The antenna 1 and the antenna 2 are used to transmit and receive electromagnetic wave signals. The mobile communication module 204 can provide 2G, 3G, 4G, 5G and other mobile communication solutions applied to the mobile terminal 200. The wireless communication module 205 can provide wireless communication solutions such as wireless LAN, Bluetooth, and near field communication applied to the mobile terminal 200.
[0038] The display screen 206 is used to implement display functions, such as displaying user interfaces, images, videos, etc. The camera module 207 is used to implement shooting functions, such as shooting images, videos, etc. The audio module 208 is used to implement audio functions, such as playing audio, collecting voice, etc. The power module 209 is used to implement power management functions, such as charging the battery, powering the device, monitoring the battery status, etc. The sensor module 210 may include a depth sensor 2101, a pressure sensor 2102, a gyroscope sensor 2103, an air pressure sensor 2104, etc., to implement corresponding sensing detection functions.
[0039] Combine the following Figure 3 The image processing method in this exemplary embodiment is described. Figure 3 An exemplary process of the image processing method is shown, which may include:
[0040] Step S310, obtaining an image to be processed and obtaining scene information of the image to be processed;
[0041] Step S320, determining filtering parameters of the image to be processed according to the scene information;
[0042] Step S330: performing spatial denoising processing on the image to be processed based on the filtering parameters.
[0043] Based on the above method, on the one hand, this scheme determines the filtering parameters of the image to be processed according to the scene information, so that the filtering parameters can be adaptive to the shooting scene of the image to be processed, so as to meet the needs and preferences of the shooting scene for the image denoising strength or image detail information, and then use the filtering parameters to perform spatial denoising processing, thereby improving the image denoising effect. On the other hand, the filtering parameters used in this scheme correspond to the image denoising strength suitable for the shooting scene, which can reduce the excessive loss of detail information due to excessive denoising strength, or the situation where more image noise is retained due to insufficient denoising strength, in the spatial denoising processing, and better balance the image denoising strength and the retention of image detail information, thereby improving the image quality after denoising processing.
[0044] Below Figure 3 Each step in the procedure is described in detail.
[0045] refer to Figure 3 In step S310, an image to be processed is obtained, and scene information of the image to be processed is obtained.
[0046] The image to be processed is an image that needs to be denoised. The present disclosure does not limit the source of the image to be processed. For example, the image to be processed can be a currently captured image, or an image selected by a user in a local library, or an image obtained from other devices, or a current frame image in a video.
[0047] Scene information is information reflecting the shooting scene of the image to be processed (the shooting scene in this article includes the shooting object). In one embodiment, the scene information of the image to be processed may include a scene tag (Scene Tag), and the scene tag represents the classification tag of the shooting scene of the image to be processed, for example, it may be scenery, beach, blue sky, green grass, snow scene, night scene, sunset, fireworks, spotlight, indoor, text, portrait, baby, cat, dog, food, etc. In one embodiment, the scene information of the image to be processed may include multiple scene tags. For example, the image to be processed includes multiple shooting objects, and different shooting objects may correspond to different scene tags, or the foreground and background in the image to be processed correspond to different scene tags. Exemplarily, the scene information of the image to be processed may include portraits and other scene tags. For example, if the image to be processed is a portrait shot in the snow, the scene information may include two scene tags: portrait and snow scene.
[0048] The present disclosure does not limit the method for obtaining scene information. For example, when a user shoots an image to be processed, a plurality of optional shooting modes are provided, such as portrait, night scene, indoor, text, etc., so that the scene information of the image to be processed can be determined according to the shooting mode selected by the user.
[0049] In one embodiment, scene detection may be performed on the image to be processed after it is acquired to obtain scene information. Scene detection may be achieved by an artificial intelligence method or a non-artificial intelligence image processing method. Exemplarily, the artificial intelligence method may include using a pre-trained neural network to perform scene detection on the image to be processed to output scene information. The non-artificial intelligence image processing method may include performing color detection on the image to be processed, and determining the scene information based on the color detection result. For example, if it is detected that the image to be processed includes a large area of sky blue, then the scene of the image to be processed is determined to be blue sky.
[0050] In one embodiment, the above-mentioned artificial intelligence method and non-artificial intelligence image processing method can be combined to realize scene detection. For example, after using neural network and color detection to perform scene detection respectively, the scene information is determined by combining the detection results of the two aspects.
[0051] In one implementation, the scene information may include global scene information of the image to be processed and / or local scene information of at least one first region in the image to be processed.
[0052] The first region may be any local region in the image to be processed. To facilitate the distinction from the local region in the denoised image described later, the local region in the image to be processed is referred to as the first region, and the local region in the denoised image is referred to as the second region.
[0053] Global scene information refers to the scene information for the entire image to be processed. Generally, the image to be processed is a certain shooting scene in a macroscopic sense, and the information of the scene is the global scene information of the image to be processed. In contrast, local scene information refers to the scene information of the local area of the image to be processed, usually the scene information corresponding to a local shooting object. For example, the image to be processed is an image of a person and a dog shot in the snow. When the proportion of people and dogs in the image to be processed is not high, the global scene information of the image to be processed can be the snow, the local scene information of the local area where the person is located can be the portrait of the person, and the local scene information of the local area where the dog is located can be the dog; when the proportion of people in the image to be processed is high, the global scene information of the image to be processed can be the portrait of the person, the local scene information of the local area where the dog is located can be the dog, and the local scene information of the local area of the snow can be the snow.
[0054] In one embodiment, a global scene detection model and a local scene detection model may be trained to detect the global scene information and the local scene information of the image to be processed, respectively. For example, the global scene detection model may be an image classification model, which is used to output a scene label for globally classifying the image to be processed; the local scene detection model may be a semantic segmentation model, which is used to output a semantic classification result (i.e., a scene label) for each local area (or each pixel) in the image to be processed.
[0055] In one embodiment, a model may be trained to perform global scene classification and local scene classification at the same time, and output global scene information and local scene information.
[0056] In one embodiment, the global scene information of the image to be processed can also be determined by a global scene detection model, and then the local scene information of the image to be processed can be determined by a non-artificial intelligence image processing method (such as color detection). For example, the global scene label of the image to be processed is output by a pre-trained image classification model, such as the global scene label is sky. Then, color detection is performed on the image to be processed, such as detecting the area with a blue chromaticity value for the image to be processed in a color mode such as YUV or HSL, and outputting the local scene label of the area as sky.
[0057] Continue to refer Figure 3 In step S320, filtering parameters of the image to be processed are determined according to the scene information.
[0058] The filtering parameters are parameters used to filter the image to be processed. The filtering parameters can directly or indirectly represent the degree of filtering, which is equivalent to the strength of image denoising. The present disclosure does not limit the specific content of the filtering parameters. Exemplarily, the filtering parameters can be the size of the filter window (such as the filter radius) in mean filtering, Gaussian filtering, and non-local mean filtering. The larger the size, the higher the degree of filtering; or, the filtering parameter can be eps in guided filtering, where eps (also expressed as ε) is a linear parameter (a) of the guided filtering. k , b k ) is a regularization parameter used for compensation, which can adjust the accuracy of image edge detection. The larger the eps is, the higher the degree of filtering is.
[0059] According to the scene information, the requirements and preferences of the image to be processed for the image denoising strength or image detail information can be determined, which essentially indicates the impact of image denoising or detail information on the visual effect in the shooting scene of the image to be processed. Generally, the degree of demand for image denoising strength is negatively correlated with the degree of demand for image detail information. For example, the higher the demand for detail information, the lower the demand for image denoising strength, that is, the lower the required filtering degree. Based on this idea, appropriate filtering parameters can be determined to achieve the adaptation of filtering parameters and scene information.
[0060] For example, in guided filtering, the default filtering parameter eps=36 can be set; when the scene information of the image to be processed is blue sky, the demand for detail information is low, and it can receive a higher degree of filtering processing, so eps=50 can be set accordingly; when the scene information of the image to be processed is grass, since the grass has more detailed textures, the demand for detail information is high, and it can only receive a lower degree of filtering processing, so eps=16 can be set accordingly.
[0061] It should be understood that in the above example, the filtering parameter is positively correlated with the filtering degree, and a high filtering degree that can be received corresponds to a high filtering parameter. However, the present disclosure is not limited to this. In some cases, the filtering parameter and the filtering degree may also be negatively correlated, and a high filtering degree that can be received corresponds to a low filtering parameter.
[0062] In one implementation, the correspondence between different scene information and filtering parameters can be pre-configured, for example, appropriate filtering parameters for filtering images in different shooting scenes can be configured based on experience to form a configuration relationship table. Further, after obtaining the scene information of the image to be processed, the filtering parameters corresponding to the scene information can be determined by searching in the above correspondence.
[0063] In one embodiment, the filtering parameters may include global filtering parameters of the image to be processed. The global filtering parameters refer to filtering parameters for the entire image to be processed. Figure 4 As shown, for each pixel point or each area in the image to be processed, it may correspond to the same global filtering parameter. For example, the above eps=50, eps=16, etc. are all global filtering parameters. In step S330, the global filtering parameters may be used to filter the entire image to be processed.
[0064] In one embodiment, the filtering parameters may include local filtering parameters of at least one first region in the image to be processed. The local filtering parameters refer to filtering parameters for the first region and are only used to perform filtering processing on the first region. Figure 4 As shown, for different regions in the image to be processed, they can correspond to different local filtering parameters, such as Figure 4 , the image to be processed is divided into four first regions, and the local filtering parameters of each first region are different. Thus, more appropriate filtering parameters can be set for a single region. In step S330, the local filtering parameters of each first region can be used to filter the first region, so that different regions are filtered to different degrees.
[0065] In one embodiment, the filter parameters may be expressed in the form of a filter parameter map, which is used to represent the filter parameters corresponding to each pixel or each area in the image to be processed. For example, the epsmap of the image to be processed may be determined based on the scene information, the epsmap having the same size as the image to be processed, and the value of each point in the epsmap represents the eps of the corresponding pixel in the image to be processed.
[0066] In one embodiment, reference Figure 5 As shown, the above-mentioned determination of the filtering parameters of the image to be processed according to the scene information may include the following steps S510 to S530:
[0067] Step S510, determining global filtering parameters of the image to be processed according to the global scene information.
[0068] According to the global scene information, the overall requirements and preferences of the image to be processed for the image denoising strength or image detail information can be determined, thereby obtaining the global filtering parameters of the image to be processed. For example, when the global scene information of the image to be processed is blue sky, eps=50 can be set accordingly; when the global scene information of the image to be processed is grass, eps=16 can be set accordingly.
[0069] In one implementation, different correspondences between global scene information and global filtering parameters may be preconfigured. Then, according to the global scene information of the image to be processed, the global filtering parameters corresponding to the global scene information may be determined by searching in the correspondence.
[0070] Step S520: Acquire texture features of the first region.
[0071] The texture feature of the first region is used to represent the pixel distribution in the first region or in a certain neighborhood around the first region, reflecting the richness of details of the image in the first region. The present disclosure does not limit the specific form of the texture feature, for example, the gradient, flatness, etc. of the first region can be used as the texture feature.
[0072] In one embodiment, the texture feature may include variance information. For example, the variance information may include the variance of pixels in the first region of the image to be processed or in a certain neighborhood around the first region; or, in guided filtering, the variance information may include the variance of pixels in the first region of the guided image or in a certain neighborhood around the first region and the pixel covariance between the image to be processed and the guided image in the first region or in a certain neighborhood around the first region.
[0073] Exemplarily, in guided filtering, the variance information can be calculated by the following formula:
[0074]
[0075] var I =corr I -mean I. *mean I (2)
[0076] cov Ip =corr Ip -mean I. *mean p (3)
[0077] Among them, I represents the guiding image, p represents the image to be processed, and f mean () represents mean filtering, var represents pixel variance, and cov represents pixel covariance.
[0078] Step S530: adjusting the global filtering parameters based on the texture features of the first region to obtain the local filtering parameters of the first region.
[0079] The texture features of the first region reflect the richness of details. When the richness of details is high, it is usually suitable to adopt a low degree of filtering to reduce the loss of detail information; when the richness of details is low, it is insensitive to the loss of detail information and is usually suitable for a high degree of filtering. Therefore, on the basis of the global filtering parameters, appropriate adjustments can be made for different first regions, and the adjusted parameters can be used as local filtering parameters corresponding to the first region. Exemplarily, the larger the variance of the first region, the higher the richness of details in the first region, and the more the global EPS of the image to be processed can be adjusted downward to obtain a smaller local EPS.
[0080] based on Figure 5 According to the method steps, the global filtering parameters suitable for the image to be processed as a whole are determined according to the global scene information, and on this basis, the global filtering parameters are adjusted for the first region to obtain the local filtering parameters suitable for the first region. Therefore, in the subsequent spatial domain denoising process, the image to be processed can be filtered to different degrees in units of regions, which is conducive to improving the pertinence and accuracy of the denoising process.
[0081] The present disclosure does not limit the specific method for determining the first region. Several examples are provided below:
[0082] In one implementation, the image to be processed may be divided into a plurality of local regions, each of which is used as the first region. Figure 5 The method step determines a local filter parameter for each first region.
[0083] In one embodiment, only a part of the local area in the image to be processed can be used as the above-mentioned first area. For example, the area of interest in the image to be processed can be used as the first area. Furthermore, the local area associated with the global scene information of the image to be processed can be used as the first area. For example, if the global scene information of the image to be processed is blue sky, the blue sky area or sky area in the image to be processed is used as the first area; if the global scene information of the image to be processed is portrait, the portrait area in the image to be processed is used as the first area.
[0084] In one embodiment, as a supplement, for the area other than the first area in the image to be processed, the global filtering parameters can be used as the local filtering parameters. For example, for the non-interested area in the image to be processed, the degree of filtering has little effect on the final visual effect, and the global filtering parameters can be directly used as the local filtering parameters of the non-interested area, without obtaining the texture features of the non-interested area, and without adjusting the global filtering parameters in the non-interested area, thereby reducing the amount of calculation and improving the efficiency of image denoising.
[0085] In one embodiment, each pixel in the image to be processed can be used as a first area. For each pixel, its texture feature can be obtained, and the texture feature is the texture feature in a certain neighborhood around the pixel. For example, the pixel can be taken as the center, and the pixel variance in the neighborhood grid of (2r+1)*(2r+1) (r represents the radius of the neighborhood, which can be any positive integer) pixels can be calculated as the texture feature. Then, the global filtering parameters are adjusted according to the texture features of each pixel to obtain the local filtering parameters of each pixel. In this way, highly refined local filtering parameters are obtained to facilitate the subsequent implementation of highly refined spatial denoising processing.
[0086] In step S530, the influence of the texture features of the first region on the local filtering parameters is taken into account. In addition, other relevant factors may be added. In one embodiment, the scene information may also include local scene information of the first region. The above-mentioned adjustment of the global filtering parameters according to the texture features of the first region to obtain the local filtering parameters of the first region may include the following steps:
[0087] The global filtering parameters are adjusted according to the texture features of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region.
[0088] That is to say, the global filtering parameters may be adjusted according to two factors: the texture feature of the first region and the local scene information of the first region.
[0089] The local scene information of the first area can reflect the degree of demand for the image denoising strength or image detail information of the first area, and essentially indicates the influence of the image denoising strength or image detail information on the visual effect for the shooting scene of the first area. For example, the local scene information of a first area in the image to be processed is a portrait, which means that the first area is a portrait area, and the portrait area usually has a higher degree of demand for detail information and is suitable for a lower degree of filtering processing. Therefore, from the perspective of local scene information, the global filtering parameters can be adjusted in the direction of a lower filtering degree (such as downward adjustment).
[0090] This exemplary embodiment can combine the texture features of the first region and the local scene information of the first region. For example, when the first region is a portrait region dominated by skin, its texture features may reflect that the first region has a low level of detail richness (such as a small variance in the first region), which is suitable for a higher degree of filtering. Therefore, from the perspective of texture features, the global filtering parameters can be adjusted toward a higher degree of filtering (such as upward adjustment). Thus, by integrating and balancing the two factors of texture features and local scene information, the global filtering parameters can be adjusted more accurately to obtain more appropriate local filtering parameters.
[0091] In one embodiment, the scene information includes local scene information of at least one first region in the image to be processed. The filtering parameters include local filtering parameters of the first region. The above-mentioned determination of the filtering parameters of the image to be processed based on the scene information may include the following steps:
[0092] Obtain global filtering parameters of the image to be processed;
[0093] Acquire texture features of the first region;
[0094] The global filtering parameters are adjusted according to the texture features of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region.
[0095] The global filtering parameters of the image to be processed can be determined based on other information other than the scene information. For example, the default global filtering parameters can be used; or the global filtering parameters can be determined based on experience; or the global filtering parameters can be determined based on the texture features of the image to be processed. Exemplarily, the texture features of the image to be processed may include variance information of the image to be processed, and the variance information may include the pixel variance of the image to be processed and the pixel covariance between the image to be processed and the guide image, and the global filtering parameters can be determined based on the variance information of the image to be processed.
[0096] After obtaining the global filtering parameters, the global filtering parameters may be adjusted by combining the texture features of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region.
[0097] It can be seen that Figure 5 Compared with the method steps of , the present embodiment may not use scene information when determining global filtering parameters, thereby simplifying the processing process and reducing the amount of calculation. In particular, it is not necessary to obtain global scene information of the image to be processed, and only local scene information of the first area is obtained, thereby improving efficiency.
[0098] In one embodiment, the global filtering parameters can be adjusted according to the texture features of the first area, the local scene information of the first area, and the global scene information to obtain the local filtering parameters of the first area. In combination with the local scene information of the first area and the global scene information of the image to be processed, the degree of demand for detail information or the sensitivity to noise of the first area in a specific scene can be determined. Exemplarily, according to the local scene information of the first area and the global scene information of the image to be processed, it can be determined whether the first area is a key area in the image to be processed. In general, when the local scene information of the first area is the same as or related to the global scene information, the first area is a key area. For example, if the global scene information of the image to be processed is a blue sky, and the local scene information of the first area is a blue sky or sky, then the first area is a key area. The key area usually has a high degree of demand for detail information, so from the perspective of local scene information, the global filtering parameters can be adjusted in the direction of a low degree of filtering.
[0099] It should be understood that in this exemplary embodiment, in addition to the above-mentioned texture features and local scene information, the global filtering parameters may also be adjusted according to other factors to determine the local filtering parameters of the first area.
[0100] Through the above methods, adjustments are made on the basis of the global filtering parameters to obtain local filtering parameters of the first region, thereby realizing local filtering parameters adaptive to each first region, which is beneficial to performing differentiated and targeted spatial denoising on the processed image.
[0101] As can be seen from the above, the process of determining the filtering parameters according to the scene information can be divided into two stages: the first stage is to determine the global filtering parameters; the second stage is to adjust the global filtering parameters to obtain the local filtering parameters. In this exemplary embodiment, the scene information can be used in any one or two stages, thus including the following three schemes:
[0102] ① Use scene information in the first stage, but not in the second stage. For example, in the first stage, the global filtering parameters are determined according to the global scene information, and in the second stage, the global filtering parameters are adjusted only according to the texture features of the first region to obtain the local filtering parameters of the first region.
[0103] ② Use scene information in both the first and second stages. For example, in the first stage, global filter parameters are determined based on global scene information, and in the second stage, the global filter parameters are adjusted based on the texture features of the first region and the local scene information of the first region to obtain the local filter parameters of the first region.
[0104] ③ Scene information is not used in the first stage, and scene information is used in the second stage. For example, in the first stage, the global filter parameters are determined based on information other than scene information, and in the second stage, the global filter parameters are adjusted based on the texture features of the first area and the local scene information of the first area to obtain the local filter parameters of the first area.
[0105] In one embodiment, the texture feature includes variance information. The step of adjusting the global filtering parameters according to the texture feature of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region may include the following steps:
[0106] The variance information of the first region is corrected based on the local scene information of the first region, and the global filtering parameters are adjusted according to the corrected variance information to obtain the local filtering parameters of the first region.
[0107] The variance information of the first region may include the variance of pixels in the first region of the image to be processed or in a certain neighborhood around the first region. Alternatively, in guided filtering, the variance information of the first region may include the variance of pixels in the first region of the image to be processed or in a certain neighborhood around the first region and the pixel covariance between the image to be processed and the guided image in the first region or in a certain neighborhood around the first region.
[0108] In one implementation, the variance information may be calculated after the image to be processed and the guide image are preprocessed, such as after mean filtering.
[0109] Referring to the above, it can be seen that the local scene information of the first area can reflect the degree of demand for image denoising strength or image detail information of the first area. Exemplarily, the local scene information of the first area is the sky. According to the local scene information, it is determined that the first area has a high degree of demand for image denoising strength (i.e., a low degree of demand for image detail information), then the variance can be appropriately corrected to be small, and then the global filter parameters can be adjusted to a high degree of filtering to obtain a higher local filter parameter; the local scene information of the first area is grassland. According to the local scene information, it is determined that the first area has a low degree of demand for image denoising strength (i.e., a high degree of demand for image detail information), then the variance can be appropriately corrected to be large, and then the global filter parameters can be adjusted to a low degree of filtering to obtain a lower local filter parameter.
[0110] It can be seen that the local scene information of the first region is not directly used to adjust the global filter parameters, but the global filter parameters are adjusted indirectly by correcting the variance information of the first region. Therefore, it is easier to control the influence of the variance information of the first region and the local scene information on the local filter parameters, which is conducive to achieving accurate adjustment.
[0111] refer to Figure 6 As shown, taking guided filtering as an example, the process of determining filtering parameters is further explained. In guided filtering, filtering parameters may include global guided filtering parameters eps_global and local guided filtering parameters eps_local. Obtain scene information of the image to be processed, including global scene information of the image to be processed and local scene information of the first area in the image to be processed. Determine global guided filtering parameters based on the global scene information of the image to be processed. Divide the image to be processed into four first areas, calculate the pixel variance and pixel covariance of each first area based on the image to be processed and the guided image, and obtain the variance information of the first area. Correct the variance information based on the local scene information of the first area to obtain the corrected variance information. Then adjust the global guided filtering parameters based on the corrected variance information to obtain the local guided filtering parameters. It can be seen that different first areas have different local guided filtering parameters.
[0112] After determining the filter parameters, continue to refer to Figure 3 In step S330, spatial domain denoising is performed on the image to be processed based on the filtering parameters.
[0113] In this exemplary embodiment, the spatial domain denoising process may be a filtering process, wherein filtering parameters are input into a corresponding filter, and the filter is used to perform filtering on the image to be processed, thereby achieving image spatial domain denoising.
[0114] In one embodiment, the image to be processed can be subjected to spatial denoising based on the above-mentioned local filtering parameters or based on the above-mentioned local filtering parameters and global filtering parameters. If the first area can cover the entire image to be processed, then for each pixel in the image to be processed, the corresponding local filtering parameters are determined, and thus only the local filtering parameters can be used to perform spatial denoising on the image to be processed. If the first area cannot cover the entire image to be processed, then for the pixels in the image to be processed that are not in the first area, the corresponding local filtering parameters are not determined, and thus only the global filtering parameters can be used to filter these pixels, and the local filtering parameters are used to filter the corresponding first area, that is, the local filtering parameters and the global filtering parameters are used simultaneously to perform spatial denoising on the image to be processed.
[0115] In one implementation, the filtering process is described by taking guided filtering as an example. The local filtering parameters may include local guided filtering parameters. The above-mentioned spatial domain denoising processing of the image to be processed based on the filtering parameters may include the following steps:
[0116] Based on the guide image of the image to be processed and the local guided filtering parameters of each first region, guided filtering processing is performed on each first region in the image to be processed.
[0117] The guiding image is an image used for filtering guidance, and the guiding image can be obtained according to prior information. In one embodiment, the image to be processed itself can be used as the guiding image.
[0118] In guided filtering, it can be considered that the guided image and the filtered image (called denoised image) have a linear transformation relationship, which is expressed as follows:
[0119] q i =a k I i +b k (4)
[0120] Where i represents pixel i, I represents the guide image (or preprocessed guide image), q represents the denoised image, and k represents the window ω k , (a k , b k ) represents the window ω k The linear parameters in the range. (a k , b k ) is solved as follows:
[0121]
[0122]
[0123] Where p represents the image to be processed (or the preprocessed image to be processed), μ k With σ k Respectively represent the mean and variance of the guided image I in the window, Indicates that the image p to be processed is in the window ω k The average value of pixels within; eps i represents the local guided filtering parameter of pixel i, that is, the local guided filtering parameter of the first region where pixel i is located.
[0124] It can be seen that according to the local guided filter parameters, the linear parameters (a k , b k ), and then the linear parameter (a k , b k ) and the guided image into formula (4), we can get the denoised image after guided filtering.
[0125] In one embodiment, reference Figure 7 As shown, the image processing method may further include the following steps S710 and S720:
[0126] Step S710, obtaining image enhancement parameters of the denoised image corresponding to the image to be processed;
[0127] Step S720: performing image enhancement processing on the denoised image based on the image enhancement parameters.
[0128] Among them, the denoised image corresponding to the image to be processed includes: the image of the image to be processed after spatial denoising, or the image of the image to be processed after spatial denoising and other denoising. Other denoising processes may include time domain denoising, etc. Exemplarily, after performing spatial denoising, the previous frame or multiple frames of the image to be processed can also be obtained as a reference image, and the image after spatial denoising is performed and the reference image are fused in the time domain to perform time domain denoising and output the denoised image. Alternatively, time domain denoising can also be performed before spatial denoising, which will not be described in detail.
[0129] Image enhancement processing can be used to enhance the detail information of the denoised image, such as edges, detail textures, etc., and compensate for the detail information lost in the denoising process to a certain extent. Image enhancement parameters are parameters used in image enhancement processing, which are used to directly or indirectly indicate the degree of image enhancement. For example, an image enhancement parameter can be a compensation coefficient for high-frequency information of an image, which is used to superimpose the high-frequency information of the image onto the denoised image. Therefore, the higher the compensation coefficient, the more high-frequency information of the image is superimposed, and the higher the degree of image enhancement. The image enhancement parameters can be set based on experience, or the default image enhancement parameters can be used.
[0130] After determining the image enhancement parameters, the denoised image is enhanced based on the image enhancement parameters to achieve compensation for the image denoising process. The image after the image enhancement process can be the final output image with higher quality.
[0131] In this exemplary embodiment, determining appropriate image enhancement parameters has a direct impact on the effect of image enhancement processing. The following describes how to determine image enhancement parameters through several embodiments.
[0132] In one implementation, the above-mentioned obtaining of the image enhancement parameters of the denoised image corresponding to the image to be processed may include the following steps:
[0133] The image enhancement parameters of the denoised image are determined based on the scene information.
[0134] The scene information of the image to be processed may be equated with the scene information of the denoised image. In one embodiment, the global scene information of the image to be processed may be equated with the global scene information of the denoised image, and the local scene information of the first region in the image to be processed may be equated with the local scene information of the second region in the denoised image. The first region and the second region have the same position in their respective images, and the first region and the second region have a corresponding relationship.
[0135] According to the scene information, the need for detail information or the sensitivity to noise of the denoised image can be determined, and then appropriate image enhancement parameters can be determined to facilitate targeted image enhancement processing of the denoised image. Thus, this exemplary embodiment implements adaptive image enhancement parameters, which is conducive to improving the image enhancement effect.
[0136] In one implementation, the correspondence between different scene information and image enhancement parameters can be pre-configured. For example, appropriate image enhancement parameters for image enhancement processing of images in different shooting scenes can be configured based on experience to form a configuration relationship table. Further, after obtaining the scene information of the denoised image, the image enhancement parameters corresponding to the scene information can be determined by searching in the above correspondence.
[0137] In one embodiment, the scene information includes global scene information of the image to be processed and local scene information of at least one first region in the image to be processed. The image enhancement parameters may include local image enhancement parameters of at least one second region in the denoised image, and the second region has a corresponding relationship with the first region. The above-mentioned determination of the image enhancement parameters of the denoised image based on the scene information may include the following steps:
[0138] Determine the image global enhancement parameters of the denoised image according to the global scene information;
[0139] The global image enhancement parameters are adjusted according to the local scene information of the first area to obtain the local image enhancement parameters of the second area corresponding to the first area.
[0140] According to the global scene information, the overall requirement of the denoised image for detail information or the sensitivity to noise (which is actually equivalent to the requirement of the image to be processed for detail information or the sensitivity to noise) can be determined, and then the appropriate global image enhancement parameters can be determined. For different regions of the denoised image, the global image enhancement parameters are uniform values.
[0141] On this basis, the local demand degree for detail information or the local sensitivity degree to noise of the first region is determined according to the local scene information of the first region, which is equivalent to the local demand degree for detail information or the local sensitivity degree to noise of the corresponding second region. In this way, the global image enhancement parameters can be adjusted to better adapt to local needs and obtain more accurate local image enhancement parameters.
[0142] In one embodiment, the image enhancement parameter may include an image local enhancement parameter of at least one second region in the denoised image. The above-mentioned determination of the image enhancement parameter of the denoised image according to the scene information may include the following steps:
[0143] Get the global image enhancement parameters of the denoised image;
[0144] The global image enhancement parameter is adjusted according to the texture feature of the first area to obtain the local image enhancement parameter of the second area corresponding to the first area.
[0145] The global image enhancement parameters of the denoised image can be determined based on other information other than the scene information. For example, the default global image enhancement parameters can be used; or the global image enhancement parameters can be determined based on experience; or the global image enhancement parameters can be determined based on the texture features of the denoised image. Exemplarily, the texture features of the denoised image can include the variance information of the denoised image, and the global image enhancement parameters can be determined based on the variance information of the denoised image.
[0146] In one embodiment, the global image enhancement parameters of the denoised image can be determined according to the texture features of the image to be processed. Generally, if the texture features of the image to be processed are rich, it means that the image to be processed has a high demand for detail information, and the image enhancement parameters corresponding to the higher image enhancement degree can be set.
[0147] On this basis, the local demand degree of the first region for detail information or the local sensitivity degree to noise is determined according to the texture features of the first region, which is equivalent to the local demand degree of the second region for detail information or the local sensitivity degree to noise. In this way, the global image enhancement parameters can be adjusted to better adapt to local needs and obtain more accurate local image enhancement parameters.
[0148] In one implementation, the global image enhancement parameters may also be adjusted according to the texture features of the second region and the local scene information of the second region.
[0149] The following is a further explanation using the image enhancement processing based on guided filtering as an example.
[0150] The image enhancement process is as follows: the image to be processed p is subjected to a guided filtering again, and the filtering parameters used are different from the filtering parameters in step S320. The filtering parameters in the image enhancement are recorded as eps enhance , the filtering parameter in step S320 is recorded as eps denoise , eps enhance Indirectly used for image enhancement processing, it is essentially an image enhancement parameter; according to the image to be processed p and the guided filtering output image p L The difference between the two can be used to obtain the high-frequency information p of the image to be processed. H (such as p H =Pp L );Use compensation coefficient gain to convert high frequency information p H (or high frequency information p HAfter further filtering or truncated information) is superimposed on the denoised image NR out The output image Frm is obtained out .
[0151] Among them, the image enhancement parameter eps enhance Can include image global enhancement parameter eps enhance_global And the image local enhancement parameter eps enhance_local , which can be determined by:
[0152] Determine the image global enhancement parameter eps based on the global scene information of the image to be processed enhance_global . To obtain the variance information of the first region, the variance information calculated in the image spatial domain denoising process can be reused, such as the variance information var and cov calculated by the above formulas (1)-(3). According to the local scene information of the first region, the variance information of the first region is corrected. The correction is combined with the specific needs and preferences of the image enhancement process. The correction method here can be the same as or different from the correction method of the variance information in the image spatial domain denoising process. The global image enhancement parameter eps is adjusted according to the variance information of the corrected first region. enhance_global Adjust to obtain the corresponding local image enhancement parameter eps of the second area enhance_local .
[0153] For example, when the global scene information is the sky, it is necessary to avoid enhancing noise, so a larger image global enhancement parameter eps can be set. enhance_global , so that the high-frequency information p H The var and cov of the first area are obtained, and they are modified according to the local scene information of the first area. When the local scene information is the sky, it is hoped to enhance the mid-frequency information but not the high-frequency information. Var and cov can be amplified, such as by linear or polynomial amplification to obtain var1 and cov1, and then the truncation threshold th is set. var and cov Truncate var1 and cov1 to get the corrected variance information:
[0154] var out =clip(var1, var ) (7)
[0155] cov out =clip(cov1, cov ) (8)
[0156] This makes it possible to enhance larger edges while de-enhancing smaller edges.
[0157] In the above implementation, in the image enhancement process, relevant information of the image spatial domain denoising process, such as scene information, texture features, etc., can be reused, thereby reducing the amount of calculation and improving the processing efficiency.
[0158] Figure 8 FIG. 1 is a schematic diagram showing an image processing method according to this exemplary embodiment. Figure 8 As shown, the image processing method includes:
[0159] Step S801, input an image to be processed, perform scene detection on it, and obtain global scene information of the image to be processed and local scene information of at least one first region thereof;
[0160] Step S802, using the image to be processed itself as a guide image, and calculating variance information according to the image to be processed and the guide image, which may include pixel variance and pixel covariance of a first region in the image to be processed or the guide image;
[0161] Step S803, determining global guidance filtering parameters of the image to be processed according to the global scene information of the image to be processed;
[0162] Step S804, adjusting the global guided filter parameters according to the variance information of the first region and the local scene information of the first region to obtain the local guided filter parameters of the first region; for the part of the image to be processed other than the first region, using the global guided filter parameters as its local guided filter parameters;
[0163] Step S805, based on the above-mentioned local guided filtering parameters, the guided image, and the variance information, the guided filtering is performed on the image to be processed to complete the spatial domain denoising process and obtain a spatial domain denoised image;
[0164] Step S806, using a reference image of the image to be processed, performing temporal denoising processing on the spatial denoised image to obtain a temporal denoised image; the reference image may be an adjacent frame image of the image to be processed in the video;
[0165] Step S807, determining image enhancement parameters according to the global scene information, the local scene information and the variance information;
[0166] Step S808, based on the above image enhancement parameters, image enhancement processing is performed on the time-domain denoised image to enhance detail information in the image and obtain an output image, thereby completing the image processing flow.
[0167] The exemplary embodiment of the present disclosure also provides an image processing device. Fig. 9 As shown, the image processing device 900 may include:
[0168] The image acquisition module 910 is configured to acquire an image to be processed and acquire scene information of the image to be processed;
[0169] A filter parameter determination module 920 is configured to determine the filter parameters of the image to be processed according to the scene information;
[0170] The spatial denoising processing module 930 is configured to perform spatial denoising processing on the image to be processed based on the filtering parameters.
[0171] In one embodiment, the scene information includes global scene information of the image to be processed; the filtering parameters include global filtering parameters and local filtering parameters of at least one first region in the image to be processed; and the filtering parameters of the image to be processed are determined according to the scene information, including:
[0172] Determine global filtering parameters of the image to be processed according to the global scene information;
[0173] Acquire texture features of the first region;
[0174] Adjusting the global filtering parameters according to the texture features of the first region to obtain the local filtering parameters of the first region;
[0175] The above-mentioned spatial domain denoising processing of the image to be processed based on the filtering parameters includes:
[0176] Based on the local filtering parameters or based on the local filtering parameters and the global filtering parameters, the image to be processed is subjected to spatial denoising processing.
[0177] In one implementation, the scene information further includes local scene information of the first region; the global filtering parameters are adjusted according to the texture features of the first region to obtain the local filtering parameters of the first region, including:
[0178] The global filtering parameters are adjusted according to the texture features of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region.
[0179] In one embodiment, the scene information includes local scene information of at least one first area in the image to be processed; the filtering parameters include global filtering parameters and local filtering parameters of the first area; and the filtering parameters of the image to be processed are determined according to the scene information, including:
[0180] Obtain global filtering parameters of the image to be processed;
[0181] Acquire texture features of the first region;
[0182] Adjusting the global filtering parameters according to the texture features of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region;
[0183] The above-mentioned spatial domain denoising processing of the image to be processed based on the filtering parameters includes:
[0184] Based on the local filtering parameters or based on the local filtering parameters and the global filtering parameters, the image to be processed is subjected to spatial denoising processing.
[0185] In one embodiment, the texture feature includes variance information; the global filtering parameters are adjusted according to the texture feature of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region, including:
[0186] The variance information of the first region is corrected based on the local scene information of the first region, and the global filtering parameters are adjusted according to the corrected variance information to obtain the local filtering parameters of the first region.
[0187] In one embodiment, the local filtering parameters include local guided filtering parameters; performing spatial domain denoising on the image to be processed based on the filtering parameters includes:
[0188] Based on the guide image of the image to be processed and the local guided filtering parameters of each first region, guided filtering processing is performed on each first region in the image to be processed.
[0189] In one implementation, the image processing device 900 may further include an image enhancement processing module configured to:
[0190] Obtain image enhancement parameters of a denoised image corresponding to the image to be processed;
[0191] Perform image enhancement processing on the denoised image based on the image enhancement parameters;
[0192] The denoised image corresponding to the image to be processed includes: an image after the image to be processed has been processed through spatial denoising, or an image after the image to be processed has been processed through spatial denoising and other denoising processes.
[0193] In one embodiment, the image enhancement parameters include local image enhancement parameters of at least one second region in the denoised image, and the second region has a corresponding relationship with the first region in the image to be processed; the above-mentioned acquisition of the image enhancement parameters of the denoised image corresponding to the image to be processed includes:
[0194] Get the global image enhancement parameters of the denoised image;
[0195] The global image enhancement parameter is adjusted according to the texture feature of the first area to obtain the local image enhancement parameter of the second area corresponding to the first area.
[0196] In one implementation, obtaining image enhancement parameters of a denoised image corresponding to the image to be processed includes:
[0197] The image enhancement parameters of the denoised image are determined based on the scene information.
[0198] In one embodiment, the scene information includes global scene information of the image to be processed and local scene information of at least one first region in the image to be processed; the image enhancement parameter includes a local image enhancement parameter of at least one second region in the denoised image, and the second region has a corresponding relationship with the first region; the above-mentioned determining the image enhancement parameter of the denoised image according to the scene information includes:
[0199] Determine the image global enhancement parameters of the denoised image according to the global scene information;
[0200] The global image enhancement parameters are adjusted according to the local scene information of the first area to obtain the local image enhancement parameters of the second area corresponding to the first area.
[0201] The specific details of each part of the above-mentioned device have been described in detail in the implementation method of the method part. The undisclosed details can be found in the implementation method of the method part, so they will not be repeated here.
[0202] The exemplary embodiments of the present disclosure also provide a computer-readable storage medium, which can be implemented in the form of a program product, which includes a program code, and when the program product is run on an electronic device, the program code is used to cause the electronic device to perform the steps described in the above "Exemplary Method" section of this specification according to various exemplary embodiments of the present disclosure. In an optional embodiment, the program product can be implemented as a portable compact disk read-only memory (CD-ROM) and includes program code, and can be run on an electronic device, such as a personal computer. However, the program product of the present disclosure is not limited to this, and in this document, the readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or device.
[0203] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0204] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0205] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0206] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0207] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the exemplary embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0208] It will be appreciated by those skilled in the art that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware implementation, complete software implementation (including firmware, microcode, etc.), or implementations combining hardware and software aspects, which may be collectively referred to herein as "circuit", "module" or "system". Those skilled in the art will readily think of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any variations, uses or adaptive changes of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and implementation are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0209] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. An image processing method, characterized in that: include: Acquire an image to be processed, and acquire scene information of the image to be processed; Determining filtering parameters of the image to be processed according to the scene information; Performing spatial domain denoising processing on the image to be processed based on the filtering parameters; The scene information includes global scene information of the image to be processed; The filtering parameters include global filtering parameters and local filtering parameters of at least one first area in the image to be processed; The determining the filtering parameters of the image to be processed according to the scene information includes: Determining global filtering parameters of the image to be processed according to the global scene information; Acquire texture features of the first area; Adjusting the global filtering parameters according to the texture features of the first region to obtain local filtering parameters of the first region; The performing spatial domain denoising processing on the image to be processed based on the filtering parameters includes: Based on the local filtering parameters or based on the local filtering parameters and the global filtering parameters, spatial domain denoising processing is performed on the image to be processed.
2. The method according to claim 1, characterized in that The scene information also includes local scene information of the first area; and adjusting the global filtering parameters according to the texture features of the first area to obtain the local filtering parameters of the first area includes: The global filtering parameters are adjusted according to the texture features of the first region and the local scene information of the first region to obtain the local filtering parameters of the first region.
3. The method according to claim 1, characterized in that The scene information includes local scene information of at least one first area in the image to be processed; the filtering parameters include global filtering parameters and local filtering parameters of the first area; The determining the filtering parameters of the image to be processed according to the scene information includes: Acquire global filtering parameters of the image to be processed; Acquire texture features of the first area; Adjusting the global filtering parameters according to the texture features of the first region and the local scene information of the first region to obtain local filtering parameters of the first region; The performing spatial domain denoising processing on the image to be processed based on the filtering parameters includes: Based on the local filtering parameters or based on the local filtering parameters and the global filtering parameters, spatial domain denoising processing is performed on the image to be processed.
4. The method according to claim 2 or 3, characterized in that: The texture feature includes variance information; and adjusting the global filtering parameter according to the texture feature of the first area and the local scene information of the first area to obtain the local filtering parameter of the first area includes: The variance information of the first region is corrected based on the local scene information of the first region, and the global filtering parameters are adjusted according to the corrected variance information to obtain the local filtering parameters of the first region.
5. The method according to any one of claims 1 to 3, characterized in that: The local filtering parameters include local guided filtering parameters; and performing spatial domain denoising on the image to be processed based on the filtering parameters includes: Based on the guided image of the image to be processed and the local guided filtering parameters of each of the first regions, guided filtering processing is performed on each of the first regions in the image to be processed.
6. The method according to claim 1, characterized in that The method further comprises: Obtaining image enhancement parameters of a denoised image corresponding to the image to be processed; Performing image enhancement processing on the denoised image based on the image enhancement parameters; The denoised image corresponding to the image to be processed includes: an image after the image to be processed has been processed through spatial denoising, or an image after the image to be processed has been processed through spatial denoising and other denoising processes.
7. The method according to claim 6, characterized in that The image enhancement parameters include local image enhancement parameters of at least one second region in the denoised image, and the second region has a corresponding relationship with the first region in the image to be processed; The step of obtaining the image enhancement parameters of the denoised image corresponding to the image to be processed includes: Obtaining global image enhancement parameters of the denoised image; The global image enhancement parameter is adjusted according to the texture feature of the first area to obtain the local image enhancement parameter of the second area corresponding to the first area.
8. The method according to claim 6, characterized in that The step of obtaining the image enhancement parameters of the denoised image corresponding to the image to be processed includes: An image enhancement parameter of the denoised image is determined according to the scene information.
9. The method according to claim 8, characterized in that The scene information includes global scene information of the image to be processed and local scene information of at least one first region in the image to be processed; the image enhancement parameters include local image enhancement parameters of at least one second region in the denoised image, and the second region has a corresponding relationship with the first region; The step of determining the image enhancement parameters of the denoised image according to the scene information comprises: Determining a global image enhancement parameter of the denoised image according to the global scene information; The global image enhancement parameter is adjusted according to the local scene information of the first area to obtain the local image enhancement parameter of the second area corresponding to the first area.
10. An image processing device, characterized in that: include: An image acquisition module is configured to acquire an image to be processed and acquire scene information of the image to be processed; A filtering parameter determination module, configured to determine the filtering parameters of the image to be processed according to the scene information; A spatial denoising processing module, configured to perform spatial denoising processing on the image to be processed based on the filtering parameters; The scene information includes global scene information of the image to be processed; The filtering parameters include global filtering parameters and local filtering parameters of at least one first region in the image to be processed; the filtering parameters of the image to be processed are determined according to the scene information, and are configured as follows: Determining global filtering parameters of the image to be processed according to the global scene information; Acquire texture features of the first area; Adjusting the global filtering parameters according to the texture features of the first region to obtain local filtering parameters of the first region; The performing spatial domain denoising processing on the image to be processed based on the filtering parameters is configured as follows: Based on the local filtering parameters or based on the local filtering parameters and the global filtering parameters, spatial domain denoising processing is performed on the image to be processed.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 9 by executing the executable instructions.
Citation Information
Patent Citations
Method for reducing image noise and enhancing image
CN101355648A
Face image processing method and device
CN105512605A
Video processing method and device, electronic equipment and computer-readable medium
CN109525901A