Image filtering method, device, terminal equipment and storage medium
By dynamically adjusting the shape and size of the image filter core, and stretching the filter core along the orthogonal direction of the image edge, the problem of image filtering loss in the prior art is solved, and the effect of efficient noise removal and edge protection is achieved.
Patent Information
- Application Number
- CN202111084806.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-16
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2041-09-16
AI Technical Summary
While removing noise, existing image filtering methods will lose edge details of the image, making it difficult to dynamically adjust the filter core to adapt to the local gradient structure of different image areas.
By calculating the pixel difference value of the pixel points to be filtered in multiple directions, the shape and size of the filter core are dynamically adjusted, and the filter core is stretched along the orthogonal direction of the image edge to preserve the detailed information of the image edge.
It realizes that while removing image noise, retaining image edge details information is maintained, improving the effect and quality of image processing.
Smart Images

Figure CN113781348B_ABST
Abstract
Description
[Technical field]
[0001] Embodiments of the present invention relate to the field of image processing technology, and in particular to an image filtering method, apparatus, terminal device, and storage medium. [Background technology]
[0002] Image noise is a random variation in brightness or color information in an image (not present in the object itself), usually a manifestation of electronic noise. It is usually generated by the sensors and circuits of scanners or digital cameras. Image noise introduces errors and extra information to the image.
[0003] Image filtering is a common method to remove image noise. Common image filtering methods include Gaussian filtering, median filtering and mean filtering, most of which are low-pass filters. Low-pass filters can help eliminate sharp noise in images, but they will also cause certain losses in the edge detail information of the image. [Summary of the invention]
[0004] The embodiments of the present application provide an image filtering method, apparatus, terminal device and storage medium, which dynamically adjust the filter kernel according to the local gradient structure of the image area where different pixels to be filtered are located, thereby retaining the edge detail information of the image while filtering out image noise.
[0005] In a first aspect, an embodiment of the present application provides an image filtering method, comprising: for each direction of multiple directions where a pixel to be filtered is located, calculating a pixel difference of the pixel to be filtered relative to adjacent pixels in that direction; obtaining a target direction corresponding to a maximum pixel difference of the pixel to be filtered based on the pixel differences of the pixel to be filtered in multiple directions; controlling a filter kernel of the pixel to be filtered to stretch along an orthogonal direction to the target direction, obtaining pixel values of sample pixels around the orthogonal direction to the target direction, and filtering the pixel to be filtered.
[0006] In the above-mentioned image filtering, by calculating the pixel difference of the pixel to be filtered in each direction relative to the adjacent pixel points in the direction, a direction in which the pixel value of the pixel to be filtered has the largest change is obtained, and the direction is taken as the target direction, and the orthogonal direction of the target direction is obtained; the target direction is a direction in which the pixel change rate of the pixel to be filtered is the largest, and the orthogonal direction of the target direction is a direction in which the pixel value of the pixel to be filtered has the smallest change. When there are directions with the largest and the smallest pixel value changes in multiple directions where the pixel to be filtered is located, the direction in which the pixel value of the pixel to be filtered has the smallest change is the edge of the image, and the pixel to be filtered is a pixel point located at the edge of the image. Sample pixel points around the orthogonal direction of the target direction of the pixel to be filtered are obtained, and the pixel to be filtered is filtered by using the pixel points at the edge of the image, so that the edge information of the edge of the image where the pixel to be filtered is located can be retained while filtering.
[0007] In one possible implementation, for each direction of the multiple directions where the pixel to be filtered is located, calculating the pixel difference of the pixel to be filtered relative to the adjacent pixel in the direction includes:
[0008] For each direction of the multiple directions where the pixel to be filtered is located, the pixel to be filtered is image-derived to obtain a Hessian matrix including pixel difference values of the pixel to be filtered in the multiple directions;
[0009] Obtaining a target direction corresponding to a maximum pixel difference of the pixel to be filtered according to the pixel differences of the pixel to be filtered in multiple directions, including:
[0010] According to the result of eigenvalue decomposition of the Hessian matrix, the target direction corresponding to the maximum pixel difference of the pixel point to be filtered is obtained.
[0011] In one possible implementation, the orthogonal direction of the target direction is an edge line of the image where the pixel to be filtered is located; controlling the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction, obtaining pixel values of sample pixel points around the orthogonal direction of the target direction, and filtering the pixel to be filtered, including:
[0012] The filter kernel of the pixel to be filtered is controlled to stretch along the edge line of the image, the pixel value of the sample pixel on the edge line of the image is obtained, and the pixel to be filtered is filtered.
[0013] In one possible implementation, the method further includes:
[0014] Receiving a filter strength parameter input by a user, and determining a stretching parameter of the filter kernel;
[0015] According to the result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter, configuring a stretching matrix for controlling the shape of the filter kernel;
[0016] Controlling the filter kernel of the pixel to be filtered to stretch along a direction orthogonal to the target direction includes:
[0017] The stretching matrix is used to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
[0018] In one possible implementation, the method further includes:
[0019] Receiving a filter strength parameter input by a user, and determining a parameter for adjusting the filter kernel size;
[0020] According to the parameter for adjusting the size of the filter kernel, configuring the scale parameter of the filter kernel;
[0021] Controlling the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction to obtain pixel values of sample pixel points around the orthogonal direction of the target direction, including:
[0022] The scale parameter is used to control the maximum diameter of the filter kernel along a direction orthogonal to the target direction, and to control the maximum diameter of the filter kernel along the target direction.
[0023] In one possible implementation, the method further includes:
[0024] Performing frequency domain information analysis on the image region where the pixel to be filtered is located to obtain the local variance of the image region where the pixel to be filtered is located;
[0025] Substituting the local variance into a preset stretch parameter curve to obtain a stretch adjustment value of the stretch parameter;
[0026] Using the stretching matrix, controlling the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction includes:
[0027] The stretching matrix is adjusted according to the stretching adjustment value to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
[0028] In one possible implementation, the method further includes:
[0029] Performing frequency domain information analysis on the image region where the pixel to be filtered is located to obtain the local variance of the image region where the pixel to be filtered is located;
[0030] Substituting the local variance into a preset size parameter curve to obtain a size adjustment value of the parameter for adjusting the filter kernel size;
[0031] Using the scale parameter, controlling the maximum diameter of the filter kernel along a direction orthogonal to the target direction, and controlling the maximum diameter of the filter kernel along the target direction, including:
[0032] According to the size adjustment value, the scale parameter is adjusted to control the maximum diameter of the filter kernel along the orthogonal direction of the target direction, and to control the maximum diameter of the filter kernel along the target direction.
[0033] In one possible implementation, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a maximum eigenvector; and according to the result obtained by performing eigenvalue decomposition on the Hessian matrix, obtaining a target direction corresponding to a maximum pixel difference of the pixel to be filtered includes:
[0034] Performing an inverse tangent function calculation on the ratio of the first eigenvalue to the second eigenvalue in the maximum eigenvector to obtain an angle between the target direction and a preset reference direction;
[0035] Controlling the filter kernel of the pixel to be filtered to stretch along a direction orthogonal to the target direction includes:
[0036] The filter kernel is controlled to rotate to an angle stretched along a direction orthogonal to the target direction according to the angle between the target direction and the reference direction.
[0037] In one possible implementation manner, after obtaining the angle between the target direction and the reference direction, the method further includes:
[0038] According to the angle between the target direction and the reference direction, configuring a rotation matrix for rotating the filter kernel;
[0039] Controlling the filter kernel to rotate to an angle stretched along an orthogonal direction of the target direction according to the angle between the target direction and the reference direction, comprising:
[0040] The rotation matrix is used to control the filter kernel to rotate to an angle stretched along an orthogonal direction of the target direction according to the angle between the target direction and the reference direction.
[0041] In one possible implementation, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; and a stretching matrix for controlling the shape of the filter kernel is configured according to the result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter, including:
[0042] Substitute the first eigenvalue, the second eigenvalue and the stretching parameter into formula (1) to configure the stretching matrix;
[0043] Among them, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, and L represents the stretching parameter.
[0044] In one possible implementation, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; and according to the parameter for adjusting the size of the filter kernel, configuring the scale parameter of the filter kernel includes:
[0045] Substitute the first eigenvalue, the second eigenvalue and the parameter for adjusting the size of the filter kernel into formula (2) to configure the scale parameter of the filter kernel;
[0046] Among them, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, ξ is the regularization parameter, and M represents the parameter used to adjust the filter kernel size.
[0047] In one possible implementation, the method further includes:
[0048] Receiving a filter strength parameter input by a user, and determining a domain range for acquiring the sample pixel points;
[0049] Controlling the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction, obtaining pixel values of sample pixel points around the orthogonal direction of the target direction, and filtering the pixel to be filtered, including:
[0050] Controlling the filter kernel of the pixel to be filtered to stretch within the domain along the orthogonal direction of the target direction;
[0051] The relative position of each sample pixel point within the filter core and the pixel point to be filtered is calculated, a filtering weight is assigned to each sample pixel point within the filter core, and the pixel point to be filtered is filtered using the sample pixel point assigned with the filtering weight.
[0052] In a second aspect, an embodiment of the present invention provides an image filtering device, which is provided in an electronic terminal device, and the device includes:
[0053] A calculation module, used for calculating, for each direction of a plurality of directions where a pixel point to be filtered is located, a pixel difference value of the pixel point to be filtered relative to an adjacent pixel point in the direction;
[0054] An acquisition module, used for acquiring a target direction corresponding to a maximum pixel difference value of the pixel point to be filtered according to the pixel difference values of the pixel point to be filtered in multiple directions;
[0055] The control module is used to control the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction, obtain the pixel values of the sample pixel points around the orthogonal direction of the target direction, and filter the pixel point to be filtered.
[0056] In one possible implementation, the calculation module includes:
[0057] A derivation submodule, used for performing image derivation on the pixel to be filtered in each of the multiple directions where the pixel to be filtered is located, to obtain a Hessian matrix including pixel difference values of the pixel to be filtered in the multiple directions;
[0058] The acquisition module comprises:
[0059] The target direction obtaining submodule is used to obtain the target direction corresponding to the maximum pixel difference of the pixel point to be filtered according to the result obtained by performing eigenvalue decomposition on the Hessian matrix.
[0060] In one possible implementation, the orthogonal direction of the target direction is an edge line of the image where the pixel to be filtered is located; the control module includes:
[0061] The first direction control submodule is used to control the filter kernel of the pixel to be filtered to stretch along the edge line of the image, obtain the pixel value of the sample pixel on the edge line of the image, and filter the pixel to be filtered.
[0062] In one possible implementation, the device further includes:
[0063] A first receiving module, used for receiving a filter strength parameter input by a user and determining a stretching parameter of the filter kernel;
[0064] A stretching matrix configuration module, configured to configure a stretching matrix for controlling the shape of the filter kernel according to a result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter;
[0065] The control module also includes:
[0066] The shape control submodule is used to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction by using the stretching matrix.
[0067] In one possible implementation, the device further includes:
[0068] A second receiving module, used for receiving a filter strength parameter input by a user, and determining a parameter for adjusting the filter kernel size;
[0069] A scale parameter configuration module, configured to configure the scale parameter of the filter kernel according to the parameter for adjusting the size of the filter kernel;
[0070] The control module also includes:
[0071] The scale control submodule is used to control the maximum diameter of the filter kernel along the orthogonal direction of the target direction and control the maximum diameter of the filter kernel along the target direction by using the scale parameter.
[0072] In one possible implementation, the device further includes:
[0073] An analysis module, used for performing frequency domain information analysis on the image region where the pixel to be filtered is located, to obtain a local variance of the image region where the pixel to be filtered is located;
[0074] A stretch adjustment value obtaining module, used for bringing the local variance into a preset stretch parameter curve to obtain a stretch adjustment value of the stretch parameter;
[0075] The shape control submodule includes:
[0076] The shape control subunit is used to adjust the stretching matrix according to the stretching adjustment value, and control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
[0077] In one possible implementation, the device further includes:
[0078] A size adjustment value obtaining module, used for bringing the local variance into a preset size parameter curve to obtain a size adjustment value of the parameter for adjusting the filter kernel size;
[0079] The scale control submodule includes:
[0080] The scale control subunit is used to adjust the scale parameter according to the size adjustment value, control the maximum diameter of the filter kernel along the orthogonal direction of the target direction, and control the maximum diameter of the filter kernel along the target direction.
[0081] In one possible implementation, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a maximum eigenvector; and the target direction acquisition submodule includes:
[0082] An angle calculation subunit, used for performing an inverse tangent function calculation on the ratio of the first eigenvalue to the second eigenvalue in the maximum eigenvector to obtain an angle between the target direction and a preset reference direction;
[0083] The control module also includes:
[0084] The second direction control submodule is used to control the filter kernel to rotate to an angle stretched along the orthogonal direction of the target direction according to the angle between the target direction and the reference direction.
[0085] In one possible implementation, the device further includes:
[0086] A rotation matrix configuration module, used to configure a rotation matrix for rotating the filter kernel according to the angle between the target direction and the reference direction;
[0087] The second direction control submodule includes: a direction control subunit, which is used to use the rotation matrix to control the filter kernel to rotate to an angle stretched in an orthogonal direction along the target direction according to the angle between the target direction and the reference direction.
[0088] In one possible implementation, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; and the stretching matrix configuration module includes:
[0089] a stretching matrix configuration submodule, used to substitute the first eigenvalue, the second eigenvalue and the stretching parameter into formula (1) to configure the stretching matrix;
[0090] Among them, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, and L represents the stretching parameter.
[0091] In one possible implementation, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; and the scale parameter configuration module includes:
[0092] A scale parameter configuration submodule, used to substitute the first eigenvalue, the second eigenvalue and the parameter for adjusting the size of the filter kernel into formula (2) to configure the scale parameter of the filter kernel;
[0093] Among them, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, ξ is the regularization parameter, and M represents the parameter used to adjust the filter kernel size.
[0094] In one possible implementation, the device further includes:
[0095] A third receiving module is used to receive a filter strength parameter input by a user and determine a domain range for acquiring the sample pixel points;
[0096] The control module comprises: a third direction control submodule, which is used to control the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction within the domain range;
[0097] The weight allocation submodule is used to calculate the relative position of each sample pixel point located in the filter core and the pixel point to be filtered, allocate a filtering weight to each sample pixel point located in the filter core, and filter the pixel point to be filtered using the sample pixel point allocated with the filtering weight.
[0098] In a third aspect, an embodiment of the present application provides a terminal device, comprising: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the first aspect.
[0099] In a fourth aspect, an embodiment of the present application provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method provided in the first aspect.
[0100] It should be understood that the second to fourth aspects of the embodiments of the present application are consistent with the technical solutions of the first aspect of the embodiments of the present application, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated here.
Brief Description of the Drawings
[0101] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0102] Figure 1 is a flowchart of the steps of the image filtering method proposed in an embodiment of the present invention;
[0103] Figure 2 is a schematic diagram of a filter kernel stretched along an orthogonal direction to a target direction in an example of the present invention;
[0104] Figure 3 is a flowchart of steps for controlling the shape of a filter kernel according to another embodiment of the present invention;
[0105] Figure 4 is a flowchart of steps for controlling the relative size of filter kernels according to another embodiment of the present invention;
[0106] Figure 5 is a schematic diagram of an exemplary preset stretching parameter curve of the present invention;
[0107] Figure 6 is a schematic diagram of an exemplary pre-set parameter curve for adjusting the filter kernel size of the present invention;
[0108] Figure 7 This is a flowchart of an example of the present invention for filtering pixels to be filtered using sample pixels carrying filtering weights;
[0109] Figure 8 is a functional module diagram of an image filtering device proposed in an embodiment of the present invention;
[0110] Fig. 9 A schematic diagram of the structure of an electronic terminal device provided by an embodiment of the present invention;
[0111] Fig.10 A schematic diagram of the structure of a terminal device provided in one embodiment of this specification. [Specific implementation method]
[0112] In order to better understand the technical solution of this specification, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0113] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0114] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms of "a", "said" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.
[0115] The image filtering method proposed in the present invention is applied to an electronic terminal device, which may be a computer, a computer cluster, a mobile phone or a server, etc. Figure 1 is a flowchart of the steps of the image filtering method proposed in an embodiment of the present invention, such as Figure 1 As shown, the steps of image filtering are as follows:
[0116] Step S101: for each direction of a plurality of directions where a pixel point to be filtered is located, a pixel difference value of the pixel point to be filtered relative to an adjacent pixel point in the direction is calculated.
[0117] The pixel to be filtered is the current image noise point among the image noise points detected by the electronic terminal device. The pixel difference between pixel A and its adjacent pixel B in the image can be the chrominance (UV) difference value between pixel A and pixel B. It can also be the three primary colors (RGB) difference value between pixel A and pixel B.
[0118] In an example of the present application, adjacent pixels of the pixel to be filtered are obtained in the horizontal direction, vertical direction, and 45° direction, and the pixel difference of the pixel to be filtered relative to the adjacent pixels in the horizontal direction, the pixel difference of the pixel to be filtered relative to the adjacent pixels in the vertical direction, and the pixel difference of the filtered pixel relative to the adjacent pixels in the 45° direction are calculated.
[0119] Step S102: obtaining a target direction corresponding to a maximum pixel difference value of the pixel point to be filtered according to the pixel difference values of the pixel point to be filtered in multiple directions.
[0120] The change rates of pixels in the flat area (low-frequency area) of the image in different directions are similar, while the change rates of pixels in the texture area (high-frequency area) of the image in different directions are quite different. Based on the above findings, the embodiment of the present invention calculates the pixel difference of the pixel to be filtered in multiple directions, compares the pixel difference in multiple directions, and detects the direction with the largest pixel change rate when the pixel to be filtered is a pixel at the edge of the image, and determines the orthogonal direction of the direction with the largest pixel change rate.
[0121] Step S103: Control the filter kernel of the pixel to be filtered to stretch along the direction orthogonal to the target direction, obtain pixel values of sample pixel points around the direction orthogonal to the target direction, and filter the pixel to be filtered.
[0122] Controlling the filter kernel of the pixel to be filtered to stretch along the direction orthogonal to the target direction may refer to controlling the filter kernel to deform along the direction orthogonal to the target direction while keeping the circumference of the filter kernel unchanged to obtain an elliptical filter kernel, and stretching the major axis of the filter kernel in the direction orthogonal to the target direction so that the major axis of the filter kernel is consistent with the orthogonal direction of the target direction.
[0123] Figure 2 is a schematic diagram of a filter kernel stretched along an orthogonal direction to the target direction in an example of the present invention, such as Figure 2 As shown, the k1 direction is the orthogonal direction of the target direction, and the k2 direction is the target direction. By controlling the filter kernel of pixel point A to stretch along the orthogonal direction of the target direction, the sample pixel points in the filter kernel are made to be the pixel points close to the edge of the image. The sample pixel points in the filter kernel carry more image information of the image edge than the pixel points in other areas.
[0124] The embodiment of the present invention calculates the pixel difference of the pixel to be filtered in each direction relative to the adjacent pixel points in the direction, obtains a direction in which the pixel value of the pixel to be filtered changes the most, takes the target direction as the target direction, and obtains the orthogonal direction of the target direction; the target direction is a direction in which the pixel change rate of the pixel to be filtered is the largest, the orthogonal direction of the target direction is a direction in which the pixel value of the pixel to be filtered changes the least, when there is a direction with the largest and a direction with the smallest pixel value change in multiple directions where the pixel to be filtered is located, the direction in which the pixel value of the pixel to be filtered changes the least is the edge of the image, the pixel to be filtered is a pixel point located at the edge of the image, sample pixel points around the orthogonal direction of the target direction of the pixel to be filtered are obtained, and the pixel to be filtered is filtered, that is, the pixel to be filtered is filtered using the pixel points at the edge of the image, and the edge information of the edge of the image where the pixel to be filtered is located can be retained while filtering.
[0125] The embodiment of the present invention proposes that, when there is no significant difference in the pixel difference of the pixel to be filtered relative to the adjacent pixel in each direction, it is detected that the pixel to be filtered is located in the flat area of the image, and multiple sample pixel points in the filter kernel can be directly obtained, and the pixel to be filtered is filtered using the multiple sample pixel points. When there is a significant difference in the pixel difference of the pixel to be filtered relative to the adjacent pixel in each direction, it is detected that the pixel to be filtered is located in the texture area of the image, and the target direction in which the pixel difference of the pixel to be filtered relative to the adjacent pixel is the largest is obtained, and the filter kernel of the pixel to be filtered is controlled to stretch along the orthogonal direction of the target direction, and the filter kernel of the pixel to be filtered is controlled to deform along the edge of the image to obtain an elliptical filter kernel, the major axis of the elliptical filter kernel is consistent with the edge of the image, and the minor axis of the elliptical filter kernel is consistent with the orthogonal direction of the edge of the image, so the greater the degree of stretching of the filter kernel of the pixel to be filtered along the orthogonal direction of the target direction, the closer the pixel in the filter kernel is to the edge of the image. Therefore, the filter kernel of the pixel to be filtered is controlled to stretch along the orthogonal direction of the target direction, and the filter kernel of the pixel to be filtered is controlled to stretch along the edge line of the image, and the sample pixel points selected by the filter kernel are limited to the pixel points infinitely close to the edge line of the image, so that the pixel points to be filtered are all pixel points carrying the image edge information, thereby ensuring that the filtered pixel points after filtering retain the image edge information to the greatest extent.
[0126] The orthogonal direction of the target direction is the edge line of the image where the pixel to be filtered is located; controlling the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction, obtaining the pixel values of the sample pixel points around the orthogonal direction of the target direction, and filtering the pixel to be filtered, including:
[0127] The filter kernel of the pixel to be filtered is controlled to stretch along the edge line of the image, the pixel value of the sample pixel on the edge line of the image is obtained, and the pixel to be filtered is filtered.
[0128] Another embodiment of the present invention proposes a method for calculating the pixel difference of a pixel to be filtered relative to adjacent pixels in all directions. In addition, the method for calculating the pixel difference of a pixel to be filtered relative to adjacent pixels in all directions proposed in the embodiment of the present invention can directly derive the basis for calculating the target direction.
[0129] The embodiment of the present invention finds that the pixel value change rate of the pixel points on the edge line of the image is the smallest, while the pixel value change rate of the pixel points in the direction orthogonal to the edge line of the image is the largest. In view of the above discovery, the embodiment of the present invention uses the characteristic that the Hessian Matrix is a square matrix composed of the second-order partial derivatives of a multivariate function, and derives the image in multiple directions to obtain the gradients of the pixel points to be filtered in multiple directions, and constitute the Hessian matrix of the pixel points to be filtered. The Hessian matrix of the pixel points to be filtered is composed of the gradients of the pixel points to be filtered in multiple directions, so that by solving the Hessian matrix, the target direction orthogonal to the edge line of the image can be directly obtained. In the above method, the embodiment of the present invention directly realizes the control of the filter kernel direction based on the Hessian matrix, which is simple and fast.
[0130] Step S101 includes sub-steps:
[0131] Step S101 - 1 : for each of the multiple directions where the pixel to be filtered is located, perform image derivation on the pixel to be filtered to obtain a Hessian matrix including pixel difference values of the pixel to be filtered in the multiple directions.
[0132] Taking the horizontal direction among multiple directions as an example, a method for performing image differentiation on the pixel to be filtered to obtain the pixel difference of the pixel to be filtered in the horizontal direction can be: using a two-dimensional function to represent the image, performing differentiation on the image in the horizontal direction, obtaining the derivative function of the image in the horizontal direction, substituting the coordinates of the pixel to be filtered into the second-order derivative function, and obtaining the pixel difference of the pixel to be filtered relative to the adjacent pixel in the horizontal direction.
[0133] After obtaining the pixel differences of the pixel points to be filtered in multiple directions, the Hessian matrix of the pixel points to be filtered is constructed.
[0134] Step S102 includes sub-step S102-1: obtaining the target direction corresponding to the maximum pixel difference of the pixel point to be filtered according to the result obtained by performing eigenvalue decomposition on the Hessian matrix.
[0135] The embodiment of the present application performs eigenvalue decomposition on the Hessian matrix to obtain the target direction corresponding to the maximum pixel difference of the pixel point to be filtered, thereby obtaining the stretching direction of the filter kernel.
[0136] Another embodiment of the present invention proposes a method for performing eigenvalue decomposition on the Hessian matrix to obtain a target direction corresponding to the maximum pixel difference of the pixel to be filtered. The embodiment of the present invention calculates the angle between the direction of the maximum pixel difference of the pixel to be filtered and a preset reference direction. According to the preset reference direction, the target direction is determined to be the direction of the maximum pixel difference of the pixel to be filtered, and the short axis of the filter kernel is controlled to rotate by a corresponding angle to be consistent with the target direction, thereby realizing control of the direction of the filter kernel.
[0137] The result obtained by performing eigenvalue decomposition on the Hessian matrix includes the maximum eigenvector. Performing eigenvalue decomposition on the Hessian matrix can obtain two eigenvectors, and the largest one is taken as the maximum eigenvector for calculating the target direction in the embodiment of the present invention.
[0138] Step S102-1 includes sub-step S102-11: performing an inverse tangent function calculation on the ratio of the first eigenvalue to the second eigenvalue in the maximum eigenvector to obtain an angle between the target direction and a preset reference direction.
[0139] The first eigenvalue is the first value in the maximum eigenvector, and the second eigenvalue is the second value in the maximum eigenvector. The preset reference direction is any direction, and generally the horizontal direction and the vertical direction are set as the reference direction.
[0140] Step S103 includes sub-step S103-1: controlling the filter kernel to rotate to an angle stretched along a direction orthogonal to the target direction according to the angle between the target direction and the reference direction.
[0141] Another embodiment of the present invention proposes an implementation method for controlling the filter kernel to rotate to an angle stretched in a direction orthogonal to the target direction according to the angle between the target direction and the reference direction.
[0142] After executing step S102-11 to obtain the angle between the target direction and the reference direction, execute step S102-12: configuring a rotation matrix for rotating the filter kernel according to the angle between the target direction and the reference direction.
[0143] Execute sub-step S103-11 of step S103-1: use the rotation matrix to control the filter kernel to rotate to an angle stretched along the orthogonal direction of the target direction according to the angle between the target direction and the reference direction.
[0144] The embodiment of the present invention locates the specific position of the target direction corresponding to the maximum pixel difference of the pixel to be filtered by obtaining the angle between the target direction and the reference direction, so that the angle between the target direction and the reference direction is used as the basis for controlling the rotation of the filter kernel, and the filter kernel is accurately rotated to a position where the long axis is consistent with the orthogonal direction of the target direction, thereby realizing the control of stretching the filter kernel along the orthogonal direction of the target direction. In the above method, by controlling the filter kernel to rotate a certain angle, the angle between the short axis of the filter kernel and the reference direction is consistent with the angle between the target direction and the reference direction, so that the method of controlling the stretching of the filter kernel along the orthogonal direction of the target direction is simple and easy to realize. Therefore, the embodiment of the present invention obtains the target direction corresponding to the maximum pixel difference of the pixel to be filtered by calculating the Hessian matrix of the kernel to be filtered, and the technical solution of controlling the stretching of the filter kernel of the pixel to be filtered along the orthogonal direction of the target direction can be simply and effectively realized: obtaining sample pixel points adjacent to the edge line of the image to filter the pixel to be filtered, and retaining the effect of the edge information of the image.
[0145] Figure 3 FIG. 1 is a flowchart of the steps of controlling the shape of the filter kernel in another embodiment of the present invention. Figure 3 As shown, the steps are as follows:
[0146] Step S301: receiving a filter strength parameter input by a user, and determining a stretching parameter of the filter kernel.
[0147] In one example of the present invention, an electronic terminal device displays a filter strength parameter selection interface, and the selection interface displays that different filter levels are obtained by dividing the maximum filter strength according to the filter effect. One filter level corresponds to one filter strength parameter. The larger the filter level, the larger the corresponding filter strength parameter. One filter strength parameter corresponds to one stretch parameter. The larger the filter strength parameter, the smaller the stretch parameter.
[0148] The stretching parameter determined according to the filter strength parameter is the initial stretching parameter, and the initial stretching parameter needs to be dynamically adjusted according to the frequency domain information of the image.
[0149] Step S302: According to the result of eigenvalue decomposition of the Hessian matrix and the stretching parameter, a stretching matrix for controlling the shape of the filter kernel is configured. The result of eigenvalue decomposition of the Hessian matrix includes a first eigenvalue and a second eigenvalue.
[0150] In one example of the present application, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, and L represents the stretching parameter, which are substituted into the formula (1) for configuring the stretching matrix E;
[0151]
[0152] Step S103 includes sub-step S303: using the stretching matrix, controlling the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
[0153] The larger the ratio of the stretched diameter of the filter kernel in the direction orthogonal to the target direction to the stretched diameter of the filter kernel in the target direction, the narrower and longer the filter kernel is.
[0154] The stretching matrix E is used to control the shape of the filter kernel. After the stretching parameter L is brought into the stretching matrix E, the shape of the filter kernel can be adjusted by adjusting the value of L. The elements in the first row and first column of the stretching matrix E correspond to the major axis of the filter kernel, controlling the stretching diameter of the filter kernel in the orthogonal direction of the target direction, and the elements in the second row and second column of the stretching matrix E correspond to the minor axis of the filter kernel, which are used to control the stretching diameter of the filter kernel in the target direction.
[0155] According to the stretching matrix E, the stretching parameter L determines the stretching degree of the filter kernel along the image edge direction. The larger the stretching parameter L, the narrower and longer the shape of the filter kernel. When the difference in pixel difference between the pixel to be filtered and the adjacent pixel in each direction is large, the Hessian matrix of the pixel to be filtered is solved to obtain the first eigenvalue λ1 and the second eigenvalue λ2. The stretching matrix E is configured according to the first eigenvalue λ1 and the second eigenvalue λ2. The shape of the filter kernel is adjusted by the stretching matrix E, and the circular filter kernel is stretched into an ellipse. In the above-mentioned case of controlling the filter kernel of the pixel to be filtered to be stretched along the image edge line, the closer the sample pixel selected by the filter kernel frame is to the image edge line, the richer the image edge information carried by the sample pixel, and the filtering result of the pixel to be filtered retains more image edge information. The smaller the stretching parameter L, the shape of the filter kernel is close to a circle. When filtering the pixel to be filtered, more sample pixels are obtained and the denoising strength is stronger.
[0156] Figure 4 FIG. 1 is a flowchart of another embodiment of the present invention for controlling the relative size of the filter kernel. Figure 4 As shown, the steps are as follows:
[0157] Step S401: receiving a filter strength parameter input by a user, and determining a parameter for adjusting the filter kernel size.
[0158] In one example of the present invention, an electronic terminal device displays a filter strength parameter selection interface, and the selection interface displays that different filter levels are obtained by dividing the maximum filter strength according to the filter effect. One filter level corresponds to one filter strength parameter. The larger the filter level, the larger the corresponding filter strength parameter. One filter strength parameter corresponds to a parameter for adjusting the filter kernel size. The larger the filter strength parameter, the larger the parameter for adjusting the filter kernel size.
[0159] Step S402: According to the parameter for adjusting the size of the filter kernel, the scale parameter of the filter kernel is configured. The result of performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue.
[0160] In an example of the present application, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, and M represents a parameter for adjusting the size of the filter kernel, and is introduced into formula (2) for configuring the scale parameter S of the filter kernel;
[0161] ξ is the regularization parameter and can be set to 0.00001.
[0162] Step S103 includes sub-step S403: using the scale parameter, controlling the maximum diameter of the filter kernel along the direction orthogonal to the target direction, and controlling the maximum diameter of the filter kernel along the target direction.
[0163] The larger the parameter M used to adjust the filter kernel size is, the larger the maximum diameter of the filter kernel along the orthogonal direction of the target direction and the maximum diameter of the filter kernel along the target direction are, the larger the relative size of the filter kernel is, the more sample pixels are to be filtered, and the greater the filtering intensity is.
[0164] The parameter M used to adjust the filter kernel size determined according to the filter strength parameter needs to be dynamically adjusted according to the frequency domain information of the image region where the pixel to be filtered is actually located.
[0165] According to step S303, step S103-1 and step S403, the Hessian matrix of the pixel to be filtered is subjected to eigenvalue decomposition to obtain the first eigenvalue and the second eigenvalue, as well as the eigenvectors corresponding to the first eigenvalue and the second eigenvalue, respectively. By further calculating the maximum eigenvector, the target direction corresponding to the maximum pixel difference of the filtered pixel is determined, and then the stretching direction of the filter kernel is controlled to be an orthogonal direction along the target direction; the stretching shape of the filter kernel is controlled by combining the first eigenvalue, the second eigenvalue and the stretching parameter configuration; the relative size of the filter kernel is controlled by combining the first eigenvalue, the second eigenvalue and the parameter M for adjusting the size of the filter kernel; therefore, the embodiment of the present invention achieves the control of the stretching direction, stretching shape and relative size of the filter kernel by derivation of the image to obtain the Hessian matrix, which is simple and convenient.
[0166] Another embodiment of the present invention performs frequency domain information analysis on the image area where the pixel to be filtered is located, determines whether the pixel to be filtered is located in a flat area of the image or in a texture area of the image, and adjusts the pre-set stretching parameters and the shape of the filter kernel according to the judgment result; and adjusts the pre-set parameters for adjusting the size of the filter kernel according to the judgment result to adjust the size of the filter kernel.
[0167] Step S501: performing frequency domain information analysis on the image region where the pixel to be filtered is located, and obtaining the local variance of the image region where the pixel to be filtered is located.
[0168] Frequency domain information can be extracted using a gradient operator; gradient operators include but are not limited to the Sobel operator, the Canny operator, or the Laplace operator. Local variance is the image gradient of a local area of the image. Image gradient refers to the rate of change of a specific pixel in the image in both the horizontal and vertical directions.
[0169] According to the judgment result, the steps to adjust the preset stretching parameters are as follows:
[0170] Step S512: Substitute the local variance into a preset stretch parameter curve to obtain a stretch adjustment value of the stretch parameter.
[0171] Figure 5 is a schematic diagram of an exemplary preset stretching parameter curve of the present invention, Figure 5 The horizontal axis represents the local variance, and the vertical axis represents the stretching parameter L. Figure 5 Where v1, v2, L1, and L2 are pre-set configurable parameters. v2 is set according to the maximum image gradient allowed by the image, and v1 is set according to the minimum image gradient. L1 is obtained when the filter kernel is circular, and L2 is obtained according to the maximum major axis to minor axis ratio allowed by the elliptical filter kernel. The local variance obtained in step S501 is brought into Figure 5 The preset stretch parameter curve is shown to obtain the stretch adjustment value of the stretch parameter.
[0172] Step S303 includes sub-step S513: adjusting the stretching matrix according to the stretching adjustment value to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
[0173] In the initial stage of filtering, an embodiment of the present invention obtains an initial value of a stretching parameter based on a filter strength parameter input by a user, and determines the filter strength for the entire image; during the filtering process, the stretching parameter is adjusted based on the frequency domain information of the image, and the stretching matrix is adjusted by the stretching parameter, so as to ensure that, on the basis of the overall filter strength performed on the image, the sample pixel points selected by the filter kernel conform to the image gradient of the specific image area where the pixel points to be filtered are located.
[0174] According to the judgment result, the steps of adjusting the pre-set parameters for adjusting the filter kernel size are as follows:
[0175] Step S522: bringing the local variance into a preset size parameter curve to obtain a size adjustment value of the parameter for adjusting the filter kernel size.
[0176] Figure 6 is a schematic diagram of an exemplary parameter curve preset for adjusting the filter kernel size of the present invention, Figure 6 The horizontal axis represents the local variance, and the vertical axis represents the parameter M used to adjust the filter kernel size. Figure 6 Among them, v3, v4, m1, and m2 are pre-set configurable parameters. v2 is set according to the maximum image gradient allowed by the image, v1 is set according to the minimum image gradient, m1 is obtained based on the minimum filter kernel allowed by the filter strength, and m2 is obtained based on the maximum filter kernel allowed by the filter strength.
[0177] Step S403 includes sub-step S523: adjusting the scale parameter according to the size adjustment value, controlling the maximum diameter of the filter kernel along the orthogonal direction of the target direction, and controlling the maximum diameter of the filter kernel along the target direction.
[0178] In the initial stage of filtering, the embodiment of the present invention obtains the initial value of the parameter for adjusting the filter kernel size according to the filter strength parameter input by the user, and determines the filtering strength for the entire image; during the filtering process, the size adjustment value is adjusted according to the frequency domain information of the image, and the scale parameter is adjusted by the size adjustment value. When the image area where the pixel to be filtered is located is a flat area, the filter kernel is adjusted to be relatively large and the filtering strength is relatively large. When the image area where the pixel to be filtered is located is a texture area, the filter kernel is adjusted to be relatively small and the filtering strength is relatively small, so as to ensure that the filtering strength of the filter kernel meets the image gradient of the specific image area where the pixel to be filtered is located on the basis of the overall filtering strength performed on the image.
[0179] Another embodiment of the present invention proposes a method for filtering pixels to be filtered using sample pixels carrying filtering weights, the steps of which are as follows:
[0180] Step S601: receiving a filter strength parameter input by a user, and determining a domain range for acquiring the sample pixel points.
[0181] In one example of the present invention, the electronic terminal device displays a filter strength parameter selection interface, and the selection interface displays different filter levels obtained by dividing the maximum filter strength according to the filter effect. One filter level corresponds to a filter kernel size N (N is an odd number). The domain range is an image area of size N×N.
[0182] Step S103 includes sub-step S602 and sub-step S603. Step S602: Control the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction within the domain.
[0183] Step S603: Calculate the relative position of each sample pixel point within the filter core and the pixel point to be filtered, assign a filtering weight to each sample pixel point within the filter core, and filter the pixel point to be filtered using the sample pixel point assigned the filtering weight.
[0184] An example of the present invention proposes an implementation method of filtering the pixel to be filtered by using sample pixel points carrying filtering weights. Figure 7 FIG. 1 is a flowchart of an example of the present invention for filtering pixels to be filtered using sample pixels carrying filtering weights. Figure 7 As shown, the following steps need to be performed to filter the pixels to be filtered using sample pixels carrying filtering weights:
[0185] Step S701: input an image; the input image may be a grayscale image or a color image. The embodiment of the present invention directly processes the grayscale image and processes each channel of the color image separately.
[0186] Step S702: Calculate the Hessian matrix of the image to obtain the pixel difference between the pixel to be filtered and the adjacent pixel in multiple directions.
[0187] For example, a two-dimensional function f(x, y) is used to represent the image, and the second-order derivative of the image in the horizontal direction is calculated to obtain I xx , calculate the second-order derivative of the image in the vertical direction, and get I yy , first calculate the derivative of the image in the horizontal direction, and get I x , and then to I x Calculate the derivative in the vertical direction and get I xy The Hessian matrix of the image is shown in formula (3):
[0188]
[0189] In the process of filtering the image, the noise point of the image currently being filtered is used as the pixel point to be filtered, and the coordinates (x1, y1) of the pixel point to be filtered are brought into the image Hessian matrix to obtain the Hessian matrix of the pixel point to be filtered.
[0190] Step S703: Perform eigenvalue decomposition on the Hessian matrix of the pixel to be filtered to obtain the first eigenvalue λ1 and the second eigenvalue λ2, the eigenvector V1 corresponding to the first eigenvalue λ1, and the eigenvector V2 orthogonal to the eigenvector V1. Select the larger one of V1 and V2 as the main eigenvector, substitute the elements g1 and g2 in the main eigenvector into the inverse tangent function formula (4), and calculate the angle between the target direction corresponding to the maximum pixel difference of the pixel to be filtered and the preset reference direction:
[0191]
[0192] After obtaining the target direction corresponding to the maximum pixel difference of the pixel point to be filtered, the long axis of the filter kernel can be controlled to rotate to be consistent with the orthogonal direction of the target direction.
[0193] Step S704: Substitute the angle θ between the target direction and the reference direction into formula (5) to configure the rotation matrix R of the rotation filter kernel. θ :
[0194]
[0195] Step S705: Calculate the stretching matrix. The stretching matrix E may be calculated using the method proposed in other embodiments of the present invention using formula (1).
[0196] Step S706: Calculate the scale parameter. The scale parameter S may be calculated using the method proposed in other embodiments of the present invention using formula (2).
[0197] The present invention obtains the rotation matrix R for adjusting the filter kernel direction of the pixel to be filtered. θ , by adjusting the major axis and minor axis of the filter kernel, adjusting the filter kernel to an elliptical or circular stretching matrix E, and adjusting the scale parameter S of the filter kernel within the domain range; thereby realizing dynamic adjustment of the filter kernel according to the image information of the image area where the pixel to be filtered is located, so that the obtained sample pixel points match the image information of the image area where the pixel to be filtered is located.
[0198] Rotation matrix R θ , the stretching matrix E, and the scale parameter S can also be combined with the relative position of the sample pixel and the pixel to be filtered to assign filtering weights to the sample pixel.
[0199] Step S707: Rotate the rotation matrix R θ , stretching matrix E, and scale parameter S are introduced into formula (6) to set the covariance matrix Ω of the filter kernel:
[0200] Ω=R θ ER θ T S (6).
[0201] Step S708: According to the covariance matrix Ω of the filter kernel, the relative positions of the sample pixels in the filter kernel and the pixels to be filtered, obtain the filter kernel weight for assigning a filter weight to each sample pixel in the filter kernel; calculate the filter kernel weight W i The formula (7) is as follows:
[0202] Among them, d i It is the offset between the i-th sample pixel and the pixel to be filtered among all the sample pixels within the filter kernel.
[0203] Step S709: According to W i , assign filtering weights to each sample pixel and filter the image.
[0204] Step S710: Output the image.
[0205] The embodiment of the present invention dynamically adjusts the direction, shape, and size of the filter kernel for different pixels to be filtered according to the image information of the image area where the pixels are located, so that the filter kernel is stretched along the edge of the image with the verified size and shape, so that the sample pixels selected by the filter kernel can retain the image information of the image area where the pixels to be filtered are located to the greatest extent. The covariance matrix of the filter kernel is constructed by dynamically adjusting the rotation matrix of the filter kernel direction, the stretching matrix of the filter kernel shape, and the scale parameter of the filter kernel size. The covariance matrix of the filter kernel is combined with the relative position of each sample pixel and the pixel to be filtered to assign a filter weight to each sample pixel to ensure that the filter weight of the sample pixel corresponds to the influence of the sample pixel on the pixel to be filtered, thereby ensuring the accuracy of the filtering.
[0206] Figure 8 is a functional module diagram of an image filtering device proposed in an embodiment of the present invention. The image filtering device is arranged in a terminal device, such as Figure 8 As shown, the device comprises:
[0207] A calculation module 81 is used to calculate the pixel difference of the pixel to be filtered relative to the adjacent pixel in each direction among the multiple directions where the pixel to be filtered is located;
[0208] An obtaining module 82 is used to obtain a target direction corresponding to a maximum pixel difference value of the pixel point to be filtered according to the pixel difference values of the pixel point to be filtered in multiple directions;
[0209] The control module 83 is used to control the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction, obtain the pixel values of the sample pixel points around the orthogonal direction of the target direction, and filter the pixel to be filtered.
[0210] Figure 8 The image filtering device provided in the embodiment shown can be used to implement the present invention Figures 1 to 7 The technical solution of the method embodiment shown, its implementation principle and technical effects can be further referred to the relevant description in the method embodiment.
[0211] Optionally, the calculation module includes:
[0212] A derivation submodule, used for performing image derivation on the pixel to be filtered in each of the multiple directions where the pixel to be filtered is located, to obtain a Hessian matrix including pixel difference values of the pixel to be filtered in the multiple directions;
[0213] The acquisition module comprises:
[0214] The target direction obtaining submodule is used to obtain the target direction corresponding to the maximum pixel difference of the pixel point to be filtered according to the result obtained by performing eigenvalue decomposition on the Hessian matrix.
[0215] Optionally, the orthogonal direction of the target direction is an edge line of the image where the pixel to be filtered is located; and the control module includes:
[0216] The first direction control submodule is used to control the filter kernel of the pixel to be filtered to stretch along the edge line of the image, obtain the pixel value of the sample pixel on the edge line of the image, and filter the pixel to be filtered.
[0217] Optionally, the device further comprises:
[0218] A first receiving module, used for receiving a filter strength parameter input by a user and determining a stretching parameter of the filter kernel;
[0219] A stretching matrix configuration module, configured to configure a stretching matrix for controlling the shape of the filter kernel according to a result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter;
[0220] The control module also includes:
[0221] The shape control submodule is used to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction by using the stretching matrix.
[0222] Optionally, the device further comprises:
[0223] A second receiving module, used for receiving a filter strength parameter input by a user, and determining a parameter for adjusting the filter kernel size;
[0224] A scale parameter configuration module, configured to configure the scale parameter of the filter kernel according to the parameter for adjusting the size of the filter kernel;
[0225] The control module also includes:
[0226] The scale control submodule is used to control the maximum diameter of the filter kernel along the orthogonal direction of the target direction and control the maximum diameter of the filter kernel along the target direction by using the scale parameter.
[0227] Optionally, the device further comprises:
[0228] An analysis module, used for performing frequency domain information analysis on the image region where the pixel to be filtered is located, to obtain a local variance of the image region where the pixel to be filtered is located;
[0229] A stretch adjustment value obtaining module, used for bringing the local variance into a preset stretch parameter curve to obtain a stretch adjustment value of the stretch parameter;
[0230] The shape control submodule includes:
[0231] The shape control subunit is used to adjust the stretching matrix according to the stretching adjustment value, and control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
[0232] Optionally, the device further comprises:
[0233] A size adjustment value obtaining module, used for bringing the local variance into a preset size parameter curve to obtain a size adjustment value of the parameter for adjusting the filter kernel size;
[0234] The scale control submodule includes:
[0235] The scale control subunit is used to adjust the scale parameter according to the size adjustment value, control the maximum diameter of the filter kernel along the orthogonal direction of the target direction, and control the maximum diameter of the filter kernel along the target direction.
[0236] Optionally, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a maximum eigenvector; and the target direction acquisition submodule includes:
[0237] An angle calculation subunit, used for performing an inverse tangent function calculation on the ratio of the first eigenvalue to the second eigenvalue in the maximum eigenvector to obtain an angle between the target direction and a preset reference direction;
[0238] The control module also includes:
[0239] The second direction control submodule is used to control the filter kernel to rotate to an angle stretched along the orthogonal direction of the target direction according to the angle between the target direction and the reference direction.
[0240] Optionally, the device further comprises:
[0241] A rotation matrix configuration module, used to configure a rotation matrix for rotating the filter kernel according to the angle between the target direction and the reference direction;
[0242] The second direction control submodule includes: a direction control subunit, which is used to use the rotation matrix to control the filter kernel to rotate to an angle stretched in an orthogonal direction along the target direction according to the angle between the target direction and the reference direction.
[0243] Optionally, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; and the stretching matrix configuration module includes:
[0244] a stretching matrix configuration submodule, used to substitute the first eigenvalue, the second eigenvalue and the stretching parameter into formula (1) to configure the stretching matrix;
[0245] Among them, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, and L represents the stretching parameter.
[0246] Optionally, a result obtained by performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; and the scale parameter configuration module includes:
[0247] A scale parameter configuration submodule, used to substitute the first eigenvalue, the second eigenvalue and the parameter for adjusting the size of the filter kernel into formula (2) to configure the scale parameter of the filter kernel;
[0248] Among them, λ1 represents the first eigenvalue, λ2 represents the second eigenvalue, ξ is the regularization parameter, and M represents the parameter used to adjust the filter kernel size.
[0249] Optionally, the device further comprises:
[0250] A third receiving module is used to receive a filter strength parameter input by a user and determine a domain range for acquiring the sample pixel points;
[0251] The control module comprises: a third direction control submodule, which is used to control the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction within the domain range;
[0252] The weight allocation submodule is used to calculate the relative position of each sample pixel point located in the filter core and the pixel point to be filtered, allocate a filtering weight to each sample pixel point located in the filter core, and filter the pixel point to be filtered using the sample pixel point allocated with the filtering weight.
[0253] The device provided in the above-mentioned embodiment is used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effect can be further referred to the relevant description in the method embodiment, which will not be repeated here.
[0254] Fig. 9 A structural schematic diagram of an electronic terminal device provided in an embodiment of the present invention, the electronic terminal device 200 includes a processor 210, a memory 211, and a computer program stored in the memory 211 and executable on the processor 210, the processor 210 implements the steps in the aforementioned method embodiment when executing the program, the electronic terminal device provided in the embodiment can be used to execute the technical solution of the method embodiment shown above, and its implementation principle and technical effects can be further referred to the relevant description in the method embodiment, which will not be repeated here.
[0255] Fig.10 A schematic diagram of the structure of a terminal device provided in one embodiment of this specification, such as Fig.10 As shown, the terminal device may include at least one processor; and at least one memory in communication with the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the instructions of this specification. Figure 1 to Figure 7 The illustrated embodiment provides an image filtering method.
[0256] The terminal device may be a smart electronic device such as a smart phone, a tablet computer or a laptop computer. This embodiment does not limit the form of the terminal device.
[0257] It is understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the present application, the terminal device 100 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0258] The processor 110 may include one or more processing units, for example, the processor 110 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0259] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.
[0260] The processor 110 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may store instructions or data that the processor 110 has just used or cyclically used. If the processor 110 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0261] The processor 110 executes various functional applications and data processing by running the programs stored in the internal memory 121, such as implementing the present application Figure 1 to Figure 7 The illustrated embodiment provides an image filtering method.
[0262] The wireless communication function of the terminal device 100 can be implemented through the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, the modem processor and the baseband processor.
[0263] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in terminal device 100 can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve the utilization of antennas. For example, antenna 1 can be reused as a diversity antenna for a wireless local area network. In some other embodiments, the antenna can be used in combination with a tuning switch.
[0264] The terminal device 100 implements the display function through a GPU, a display screen 194, and an application processor. The GPU is a microprocessor for image processing, which connects the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0265] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the terminal device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0266] The terminal device 100 can realize the shooting function through ISP, camera 193, video codec, GPU, display screen 194 and application processor.
[0267] ISP is used to process the data fed back by camera 193. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to ISP for processing and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, ISP can be set in camera 193.
[0268] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then passes the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.
[0269] The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the terminal device 100 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.
[0270] Video codecs are used to compress or decompress digital videos. The terminal device 100 may support one or more video codecs. Thus, the terminal device 100 may play or record videos in various coding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
[0271] The internal memory 121 can be used to store computer executable program codes, which include instructions. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the terminal device 100 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 110 executes various functional applications and data processing of the terminal device 100 by running instructions stored in the internal memory 121, and / or instructions stored in a memory provided in the processor.
[0272] An embodiment of the present invention provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the instructions of the present invention. Figure 1 to Figure 7The illustrated embodiment provides an image filtering method.
[0273] The above-mentioned non-transient computer-readable storage medium can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, - but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (read only memory, ROM), erasable programmable read-only memories (erasable programmable read only memory, EPROM) or flash memory, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0274] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. 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. Computer-readable signal media may also be any computer-readable medium other than a computer-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.
[0275] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.
[0276] Computer program code for performing the operations of the present specification may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0277] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0278] In the description of the embodiments of the present invention, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0279] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this specification, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0280] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of this specification includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of this specification belong.
[0281] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0282] It should be noted that the terminals involved in the embodiments of the present application may include but are not limited to personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 players, MP4 players, etc.
[0283] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0284] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0285] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.
[0286] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.
Claims
1. An image filtering method, characterized in that: The method comprises: For each direction of the multiple directions where the pixel point to be filtered is located, calculating the pixel difference value of the pixel point to be filtered relative to the adjacent pixel point in the direction; According to the pixel differences of the pixel points to be filtered in multiple directions, obtaining the target direction corresponding to the maximum pixel difference of the pixel points to be filtered; Controlling the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction, obtaining the pixel values of the sample pixel points around the orthogonal direction of the target direction, and filtering the pixel point to be filtered; For each direction of the multiple directions where the pixel point to be filtered is located, calculating the pixel difference of the pixel point to be filtered relative to the adjacent pixel point in the direction, including: For each direction of the multiple directions where the pixel to be filtered is located, the pixel to be filtered is image-derived to obtain a Hessian matrix including pixel difference values of the pixel to be filtered in the multiple directions; Obtaining a target direction corresponding to a maximum pixel difference of the pixel to be filtered according to the pixel differences of the pixel to be filtered in multiple directions, including: According to the result of eigenvalue decomposition of the Hessian matrix, the target direction corresponding to the maximum pixel difference of the pixel to be filtered is obtained; The method further comprises: Receiving a filter strength parameter input by a user, and determining a stretching parameter of the filter kernel; According to the result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter, configuring a stretching matrix for controlling the shape of the filter kernel; Controlling the filter kernel of the pixel to be filtered to stretch along a direction orthogonal to the target direction includes: The stretching matrix is used to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
2. The method according to claim 1, characterized in that The orthogonal direction of the target direction is the edge line of the image where the pixel to be filtered is located; controlling the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction, obtaining the pixel values of the sample pixel points around the orthogonal direction of the target direction, and filtering the pixel to be filtered, including: The filter kernel of the pixel to be filtered is controlled to stretch along the edge line of the image, the pixel value of the sample pixel on the edge line of the image is obtained, and the pixel to be filtered is filtered.
3. The method according to claim 1, characterized in that The method further comprises: Receiving a filter strength parameter input by a user, and determining a parameter for adjusting the filter kernel size; According to the parameter for adjusting the size of the filter kernel, configuring the scale parameter of the filter kernel; Controlling the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction to obtain pixel values of sample pixel points around the orthogonal direction of the target direction, including: The scale parameter is used to control the maximum diameter of the filter kernel along a direction orthogonal to the target direction, and to control the maximum diameter of the filter kernel along the target direction.
4. The method according to claim 1, characterized in that: The method further comprises: Performing frequency domain information analysis on the image region where the pixel to be filtered is located to obtain the local variance of the image region where the pixel to be filtered is located; Substituting the local variance into a preset stretch parameter curve to obtain a stretch adjustment value of the stretch parameter; Using the stretching matrix, controlling the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction includes: The stretching matrix is adjusted according to the stretching adjustment value to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction.
5. The method according to claim 3, characterized in that: The method further comprises: Performing frequency domain information analysis on the image region where the pixel to be filtered is located to obtain the local variance of the image region where the pixel to be filtered is located; Substituting the local variance into a preset size parameter curve to obtain a size adjustment value of the parameter for adjusting the filter kernel size; Using the scale parameter, controlling the maximum diameter of the filter kernel along a direction orthogonal to the target direction, and controlling the maximum diameter of the filter kernel along the target direction, including: According to the size adjustment value, the scale parameter is adjusted to control the maximum diameter of the filter kernel along the orthogonal direction of the target direction, and to control the maximum diameter of the filter kernel along the target direction.
6. The method according to claim 1, characterized in that The result obtained by performing eigenvalue decomposition on the Hessian matrix includes a maximum eigenvector; and according to the result obtained by performing eigenvalue decomposition on the Hessian matrix, obtaining a target direction corresponding to the maximum pixel difference of the pixel point to be filtered includes: Performing an inverse tangent function calculation on the ratio of the first eigenvalue to the second eigenvalue in the maximum eigenvector to obtain an angle between the target direction and a preset reference direction; Controlling the filter kernel of the pixel to be filtered to stretch along a direction orthogonal to the target direction includes: The filter kernel is controlled to rotate to an angle stretched along a direction orthogonal to the target direction according to the angle between the target direction and the reference direction.
7. The method according to claim 6, characterized in that After obtaining the angle between the target direction and the reference direction, the method further includes: According to the angle between the target direction and the reference direction, configuring a rotation matrix for rotating the filter kernel; Controlling the filter kernel to rotate to an angle stretched along an orthogonal direction of the target direction according to the angle between the target direction and the reference direction, comprising: The rotation matrix is used to control the filter kernel to rotate to an angle stretched along an orthogonal direction of the target direction according to the angle between the target direction and the reference direction.
8. The method according to claim 1, characterized in that: The result of performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; According to the result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter, configuring a stretching matrix for controlling the shape of the filter kernel includes: Substitute the first eigenvalue, the second eigenvalue and the stretching parameter into formula (1) to configure the stretching matrix; (1); in, represents the first eigenvalue, represents the second eigenvalue, and L represents the stretching parameter.
9. The method according to claim 3, characterized in that: The result of performing eigenvalue decomposition on the Hessian matrix includes a first eigenvalue and a second eigenvalue; Configuring the scale parameter of the filter kernel according to the parameter for adjusting the filter kernel size includes: Substitute the first eigenvalue, the second eigenvalue and the parameter for adjusting the size of the filter kernel into formula (2) to configure the scale parameter of the filter kernel; (2); in, represents the first eigenvalue, represents the second eigenvalue, ξ is the regularization parameter, and M represents the parameter used to adjust the filter kernel size.
10. The method according to any one of claims 1 to 9, characterized in that: The method further comprises: Receiving a filter strength parameter input by a user, and determining a domain range for acquiring the sample pixel points; Controlling the filter kernel of the pixel to be filtered to stretch along the orthogonal direction of the target direction, obtaining pixel values of sample pixel points around the orthogonal direction of the target direction, and filtering the pixel to be filtered, including: Controlling the filter kernel of the pixel to be filtered to stretch within the domain along the orthogonal direction of the target direction; The pixel values of the sample pixel points around the orthogonal direction of the target direction are obtained, and the relative position of each sample pixel point located in the filter kernel and the pixel point to be filtered is calculated, and a filtering weight is assigned to each sample pixel point located in the filter kernel, and the pixel point to be filtered is filtered using the pixel value of the sample pixel point assigned with the filtering weight.
11. An image filtering device, characterized in that: The device comprises: A calculation module, for calculating, for each direction of the plurality of directions in which the pixel to be filtered is located, a pixel difference value of the pixel to be filtered relative to an adjacent pixel in that direction; An acquisition module, used for acquiring a target direction corresponding to a maximum pixel difference value of the pixel point to be filtered according to the pixel difference values of the pixel point to be filtered in multiple directions; A control module, used for controlling the filter kernel of the pixel point to be filtered to stretch along the orthogonal direction of the target direction, obtaining the pixel values of the sample pixel points around the orthogonal direction of the target direction, and filtering the pixel point to be filtered; The calculation module comprises: A derivation submodule, used for performing image derivation on the pixel to be filtered in each of the multiple directions where the pixel to be filtered is located, to obtain a Hessian matrix including pixel difference values of the pixel to be filtered in the multiple directions; The acquisition module comprises: A target direction obtaining submodule is used to obtain the target direction corresponding to the maximum pixel difference of the pixel point to be filtered according to the result obtained by performing eigenvalue decomposition on the Hessian matrix; The device also includes: A first receiving module, used for receiving a filter strength parameter input by a user and determining a stretching parameter of the filter kernel; A stretching matrix configuration module, configured to configure a stretching matrix for controlling the shape of the filter kernel according to a result obtained by performing eigenvalue decomposition on the Hessian matrix and the stretching parameter; The control module also includes: The shape control submodule is used to control the ratio of the stretching diameter of the filter kernel in the direction orthogonal to the target direction to the stretching diameter of the filter kernel in the target direction by using the stretching matrix.
12. A terminal device, characterized in that: The terminal device comprises: at least one processor; and at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute the method according to any one of claims 1 to 10 by calling the program instructions.
13. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable a computer to execute the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Non-local means image denoising with an adaptive directional spatial filter
CN107278314A
Image processing method, method, device and equipment for identifying visual angle and storage medium
CN110032964A