Image processing method and device, electronic equipment and readable storage medium
By adaptively determining pixel weight parameters, image processing in mobile terminal devices solves the problems of high computational complexity and noise amplification, thereby improving image clarity.
Patent Information
- Application Number
- CN202210072126.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-21
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2042-01-21
AI Technical Summary
Existing methods for improving image clarity in mobile devices are computationally complex and may lead to noise amplification and white border issues.
By acquiring the gradient information of the image, the weight parameters of each pixel are adaptively determined. The first preset denoising algorithm is used to process the texture smooth area, and the second preset denoising algorithm is combined to process the texture edge area, so as to perform denoising and detail enhancement.
It significantly improves image clarity with relatively low computational complexity, avoids noise amplification and white border issues, and is suitable for mobile terminal devices.
Smart Images

Figure CN114519675B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of image processing, and more particularly, to an image processing method and device, an electronic device, and a computer readable storage medium. BACKGROUND
[0002] Generally, after an electronic device acquires an image or a video, the electronic device often performs image processing on video frames in the image or the video to improve the clarity of the image or the video.
[0003] Currently, mainstream methods for improving image clarity include: 1, a method of enhancing image details based on a super-resolution algorithm; 2, an image reconstruction method based on deep learning; and 3, a method based on an image sharpening algorithm.
[0004] The first and second methods have high computational complexity and take a long time, and thus are not suitable for use in mobile terminal devices; although the third method has relatively small computational overhead compared to the first two methods, the method often performs sharpening processing on pixels in an original image based on the same processing rule, and thus has the problems of amplifying noise in the original image and over-sharpening, which can cause white edges. SUMMARY
[0005] An object of the present disclosure is to provide a low-complexity image processing method to accurately improve image clarity and avoid the problems of amplifying noise in an original image and causing white edges.
[0006] In a first aspect, the present disclosure provides an image processing method, the method comprising:
[0007] obtaining an original image to be processed;
[0008] obtaining weight parameters corresponding to pixels in the original image according to gradient information of the original image;
[0009] performing first denoising processing on a texture smooth region in the original image based on a first preset denoising algorithm to obtain a first image;
[0010] performing second denoising processing on the original image based on the weight parameters and a second preset denoising algorithm to obtain a second image, wherein the second preset denoising algorithm is used to remove noise in a texture edge region of the original image and to perform detail enhancement processing on pixels in the texture edge region;
[0011] obtaining a target image according to the first image and the second image.
[0012] In a second aspect, the present disclosure provides an image processing device, the device comprising:
[0013] an original image acquisition module configured to acquire an original image to be processed;
[0014] a weight parameter determination module configured to obtain a weight parameter corresponding to each pixel in the original image according to gradient information of the original image;
[0015] a first image obtaining module configured to perform first denoising processing on a texture smooth region in the original image based on a first preset denoising algorithm to obtain a first image;
[0016] a second image obtaining module configured to perform second denoising processing on the original image based on the weight parameter and a second preset denoising algorithm to obtain a second image, wherein the second preset denoising algorithm is configured to remove noise in a texture edge region of the original image and perform detail enhancement processing on pixels in the texture edge region;
[0017] a target image obtaining module configured to obtain a target image according to the first image and the second image.
[0018] A third aspect of the present disclosure further provides an electronic device, comprising:
[0019] a memory configured to store executable instructions;
[0020] a processor configured to control the electronic device to execute the method according to the first aspect of the present disclosure according to the instructions.
[0021] A fourth aspect of the present disclosure further provides a computer readable storage medium storing a computer program readable and executable by a computer, wherein the computer program is configured to execute the method according to the first aspect of the present disclosure when being read and executed by the computer.
[0022] An advantage of the embodiments of the present disclosure is that, according to the embodiments of the present disclosure, after the original image is acquired, the pixels in the texture smooth region, i.e., the region other than the edge region, in the original image are denoised by using the first preset denoising algorithm to obtain the first image, then the pixels in the texture edge region in the original image are adaptively denoised and detail enhanced by using the second preset denoising algorithm according to the weight parameter corresponding to each pixel and determined according to the gradient information of the original image to obtain the second image, and finally the target image with significantly improved clarity can be obtained on the premise of small calculation complexity according to the first image and the second image. The method can solve the problems of noise amplification and white edge in the related art by adaptively determining the weight parameter of each pixel in the original image according to the gradient information of the original image.
[0023] Other features of the present specification, and the advantages thereof over existing systems and methods will become more readily apparent from the following detailed description, when read in conjunction with the drawings. BRIEF DESCRIPTION OF DRAWINGS
[0024] The accompanying drawings incorporated in and forming a part of the specification illustrate embodiments of the present specification and, together with the description, serve to explain the principles of the present specification.
[0025] Figure 1 is a flow diagram of an image processing method provided by an embodiment of the present disclosure.
[0026] Figure 2 is a Laplace template diagram provided by an embodiment of the present disclosure.
[0027] Figure 3a is a raw image diagram provided by an embodiment of the present disclosure.
[0028] Figure 3b is a target image diagram provided by an embodiment of the present disclosure.
[0029] Figure 4 is a principle block diagram of an image processing apparatus provided by an embodiment of the present disclosure.
[0030] Figure 5 is a hardware structure diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. If it is considered that the relative arrangement, numerical expressions, and numerical values of components and steps set forth in these embodiments limit the scope of the present disclosure, unless otherwise specifically stated, the scope of the present disclosure is not limited thereto.
[0032] The following description of at least one exemplary embodiment is merely exemplary in nature and is in no way intended to limit the scope of the present disclosure, its application, or uses.
[0033] Techniques, methods, and devices known to those of ordinary skill in the relevant art can not be discussed in detail herein, but should be considered as part of the specification, where appropriate.
[0034] In all of the examples shown and discussed herein, any specific values should be interpreted as merely exemplary, and not as a limitation. Thus, other examples of the exemplary embodiments can have different values.
[0035] It should be noted that like reference numerals and letters refer to like items in the following drawings, and thus, once an item is defined in one drawing, it need not be discussed further in subsequent drawings.
[0036] <Method Embodiment>
[0037] At present, in order to effectively remove noise in the image under the premise of as small as possible calculation complexity, in order to improve the image definition, the method based on image sharpening algorithm is usually used to improve the definition of the image. However, this kind of method is based on the uniform weight parameter for image processing, for example, the existing USM algorithm is generally based on the idea of: sharpened image = original image + weight parameter * (original image-blurred image) to process the image, which leads to the need for parameter processing when using this kind of method for image processing. If the parameter setting is too small, there may be a problem that the noise removal is not obvious, and if the parameter setting is too large, the noise may be amplified, and even because the pixels in the strong edge region are over-sharpened after sharpening, the white edge problem may occur.
[0038] To solve the above problems, the embodiment of the present disclosure provides an image processing method, which can not need a large amount of calculation, so as to effectively improve the image definition under the premise of ensuring the fluency of the mobile terminal device, and avoid the problems of amplifying the noise in the original image and appearing white edge. Please refer to Figure 1 , which is a flowchart of the image processing method provided by the embodiment of the present disclosure. The method can be implemented in an electronic device, which can be a mobile terminal device, such as a mobile phone, a tablet computer and the like. Of course, the electronic device can also be a server, such as a blade server, a rack server and the like, which is not special here.
[0039] As shown in Figure 1 , the method of the embodiment can include the following steps S1100-S1500, which will be described in detail below.
[0040] Step S1100, obtaining the original image to be processed.
[0041] The original image can be an image or a video frame in a video. For example, the original image can be a live picture captured by the host end based on the camera on the mobile phone in the live scene, or it can also be a live picture viewed by the audience end based on its mobile phone.
[0042] Step S1200, obtaining the weight parameter corresponding to the pixel in the original image according to the gradient information of the original image.
[0043] In the embodiments of the present disclosure, considering that the gradient of an image can also be used to represent edge information, therefore, the weight parameter of each pixel in an original image can be adaptively determined by obtaining the gradient information of the original image, and according to the gradient information, so as to enhance the image details and reduce the influence of noise when the image is processed, and meanwhile, the situation that the pixels in a strong texture edge region are excessively sharpened to cause white edges in the processed image can be avoided. The following will be described in detail how to obtain the weight parameter of each pixel according to the gradient information of the original image.
[0044] In one embodiment, the method for obtaining the weight parameter corresponding to each pixel in the original image according to the gradient information of the original image comprises: obtaining a first gradient image by calculating the gradient values of all pixels in the original image, wherein the value of each pixel in the first gradient image is the gradient value of the corresponding pixel in the original image; performing non-maximum suppression processing on the pixels in the first gradient image to obtain a second gradient image, wherein the non-maximum suppression processing is used to determine the pixels located in the texture edge region of the original image; and determining the weight parameter according to the second gradient image.
[0045] In the specific implementation, the gradient values of all pixels in the original image can be calculated by using a Laplace template as shown in FIG. 1, of course, other templates or other operators can also be used to calculate the gradient values of the pixels, for example, a sobel operator, which is not specially limited here; Figure 2
[0046] In the embodiment, the non-maximum suppression processing on the pixels in the first gradient image comprises: obtaining a processing region from the first gradient image according to a preset sliding window and a preset step value; comparing the gradient value of each pixel in the processing region with the gradient values of other pixels in the processing region in a plurality of preset directions; in the case that the gradient value of the pixel is the maximum value in any of the preset directions, retaining the gradient value of the pixel, and in the case that the gradient value of the pixel is not the maximum value in any of the preset directions, setting the gradient value of the pixel to a preset gradient value.
[0047] In the embodiment, the plurality of preset directions can be at least one of a vertical direction, a horizontal direction, a positive 45-degree direction and a negative 45-degree direction; preferably, the plurality of preset directions can include all the above directions.
[0048] In this embodiment, the preset gradient value can be 0, that is, in the current processing region, if the gradient value of the current pixel is not the maximum value in any preset direction, it can be determined that the pixel is not located in the texture edge region of the original image, and the gradient value of the pixel can be suppressed to 0. It should be noted that in specific implementation, the preset gradient value can also be set to other values close to 0 to suppress the gradient value of the pixel in the non-edge region, for example, the preset gradient value can also be 0.01 or other values, which are not limited here.
[0049] After the non-maximum suppression is performed on the pixels in the first gradient image to obtain the second gradient image, the weight parameter is determined according to the second gradient image, including: performing normalization processing on the second gradient image to obtain a third gradient image; obtaining the mean value and the standard deviation of the gradient values of the pixels in the third gradient image; obtaining a first gradient threshold and a second gradient threshold according to the mean value and the standard deviation; and determining the weight parameter according to the third gradient image, the first gradient threshold and the second gradient threshold.
[0050] Specifically, after the second gradient image is obtained, the second gradient image can be first normalized to obtain a third gradient image corresponding to the gradient values conforming to a normal distribution or other distribution, and the mean value μ and the standard deviation δ of the gradient values in the third gradient image are calculated, the first gradient threshold th1 is obtained by the formula: th1 = μ-2δ, and the second gradient threshold th2 is obtained by the formula: th2 = μ+2δ, and then the weight parameter corresponding to each pixel in the original image can be solved according to the first gradient threshold and the second gradient threshold.
[0051] In one embodiment, the weight parameter is determined according to the third gradient image, the first gradient threshold and the second gradient threshold, including: in the case that the gradient value of the pixel in the third gradient image is less than the first gradient threshold, it is determined that the corresponding pixel in the original image is a noise point, and the weight parameter corresponding to the noise point is set to a first preset value; in the case that the gradient value of the pixel in the third gradient image is not less than the first gradient threshold and less than the second gradient threshold, it is determined that the corresponding pixel in the original image is located in a first texture edge region, and the weight parameter corresponding to the pixel in the original image is set to a second preset value; in the case that the gradient value of the pixel in the third gradient image is not less than the second gradient threshold, it is determined that the corresponding pixel in the original image is located in a second texture edge region, and the weight parameter corresponding to the pixel in the original image is set to a third preset value; wherein the texture information of the second texture edge region is higher than that of the first texture edge region, and the third preset value is less than the second preset value and greater than the first preset value.
[0052] In this embodiment, the first preset value can be 0, or a value close to 0; the second preset value can be 1.2, and the third preset value can be 0.8.
[0053] Specifically, the corresponding pixel p in the third gradient image cur If the gradient value is less than th1, determine the pixel p in the original image. cur Pixel p at the same position ori This could be noise; in this case, its corresponding weight parameter can be set to 0 or a value close to 0. Meanwhile, at the corresponding pixel p... cur If the gradient value is not less than th1 and less than th2, determine its corresponding pixel p. ori For pixels located in low-texture edge regions of the image, their corresponding weight parameter can be set to 1.2 to achieve appropriate sharpening by increasing their pixel value during image processing; and, at the corresponding pixel p cur If the gradient value is not less than th2, determine its corresponding pixel p. ori For pixels located in the high-texture edge region of an image, i.e., pixels containing strong edge information, their corresponding weight parameters can be set to 0.8 or other values lower than 1 and greater than 0. This can prevent over-sharpening during image processing, which could result in white edges in the processed image.
[0054] After the above processing, by adaptively obtaining the weight coefficient corresponding to each pixel in the original image through the gradient information of the original image, the edge region in the image can be denoised and the details enhanced according to the weight coefficient to obtain the target image.
[0055] Specifically, after the above steps, step S1300 is executed, in which the texture smoothing region in the original image is subjected to first denoising processing based on the first preset denoising algorithm to obtain the first image.
[0056] The first preset denoising algorithm can be a bilateral filter algorithm. Of course, it can also be other filtering algorithms used to preserve texture edges and smooth noise reduction. No special limitation is made here. In this embodiment, the first preset denoising algorithm is a bilateral filter algorithm for example.
[0057] Specifically, after obtaining the weight parameters corresponding to each pixel in the original image, when performing specific denoising processing, the original image can first be smoothed for noise based on the bilateral filtering algorithm. Since the bilateral filtering algorithm comprehensively considers the spatial proximity information and pixel similarity information between other pixels and the center pixel in the processing window, it can also preserve the edge information of the image while filtering out noise and smoothing the image.
[0058] The specific processing of the denoising of the original image based on the bilateral filtering algorithm can be represented by the following formula:
[0059]
[0060] w(i, j, k, l) = d(i, j, k, l) * r(i, j, k, l)
[0061]
[0062]
[0063] wherein, when performing the filtering processing, the filtering window can be specifically a 3*3 pixel window, in the above formula, (k, l) represents the center coordinates of the window, (i, j) is the other pixel coordinates in the window, f(x, y) represents the pixel value of the original image at pixel (x, y), f'(x, y) is the image obtained after the bilateral filtering result, that is, the pixel value of the first image at the corresponding pixel (x, y), w(i, j, k, l) is the weight coefficient of pixel (i, j), which is determined by the spatial distance weight d(i, j, k, l) and the pixel similarity weight r(i, j, k, l), wherein, σ d and the value of σ r may be set as needed, for example, can be 5 and 20 respectively.
[0064] Step S1400, based on the weight parameter and the second preset denoising algorithm, the original image is subjected to a second denoising processing, and a second image is obtained, wherein the second preset denoising algorithm is used to remove the noise points in the texture edge region of the original image, and the pixels in the texture edge region are subjected to a detail enhancement processing.
[0065] In this embodiment, the weight parameter corresponding to each pixel calculated based on the gradient information of the original image through step S1200 can be used to adaptively perform the detail enhancement and noise suppression processing on the pixels in the edge region of the original image to eliminate the stray response of the edge and refine the edge, and the specific processing includes: using a preset blur algorithm to perform blur processing on the original image to obtain a third image, wherein the preset blur algorithm includes any one of a Gaussian blur algorithm and a mean filter algorithm; subtracting the third image from the original image to obtain a fourth image; and according to the weight parameter, the corresponding pixels in the fourth image are subjected to a weighting processing to obtain a second image.
[0066] Step S1500, according to the first image and the second image, a target image is obtained.
[0067] In the embodiments of the present disclosure, the processing steps of the pixels in the target image can be represented by the following formula:
[0068] l output (x , y)=I2(x,y)+a x,y *(I(x,y)-I1(x,y))
[0069] wherein, I2(x,y), I(x,y), I1(x,y) respectively represent the pixel value of the first image, the original image and the third image at pixel (x,y), a x,y represents the weight parameter corresponding to pixel (x,y). I output (x,y) represents the pixel value of pixel (x,y) in the target image.
[0070] Specifically, after the first image is obtained by using the first preset denoising algorithm, for example, the bilateral filtering algorithm, to perform denoising processing on the smooth region in the original image based on step S1300, and the second image is obtained by performing adaptive denoising and detail enhancement processing on the pixels in the edge region of the original image based on the weight parameter of each pixel through step S1400, the target image after effectively suppressing the noise in the original image and performing enhancement processing on the details can be obtained by adding the pixel values at the corresponding positions in the first image and the second image.
[0071] Please refer to Figure 3a and Figure 3b , which are respectively the schematic diagram of the original image and the target image obtained after processing the original image based on the method provided by the embodiment of the present disclosure. As Figure 3a and Figure 3b shown, the target image with significantly improved definition can be obtained after processing the original image based on the method provided by the embodiment of the present disclosure.
[0072] In summary, the method provided by the embodiment of the present disclosure, after obtaining the original image, first, the pixels in the texture smooth region, i.e., the region other than the edge region, in the original image are denoised and detail-enhanced by using the first preset denoising algorithm, and a first image is obtained; then, the pixels at the texture edge region in the original image are adaptively denoised by using the second preset denoising algorithm according to the weight parameter corresponding to each pixel determined according to the gradient information of the original image, and a second image is obtained; then, the target image with significantly improved clarity can be obtained on the premise of small calculation complexity according to the first image and the second image. By adaptively determining the weight parameter of each pixel in the original image according to the gradient information of the original image, on the one hand, the problem that the mobile terminal device may have a long time consumption and increased power consumption due to high calculation complexity when the mobile terminal device performs image processing based on a complex image processing method, such as a method based on a super-resolution algorithm or a deep learning technology, can be solved, and on the other hand, the problem of noise amplification and white edge that may exist in the related art can be solved.
[0073] <Device embodiment>
[0074] Corresponding to the method embodiment described above, in the present embodiment, an image processing device is also provided, which, as shown in Figure 4 The device 400 can include an original image acquisition module 410, a weight parameter determination module 420, a first image obtaining module 430, a second image obtaining module 440, and a target image obtaining module 430.
[0075] The original image acquisition module 410 is configured to acquire an original image to be processed. The weight parameter determination module 420 is configured to obtain a weight parameter corresponding to each pixel in the original image according to gradient information of the original image. The first image obtaining module 430 is configured to perform first denoising processing on a texture smooth region in the original image based on a first preset denoising algorithm, and obtain a first image. The second image obtaining module 440 is configured to perform second denoising processing on the original image based on the weight parameter and a second preset denoising algorithm, and obtain a second image. The second preset denoising algorithm is configured to remove noise points in a texture edge region of the original image, and perform detail-enhanced processing on the pixels in the texture edge region. The target image obtaining module 450 is configured to obtain a target image according to the first image and the second image.
[0076] <Device embodiment>
[0077] In the present embodiment, an electronic device is also provided, which, as shown in Figure 5The electronic device 500 can include a processor 520 and a memory 510 for storing executable instructions; the processor 520 is configured to execute the electronic device according to the control of the instructions to perform the method according to any embodiment of the present disclosure.
[0078] <Computer readable storage medium embodiment>
[0079] The embodiment provides a computer readable storage medium, the storage medium stores executable instructions, the executable instructions are executed by a processor to execute the method described in any method embodiment of the present specification.
[0080] The flowcharts and block diagrams in the drawings show the possible implementation architecture, function and operation of the system, method and computer program product according to the embodiments of the present specification. In this regard, each block in the flowchart or block diagram can represent a module, a program segment or a part of instructions, which contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions noted in the blocks can also occur in different order from that noted in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for executing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that hardware implementation, software implementation and implementation by software and hardware combination are equivalent.
[0081] The above has described the embodiments of the present specification, the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes are obvious to those skilled in the art without departing from the scope and spirit of the described embodiments. The choice of terms used herein is intended to best explain the principles of the embodiments, practical application or technical improvement in the market, or to enable other ordinary skilled persons in the art to understand the embodiments disclosed herein. The scope of the present application is defined by the appended claims.
Claims
1. An image processing method, characterized by, The method comprises: obtaining an original image to be processed; obtaining weight parameters corresponding to pixels in the original image according to gradient information of the original image; performing first denoising processing on a texture smooth region in the original image based on a first preset denoising algorithm to obtain a first image; performing second denoising processing on the original image based on the weight parameters and a second preset denoising algorithm to obtain a second image, wherein the second preset denoising algorithm is used to remove noise points in a texture edge region of the original image and to perform detail enhancement processing on pixels in the texture edge region; obtaining a target image according to the first image and the second image; wherein the weight parameters corresponding to the pixels in the original image are determined according to the gradient information of the original image, comprising: obtaining a first gradient image by calculating gradient values of all pixels in the original image, wherein the value of a pixel in the first gradient image is the gradient value of the corresponding pixel in the original image; performing non-maximum suppression processing on the pixels in the first gradient image to obtain a second gradient image, wherein the non-maximum suppression processing is used to determine pixels located in a texture edge region of the original image; determining the weight parameters according to the second gradient image.
2. The method of claim 1, wherein, The non-maximum suppression processing on the pixels in the first gradient image comprises: obtaining a processing region from the first gradient image based on a preset sliding window according to a preset step value; comparing the gradient value of each pixel in the processing region with the gradient values of other pixels in the processing region in a plurality of preset directions; in the case that the gradient value of the pixel is the maximum value in any of the preset directions, retaining the gradient value of the pixel, and in the case that the gradient value of the pixel is not the maximum value in any of the preset directions, setting the gradient value of the pixel to a preset gradient value.
3. The method of claim 1, wherein, The determination of the weight parameters according to the second gradient image comprises: performing normalization processing on the second gradient image to obtain a third gradient image; obtaining the mean value and the standard deviation of the gradient values of the pixels in the third gradient image; obtaining a first gradient threshold value and a second gradient threshold value according to the mean value and the standard deviation; determining the weight parameters according to the third gradient image, the first gradient threshold value and the second gradient threshold value.
4. The method of claim 3, wherein, The determination of the weight parameters according to the third gradient image, the first gradient threshold value and the second gradient threshold value comprises: in the case that the gradient value of a pixel in the third gradient image is less than the first gradient threshold value, determining that the corresponding pixel in the original image is a noise point and setting the weight parameter corresponding to the noise point to a first preset value; in the case that the gradient value of the pixel in the third gradient image is not less than the first gradient threshold value and is less than the second gradient threshold value, determining that the corresponding pixel in the original image is in a first texture edge region and setting the weight parameter corresponding to the pixel in the original image to a second preset value; In a case that a gradient value of a pixel in the third gradient image is not less than the second gradient threshold value, it is determined that a corresponding pixel in the original image is located in a second texture edge region, and a weight parameter corresponding to the pixel in the original image is set as a third preset value; wherein, texture information of the second texture edge region is higher than that of the first texture edge region, and the third preset value is less than the second preset value and greater than the first preset value.
5. The method of claim 1, wherein, The second denoising processing of the original image based on the weight parameter and a second preset denoising algorithm to obtain a second image, comprising: performing a blur processing on the original image using a preset blur algorithm to obtain a third image, wherein the preset blur algorithm comprises any one of a Gaussian blur algorithm and a mean filter algorithm; subtracting the original image from the third image to obtain a fourth image; the weight parameter, by performing a weighted processing on a corresponding pixel in the fourth image, to obtain the second image.
6. The method of claim 2, wherein, The plurality of preset directions comprises at least one of a vertical direction, a horizontal direction, a positive 45-degree direction and a negative 45-degree direction.
7. An image processing apparatus characterized by comprising: comprising: an original image acquisition module configured to acquire an original image to be processed; a weight parameter determination module configured to obtain a weight parameter corresponding to a pixel in the original image according to gradient information of the original image; a first image obtaining module configured to perform a first denoising processing on a texture smooth region in the original image based on a first preset denoising algorithm to obtain a first image; a second image obtaining module configured to perform a second denoising processing on the original image based on the weight parameter and a second preset denoising algorithm to obtain a second image, wherein the second preset denoising algorithm is used to remove noise points in a texture edge region of the original image and perform a detail enhancement processing on a pixel located in the texture edge region; a target image obtaining module configured to obtain a target image according to the first image and the second image; wherein, the weight parameter determination module is specifically configured to: obtain a first gradient image by calculating gradient values of all pixels in the original image, wherein a value of a pixel in the first gradient image is a gradient value of a corresponding pixel in the original image; perform a non-maximum suppression processing on the pixels in the first gradient image to obtain a second gradient image, wherein the non-maximum suppression processing is used to determine a pixel located in a texture edge region of the original image; determine the weight parameter according to the second gradient image.
8. An electronic device, comprising: comprising: a memory configured to store executable instructions; a processor configured to control the running of the electronic device according to the instructions to perform the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program readable and executable by a computer, and the computer program is used to perform the method of any one of claims 1-6 when being read and run by the computer. The computer readable storage medium stores a computer program readable and executable by a computer, and the computer program is used to perform the method of any one of claims 1-6 when being read and run by the computer.
Citation Information
Patent Citations
Remote sensing image information extraction method based on FCN-8s and improved Canny edge detection
CN111985329A
Image processing method and device, electronic equipment and storage medium
CN113592776A