Disclosure of Invention
The embodiment of the invention provides an image denoising method, an image denoising device and a computer readable storage medium, and has the technical effect of improving denoising precision.
One aspect of the present invention provides an image denoising method, including: determining a first neighborhood based on a specific position representing noise reduction in the image; determining first data from the signal values of the particular location and respective locations in the first neighborhood, wherein the first data characterizes a weight of a signal difference between the particular location and respective locations in the first neighborhood; determining second data according to the specific position and the distance values of the positions in the first neighborhood, wherein the second data represents the weight of the distance between the specific position and the positions in the first neighborhood; determining a signal value for the particular location based on the first data and the second data.
In an embodiment, the determining the signal value of the specific location based on the first data and the second data comprises: determining a second neighborhood based on the specific position and the first neighborhood; determining a signal value for the particular location based on the first data, second data, and all signal values in the second neighborhood.
In an embodiment, the first data is determined according to the signal values of the specific location and the respective locations in the first neighborhood, and the specific formula is as follows:
wherein
Characterizing the first data, x characterizing the specific location, y characterizing each location within the first neighborhood, T characterizing the time series of the image, T characterizing the number of signal values within the first neighborhood, I characterizing the image itself,
signal values representing the current time of the image at a particular location,
signal values representing respective positions of the image within the first neighbourhood at the current moment,
the mean value characterizing the signal difference between the specific location and all signal values within the first neighbourhood, exp characterizes a logarithmic function.
In an embodiment, the determining the second data is based on the distance values of the specific location and the respective locations in the first neighborhoodThe formula is as follows:
wherein
(ii) characterizing the second data by a characterization,
characterizing a distance value of the particular location from each location in the first neighbourhood,
a mean value of distances between the particular location and all signal values within the first neighborhood is characterized.
In one embodiment, the determining the signal value of the specific location according to the first data, the second data and all signal values in the second neighborhood comprises:
,
wherein, in the step (A),
characterizing the noise-reduced signal value of the particular location, k characterizing a maximum value in the second neighborhood with respect to the particular location, and (i, j) characterizing respective locations of the particular location in the second neighborhood.
In one embodiment, the image is a brain perfusion CT image.
In one embodiment, the signal values are CT values.
In another aspect, the present invention provides an image denoising apparatus, including: the neighborhood module is used for determining a first neighborhood based on a specific position representing the noise reduction in the image; a first weighting module configured to determine first data according to the signal values of the specific location and respective locations in the first neighborhood, wherein the first data characterizes a weighting of a signal difference between the specific location and respective locations in the first neighborhood; a second weighting module, configured to determine second data according to the distance values of the specific location and the respective locations in the first neighborhood, where the second data represents a weight of the distance between the specific location and the respective locations in the first neighborhood; a noise reduction module to determine a signal value for the particular location based on the first data and the second data.
Another aspect of the present invention provides an image denoising apparatus, which includes a memory and a processor, wherein the memory is used for storing instructions, and the instructions are used for executing the image denoising method according to any one of the above methods when executed.
In another aspect, the present invention provides a computer-readable storage medium, which includes a set of computer-executable instructions, when executed, for performing the image denoising method according to any one of the above embodiments.
In the embodiment of the present invention, in the prior art, when noise is reduced by a smooth filtering method, weighted values of positions in a neighborhood are the same, so that when noise is reduced between different tissues (such as a critical point of a brain tissue and a ventricle in fig. 2), noise reduction effect is reduced due to interference of other tissues. Therefore, according to the scheme, the weight of each position in the neighborhood is adjusted, and the signal value of the specific position is determined according to the two dimensions of the signal difference weight and the distance difference weight, so that when noise between different tissues is processed, the influence of other tissues in the neighborhood can be reduced, and the noise reduction precision is improved.
Detailed Description
In order to make the objects, features and advantages of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments obtained by the technicians in this field without creative work are within the protection scope of the invention based on the embodiments in the invention.
As shown in fig. 1, an aspect of the present invention provides an image denoising method, including:
step 101, determining a first neighborhood based on a specific position representing noise reduction in an image;
102, determining first data according to the signal values of the specific position and each position in the first neighborhood, wherein the first data represents the weight of the signal difference between the specific position and each position in the first neighborhood;
103, determining second data according to the specific position and the distance value of each position in the first neighborhood, wherein the second data represents the weight of the specific position and the distance between each position in the first neighborhood;
step 104, determining a signal value of the specific location based on the first data and the second data.
In this embodiment, in step 101, the image may be a two-dimensional/three-dimensional image, a video, an AR image, a flash animation, a CT image, an MRI image, and the like, and is preferably a brain perfusion CT image.
In the image denoising process, the image denoising range may be the entire image frame or a partial image frame, wherein the partial image frame may be framed by a preset image coordinate, taking the image as a cerebral perfusion CT map as an example, and as shown in fig. 2, the partial image frame may be a brain tissue region, a blood vessel region, a ventricle region, a left brain region, or a right brain region.
The specific position is the position of each pixel/voxel point in the whole or part of the image picture and can be determined by traversing each pixel/voxel position in the whole or part of the image picture. Each time a specific position is traversed, based on the current specific position, and a first neighborhood is established with the current specific position as a base point, as shown in fig. 3, a position a in the graph is the specific position, and a range of the first neighborhood may be a rectangular or spherical range set with the specific position as a center, where the size of the rectangular or spherical range may be set according to actual requirements, and the size of the rectangular may specifically be a voxel point range of 3 × 3.
In step 102, after the specific location and the corresponding first neighborhood region are determined, the signal values of the specific location and each pixel/voxel location in the first neighborhood region are traversed, wherein the signal values are pixel values in the normal two-dimensional image, voxel values in the three-dimensional image, CT values in the CT image, and preferably the signal values are CT values.
Weights of the signal differences between the respective locations in the first neighbourhood and the particular location are calculated, i.e. the first data. Referring to fig. 4, fig. 4 shows that, taking the image as a brain perfusion CT image as an example, the color of a specific position a in the image is white, that is, the CT value of the position is higher, it can be seen that in the first neighborhood, the signal difference between the white color position and the specific position is weighted more, and the signal difference between the black color position and the specific position is weighted less.
In step 103, after the specific location and the corresponding first neighbourhood are determined, weights for the distances between the respective locations in the first neighbourhood and the specific location, i.e. the second data, are calculated, wherein the further the respective locations in the first neighbourhood are from the specific location a, the smaller the weights are. Still referring to fig. 4, taking the image as a brain perfusion CT image as an example, it is shown that the upper, lower, left, and right positions of the specific position a are both closer and the same to the specific position a, the distance difference weight is 0.1, and the positions of the four diagonal corners of the specific position a are farther from the specific position a, so the distance difference weight is 0.08.
In step 104, a signal value of the specific location is determined by a preset calculation method based on first data representing weights of signal differences between the specific location and respective locations in the first neighborhood and second data representing weights of distances between the specific location and respective locations in the first neighborhood.
In the prior art, when noise is reduced in a smoothing filtering manner, weighted values of positions in a neighborhood are the same, so that when noise is reduced between different tissues (such as a critical point of a brain tissue and a ventricle in fig. 2), the noise reduction effect is reduced due to interference of other tissues. Therefore, according to the scheme, the weight of each position in the neighborhood is adjusted, and the signal value of the specific position is determined according to the two dimensions of the signal difference weight and the distance difference weight, so that when noise between different tissues is processed, the influence of other tissues in the neighborhood can be reduced, and the noise reduction precision is improved.
In one embodiment, determining a signal value for a particular location based on the first data and the second data comprises:
determining a second neighborhood taking the specific position as a base point based on the specific position and the first neighborhood;
a signal value for the particular location is determined based on the first data, the second data, and all signal values in the second neighborhood.
In this embodiment, referring to fig. 5, a position in the drawing is a specific position, and a range of the second neighborhood region may be a range set by taking the specific position as a center, wherein the range is preferably a rectangular range, and of course, the range may also be a range corresponding to different organizations, and the size of the range may be set according to actual requirements, but is generally smaller than or equal to the size of the first neighborhood region.
By setting the second neighborhood region, in the application process, the weight of each position in the neighborhood region can be selectively adjusted according to the actual situation, for example, the same distance difference weight or signal difference weight of each position in the second neighborhood region can be set, because the signal and distance of each position in the second neighborhood region are generally not different greatly, the scheme can reduce the computation amount, and still can keep a good noise reduction effect.
In one embodiment, the first data is determined according to the signal values of the specific location and each location in the first neighborhood, and the specific formula is as follows:
wherein
Characterizing the first data, x characterizing the specific location, y characterizing each location within the first neighborhood, T characterizing the time series of the image, T characterizing the number of signal values within the first neighborhood, I characterizing the image itself,
signal values representing the current time of the image at a particular location,
signal values representing respective positions of the image within the first neighbourhood at the current moment,
the mean value characterizing the signal difference between the specific location and all signal values within the first neighbourhood, exp characterizes a logarithmic function.
In this embodiment, the formula is a preferable formula for calculating the first data, and specifically, the brain perfusion CT image includes a plurality of phase maps, the formula combines the phase maps of a plurality of time series, calculates a difference between a signal value at a specific position in each phase map and each position in the first neighborhood, calculates a signal mean value of all the phase maps, and determines the first data according to the signal mean value, and the formula considers the signal value of each phase map, so that the finally obtained first data is more accurate.
In an implementation manner, the second data is determined according to the specific location and the distance value of each location in the first neighborhood, and the specific formula is as follows:
wherein
The second data is characterized in that it is,
characterizing a distance value of a particular location from each location in the first neighbourhood,
a mean value of the distances between the particular location and all signal values within the first neighbourhood is characterised.
In this embodiment, the formula is a preferable formula for calculating the second data, and specifically,
or combining a plurality of time-series phase diagrams, calculating the distance difference between a specific position in each phase diagram and each position in the first neighborhood, and further calculating the distance mean value of all the phase diagrams according to each distance value
The second data are then calculated according to the formula which considers the distance values of each phase diagram, so as to finally obtainThe second data is more accurate.
In one embodiment, determining the signal value for the specific location based on the first data, the second data, and all signal values in the second neighborhood comprises:
,
wherein, in the step (A),
characterizing the noise-reduced signal value of a particular location, k characterizing the maximum value in the second neighborhood from the particular location, and (i, j) characterizing the respective locations of the particular location in the second neighborhood.
In this embodiment, the formula is a preferred formula for calculating the value of the specific position signal, and the formula is a formula
) Each location in the second neighbourhood is characterised,
characterizing respective locations in the second neighborhood in the current phase,
a weight characterizing the distance between each location in the second neighbourhood and the particular location,
weights characterizing signal differences between respective locations in the second neighborhood and the particular location. The formula comprehensively considers the second neighborhood, the signal difference weight and the distance difference weight, namely the algorithm takes the signal value of the position with smaller signal difference with the specific position in the neighborhood and the signal value of the position close to the specific position as main calculation parameters, so that when the signal value of a certain tissue is calculated, different tissues (different) are usedThe CT values between tissues are greatly different), and finally, the phenomenon of reducing the interference of other tissues is realized.
Referring to fig. 6, another aspect of the present invention provides an image denoising apparatus, including:
a neighborhood module 201, configured to determine a first neighborhood based on a specific location in the image representing a location to be denoised;
a first weighting module 202, configured to determine first data according to the signal values of the specific location and the respective locations in the first neighborhood, where the first data represents weights of signal differences between the specific location and the respective locations in the first neighborhood;
a second weighting module 203, configured to determine second data according to the distance values of the specific location and the locations in the first neighborhood, where the second data represents a weight of the distance between the specific location and the locations in the first neighborhood;
a noise reduction module 204 for determining a signal value of the specific location based on the first data and the second data.
In the neighborhood module 201, the image may be a two-dimensional/three-dimensional image, a video, an AR image, a flash animation, a CT image, an MRI image, etc., and is preferably a brain perfusion CT image.
In the image denoising process, the image denoising range may be the entire image frame or a partial image frame, wherein the partial image frame may be framed by a preset image coordinate, taking the image as a brain perfusion CT image as an example, the partial image frame may be a brain tissue region, a left brain region or a right brain region.
The specific position is the position of each pixel/voxel point in the whole or part of the image picture and can be determined by traversing each pixel/voxel position in the whole or part of the image picture. Each time a specific position is traversed, based on the current specific position, and a first neighborhood is established with the current specific position as a base point, as shown in fig. 3, a position a in the graph is the specific position, and a range of the first neighborhood may be a rectangular or spherical range set with the specific position as a center, where the size of the rectangular or spherical range may be set according to actual requirements, and the size of the rectangular may specifically be a voxel point range of 3 × 3.
In the first weighting module 202, after determining the specific location and the corresponding first neighborhood region, the signal values of the specific location and each pixel/voxel location in the first neighborhood region are traversed, wherein the signal values are pixel values in the normal two-dimensional image, voxel values in the three-dimensional image, CT values in the CT image, and preferably the signal values are CT values.
Weights of the signal differences between the respective locations in the first neighbourhood and the particular location are calculated, i.e. the first data. Referring to fig. 4, fig. 4 shows that, taking the image as a brain perfusion CT image as an example, the color of a specific position a in the image is white, that is, the CT value of the position is higher, it can be seen that in the first neighborhood, the signal difference between the white color position and the specific position is weighted more, and the signal difference between the black color position and the specific position is weighted less.
In the second weighting module 203, after determining the specific location and the corresponding first neighbourhood, weights of distances between respective locations in the first neighbourhood and the specific location, i.e. the second data, are calculated, wherein the further the respective location in the first neighbourhood is from the specific location a, the smaller the weight is. Still referring to fig. 4, taking the image as a brain perfusion CT image as an example, it is shown that the upper, lower, left, and right positions of the specific position a are both closer and the same to the specific position a, the distance difference weight is 0.1, and the positions of the four diagonal corners of the specific position a are farther from the specific position a, so the distance difference weight is 0.08.
In the noise reduction module 204, a signal value of the specific location is determined by a preset calculation method according to first data representing weights of signal differences between the specific location and respective locations in the first neighborhood and second data representing weights of distances between the specific location and respective locations in the first neighborhood.
In the prior art, when noise is reduced in a smoothing filtering manner, weighted values of positions in a neighborhood are the same, so that when noise is reduced between different tissues (such as a critical point of a brain tissue and a ventricle in fig. 2), the noise reduction effect is reduced due to interference of other tissues. Therefore, according to the scheme, the weight of each position in the neighborhood is adjusted, and the signal value of the specific position is determined according to the two dimensions of the signal difference weight and the distance difference weight, so that when noise between different tissues is processed, the influence of other tissues in the neighborhood can be reduced, and the noise reduction precision is improved.
In another aspect, an image denoising apparatus is provided, which includes a memory and a processor,
the memory is used for storing instructions for controlling the processor to operate so as to implement the image noise reduction method.
In this embodiment, the instructions, when executed, are configured to determine a first neighborhood based on a particular location in the image characterizing the noise reduction; determining first data according to the signal values of the specific position and each position in the first neighborhood, wherein the first data represents the weight of the signal difference between the specific position and each position in the first neighborhood; determining second data according to the specific position and the distance value of each position in the first neighborhood, wherein the second data represents the weight of the distance between the specific position and each position in the first neighborhood; based on the first data and the second data, a signal value for the particular location is determined.
In the prior art, when noise is reduced in a smoothing filtering manner, weighted values of positions in a neighborhood are the same, so that when noise is reduced between different tissues (such as a critical point of a brain tissue and a ventricle in fig. 2), the noise reduction effect is reduced due to interference of other tissues. Therefore, according to the scheme, the weight of each position in the neighborhood is adjusted, and the signal value of the specific position is determined according to the two dimensions of the signal difference weight and the distance difference weight, so that when noise between different tissues is processed, the influence of other tissues in the neighborhood can be reduced, and the noise reduction precision is improved.
In another aspect, the present invention provides a computer-readable storage medium, which includes a set of computer-executable instructions, and when the instructions are executed, the method for reducing noise in an image is performed.
In another aspect, the present invention provides a computer-readable storage medium, which includes a set of computer-executable instructions, when executed, for performing any one of the image denoising methods described above.
In an embodiment of the present invention, a computer-readable storage medium includes a set of computer-executable instructions that, when executed, determine a first neighborhood based on a particular location in an image characterizing a feature to be denoised; determining first data according to the signal values of the specific position and each position in the first neighborhood, wherein the first data represents the weight of the signal difference between the specific position and each position in the first neighborhood; determining second data according to the specific position and the distance value of each position in the first neighborhood, wherein the second data represents the weight of the distance between the specific position and each position in the first neighborhood; based on the first data and the second data, a signal value for the particular location is determined.
In the prior art, when noise is reduced in a smoothing filtering manner, weighted values of positions in a neighborhood are the same, so that when noise is reduced between different tissues (such as a critical point of a brain tissue and a ventricle in fig. 2), the noise reduction effect is reduced due to interference of other tissues. Therefore, according to the scheme, the weight of each position in the neighborhood is adjusted, and the signal value of the specific position is determined according to the two dimensions of the signal difference weight and the distance difference weight, so that when noise between different tissues is processed, the influence of other tissues in the neighborhood can be reduced, and the noise reduction precision is improved.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Moreover, various embodiments or examples and features of various embodiments or examples described in this specification can be combined and brought together by those skilled in the art without contradiction.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present invention, "a plurality" means two or more unless specifically defined otherwise.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all such changes or substitutions are included in the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.