The noise reduction process method of ultrasonic medical image
Technical field
The present invention relates to technical field of medical image processing, especially relate to one kind and threshold value is spread to ash by automatic detection
The noise reduction process method that rank ultrasonoscopy is carried out.
Background technology
It is usually present substantial amounts of speckle noise in medical science grayscale ultrasound image (B-mode), can bring to ultrasonograph quality
Significantly decline, and mask the pathological changes of some vital tissues, this gives the diagnosis of doctor and identifies that some specific diseases are brought
Larger difficulty, and have a risk failed to pinpoint a disease in diagnosis with mistaken diagnosis.
Generally to suppress the HFS of signal using the method for filtering, also can be by useful side while filtering off noise
Edge information removes, and such as neighborhood averaging, median filtering method all can be excessively flat by the edge and details that have clinical meaning in image
Sliding;Thus, some are rapidly developed based on the filtering algorithm that edge retains, such as anisotropic filtering (anisotropic
Diffusion), the Medical Image Denoising technology such as BM3D and nonlocal means.This is carried in medical image post-processing stages
High medical image quality provides a huge space.
Anisotropic filter is to be grown up based on the diffusion equation in physicss.Perona and Malik is in 1990
It is introduced into and retains (edge-preserving) smoothing filter as a kind of border in the middle of image procossing, its achievement is delivered
In IEEE Transactions on Pattern Analysis and Machine Intelligence, the name in vol.12
In article for " Scale space and edge detection using anisotropic diffusion ".They
Diffusion equation is as follows
It=div (g (I) I).
Wherein I representative image, ItFor the partial derivative to the time t that evolves for the original image, g () is 0 related to gradient
To 1 scalar, referred to as diffusion coefficient, div () represents divergence operator (divergence operator).
The evolution time, t can also regard the yardstick in metric space as, and that is, t is bigger, and image is more smooth.
According to explicit discretisation scheme, image I can be expressed as in the time t that evolves
It=It-1+ δ div (g (I) I),
Wherein δ is evolution time step, and in explicit aspect, it takes a positive number that can not be more than 0.25 to ensure numerical value
Stability.When using implicit expression or half implicit expression discrete solution, δ can be not limited and take larger value.Implicit expression and half implicit expression from
Scattered scheme refers to relevant documentation.
Perona and Malik proposes following two models for diffusion coefficient.
Wherein K is the threshold value of gradient modulus value.According to above-mentioned two Diffusion Coefficient Model, gradient modulus value | | I | | and diffusion
Inversely, and when | | I | | is much larger than K, g's coefficient g becomes for 0;On the contrary, when | | I | | is during very little, g becomes for 1.Cause
This, is in the big image-region of gradient modulus value, that is, the region that boundary information is strong, diffusion stopping;In the little region of gradient modulus value,
Generally interior of articles or background, diffusion increases.It is achieved thereby that while retaining boundary information, other regions of image obtain
To smooth effect.
Should see because diffusion coefficient g be a scalar so that flow (flux) is parallel with gradient direction, institute
With Perona-Malik model from strict physical significance for be a kind of nonlinear isotropic (non-linear
Inhomogeneous isotropic) diffusion model.The visible Weickert of specific explanations is 1998 by B.G.Teubner
Chapter 1 in " Anisotropic Diffusion in Image Processing " book that Stuttgart publishes.For side
Just, for the sake of, still Perona-Malik model is called anisotropy in the present invention.
Based on Perona-Malik model, follow-up derive much different smoothing filters, relatively more famous have Yu and
Acton is in IEEE Transactions on Image the Processing, " Speckle that vol.11, no.11 deliver
reducing anisotropic diffusion".Yu and Acton employs one kind and is called instantaneous
Coefficient of variation (ICOV) is substituting Grad as rim detection index, and divides in advance using in image
The one piece of noise Area generation diffusion threshold value cut out.
In the practical application of anisotropic filtering, since it is desired that multiple diffusion is to reach target effect, speed becomes resistance
Hinder big restraining factors of its application.Acton in 1998 in IEEE Transactions on Image Processing,
Deliver the article of entitled " Multigrid anisotropic diffusion " in vol.7, no.3, disclosed and be based on
Multiple dimensioned anisotropic filtering device accelerates and removes to reach to lose the purpose of the pseudomorphism causing because of low frequency signal.
In order to realize anisotropic filtering truly, Weickert is in 1999 in International
Journal of Computer Vision, has delivered an entitled " Coherence-enhancing in vol.31, no.2
The article of diffusion filtering ".In the text, Weickert employs diffusion tensor (diffusion tensor), and one
Individual 2x2 matrix D, replaces diffusion coefficient g.Diffusion equation therefore can be write as:
It=div (D I).
Using diffusion tensor so that diffusion can carry out being not limited solely to gradient direction along any direction θ.Along any θ
The diffusion in direction can be analyzed to spread along gradient direction with tangentially doing respectively.Diffusion tensor D can be analyzed to
Wherein v1=I/ | | I | | is the normal direction of current point,For the tangential direction of current point,
WhereinWithIt is respectively v1Component in x-axis with y-axis, g1And g2It is respectively the diffusion along normal direction and tangential direction
Coefficient, is defined as follows.
g1=α
Wherein κ is consistency detection (coherence measure), and α is a very little on the occasion of Weickert suggestion takes
0.001, T is a threshold value more than 0.
Consistency detection κ is one from structure tensor (structure tensor), J, the nonnegative number of derivation.Structure tensor
J is defined as:
IxAnd IyIt is respectively the Grad in x and y direction, KρIt is the Gaussian filter of ρ for a variance.Consistency detection κ is fixed
Justice is:
κ=(μ1-μ2)2,
Wherein, μ1And μ2It is respectively the minimum and maximum eigenvalue of J.
In the directional anisotropic model of Weickert, because α is the value of a very little, diffusion in the normal direction
It is considered that being suppressed always, diffusion strength in tangential direction to be determined by consistency detection κ.When κ → 0, ladder
Degree is close value in normal direction and tangential direction, and diffusion in tangential direction is also suppressed.As κ > > T, now ladder
The component in a direction for the degree is much larger than the component in another direction, that is, is most likely to be the place on border, tangential direction
On diffusion coefficient by proximity values 1 with reach strengthen border effect.
Anisotropic filtering is that the speckle noise reducing in ultrasonic B-mode image provides a solution framework, but directly
Apply mechanically and can bring the problem that false structure occurs in such as excessively smooth and image, this is primarily due to the bad threshold grasped in diffusion
Caused by value, such as threshold value T in threshold k and Weickert model in Perona-Malik model.
Content of the invention
The present invention, according to the imaging characteristicses of ultrasound grayscale image, with anisotropic filtering as framework, proposes a kind of being based on certainly
Dynamic detection diffusion threshold value realizes the noise reduction process method of grayscale ultrasound image, during solving current medical ultrasonic image noise reduction process
Produce smooth or the technical problem that false structure etc. leads to medical ultrasonic image Quality Down occurs.
The present invention adopts the following technical scheme that realization:A kind of noise reduction process method of ultrasonic medical image, it includes step:
Obtain the grayscale ultrasound image I of a width ultrasonic medical image;
Calculate the edge strength image E of grayscale ultrasound image I;
Calculate the mask image P of the smooth tissue structural region in grayscale ultrasound image I;
Calculate grayscale ultrasound image I along ultrasonic probe scan line depth direction edge strength threshold curve Kcurve;
Any i-th row image E to edge intensity image Ei, from edge strength threshold curve KcurveThe corresponding side of middle extraction
Edge intensity thresholdAnd obtain diffusion coefficient, wherein edge strength threshold value using diffusion coefficient function gStrong for edge
Degree threshold curve KcurveIn i-th element;
According to the diffusion coefficient generating, image is filtered process using diffusion equation, wherein diffusion equation is:It=
It-1+ δ div (g I), ItEvolve to the image of time t for grayscale ultrasound image I, δ is evolution time step, div ()
For divergence operator, I is the gradient of grayscale ultrasound image I.
Wherein, the step of described calculating mask image P includes:
Calculate the gradient modulus value image G of input grayscale ultrasound image I;
Gradient modulus value image G is done with binary conversion treatment, obtains a width structure mask image S;
Grayscale ultrasound image I is done with binary conversion treatment, obtains a width background mask image B;
Structure mask image S and background mask image B is carried out with NOR operation, obtains covering of smooth tissue structural region
Code image P.
Wherein, the step of described calculating mask image P includes:
Calculate the gradient modulus value image G of input grayscale ultrasound image I;
Gradient modulus value image G is done with binary conversion treatment, obtains a width structure mask image S;
Structure mask image S is divided into the N number of not overlapping subregion of M, calculates to every in structure mask image S
One sub-regions RSm,nIn pixel value add up andIf,Value tissue default more than noise threshold TS, then
Think current sub-region RSm,nFor structure body region, this subregion RS is setm,nMiddle all pixels value is 1, otherwise arranges this sub-district
Domain RSm,nMiddle all pixels value is 0;
Grayscale ultrasound image I is done with binary conversion treatment, obtains a width background mask image B;
Grayscale ultrasound image I and background mask image B is respectively divided into the N number of not overlapping subregion of M;
To each of grayscale ultrasound image I subregion RIm,n, calculate pixel averageIfIt is more than
One default background noise threshold value TB, then corresponding subregion RB in setting background mask figure Bm,nIn all pixels value be
1;
Structure mask image S and background mask image B is carried out with NOR operation, obtains covering of smooth tissue structural region
Code image P.
Wherein, the gradient modulus value image of grayscale ultrasound image IWherein GxAnd GyFor grayscale ultrasound image I
With horizontal Sobel Operator gx, longitudinal Sobel Operator gyConvolution.
Wherein, to grayscale ultrasound image I and horizontal Sobel Operator gx, longitudinal Sobel Operator gyBefore convolution algorithm,
Using a low pass filter, grayscale ultrasound image I is smoothed.
Wherein, described edge strength imageWherein GxAnd GyBe respectively grayscale ultrasound image I with laterally
Sobel Operator gxWith longitudinal Sobel Operator gyConvolution.
Wherein, described edge strength figure E can be calculated by equation below and obtain:
The gradient modulus value for grayscale ultrasound image I for wherein | the I |,2I is pixel I in grayscale ultrasound image Ii,jIn coordinate
Second dervative on (i, j).
Wherein, described calculating edge strength threshold curve KcurveStep include:
By the i-th row image E any on edge strength image EiIn belong to pixel E of smooth tissue structural regioni,jAccordingly
Edge intensity value computing is put in effective edge strength list El;
Using in efficient frontier intensity list El, the intermediate value of each element or meansigma methodss are as image EiCorresponding edge strength
Threshold valueAnd it is stored in edge strength threshold curve KcurveIn i-th element;
To KcurveIn non-NULL element carry out first-order linear matching, and fitting result is stored in edge strength threshold curve
KcurveIn.
Wherein, any i-th row image E on edge strength image EiDiffusion coefficient function be gi, giFor an edge strength
The monotonic decreasing function of E, maximum is 1, and minima is 0;As image EiArbitrary j-th pixel E in rowi,jValue be much larger than side
Edge intensity thresholdWhen, giTend to 0;As image EiArbitrary j-th pixel E in rowi,jValue be much smaller than edge strength threshold valueWhen, giTend to 1.
Wherein, any i-th row image E on edge strength image EiDiffusion coefficient function be giFor:
Or be:
Wherein e is natural Exponents.
Compared with prior art, the present invention has the advantages that:
The present invention uses the smooth tissue structural region in grayscale ultrasound image, that is, neither the area of background again non-organization edge
Domain, automatically generates a diffusion threshold curve contour with grayscale ultrasound image (each of diffusion threshold curve element generation
The table diffusion threshold value of its corresponding image line) so that image can use along scanning probe depth direction different
Diffusion threshold value, reaches the effect of optimization suppression speckle noise, and the fall of the top and the bottom of grayscale ultrasound image after process
The consistent feature of effect of making an uproar.
Brief description
Fig. 1 is the schematic flow sheet that the present invention realizes grayscale ultrasound image noise-reduction method.
Specific embodiment
The present invention, according to the imaging characteristicses of ultrasound grayscale image, with anisotropic filtering as framework, proposes a kind of being based on and sweeps
Retouch the dynamic diffusion threshold value of depth to realize grayscale ultrasound image noise-reduction method.
As shown in figure 1, in a preferred embodiment of the invention, the noise reduction process method realizing grayscale ultrasound image includes
Step:
Step S101, obtain the grayscale ultrasound image of a width ultrasonic medical image from image acquisition equipment or image memory
I.If obtaining goes ultrasonic medical image not to be gray scale image, first GTG is needed to be processed as grayscale ultrasound image.
Step S102, the edge strength image E of calculating grayscale ultrasound image I.Any point coordinate on grayscale ultrasound image I
The edge strength E of (i, j)i,jRepresent the probability that this point is located at object edge, numerical value is bigger represent that point (i, j) more has can
The edge of object can be located at.
In an implementation, similar to Perona-Malik model, gradient modulus value is used as rim detection index.
From gradient operator be Sobel (Sobel) operator.Laterally Sobel Operator gxWith longitudinal Sobel Operator gyCan represent respectively
For
Edge strength imageWherein GxAnd GyIt is respectively grayscale ultrasound image I and horizontal Sobel Operator
gxWith longitudinal Sobel Operator gyConvolution.In a method for optimizing, to grayscale ultrasound image I and horizontal Sobel Operator
gxWith longitudinal Sobel Operator gyBefore doing convolution, using a low pass filter grayscale ultrasound image I is smoothed with
Strengthen the precision of gradient calculation.
In another method for optimizing, ICOV value is used as rim detection index, that is,
Wherein | I | is gradient modulus value,2Ii,j=Ii+1,j+Ii-1,j+Ii,j+1+Ii,j-1-4Ii,jFor pixel Ii,jIn coordinate
Second dervative on (i, j).Gradient modulus value | I | can be obtained by foregoing Sobel Operator.
Step S103, the mask image P of the smooth tissue structural region calculating in grayscale ultrasound image I.Smooth tissue is tied
Neither the region at background also non-object (detection position of such as human body) edge in structure Regional Representative image.Calculate smooth tissue
Configuration mask figure specifically comprises the steps of A1~A4.
Step A1, using gradient operator calculate input grayscale ultrasound image I gradient modulus value image G.In this optimal way
Middle selection Sobel Operator.
The gradient modulus value image of grayscale ultrasound image IWherein GxAnd GyFor grayscale ultrasound image I and horizontal stroke
To Sobel Operator gx, longitudinal Sobel Operator gyConvolution.
In another method for optimizing, to grayscale ultrasound image I and horizontal Sobel Operator gx, longitudinal Sobel Operator
gyBefore convolution algorithm, using a low pass filter, grayscale ultrasound image I is smoothed strengthening gradient calculation
Precision.
Step A2, gradient modulus value image G is done with binary conversion treatment, obtain a width structure mask image S.
Wherein Si,jAnd Gi,jIt is respectively the structure mask image S and gradient modulus value image G value on coordinate (i, j), TG
For Grads threshold.Grads threshold TGCan be set by hand according to characteristics of image, the statistical information also dependent on present image calculates life
Become.Automatically obtained using Da-Jin algorithm (maximum variance between clusters, OTSU) algorithm in the present embodiment.
In structure mask image S, it is worth all point coordinates for 1 and constitutes structure body region, remaining Regional Representative
Background area and organ-tissue region.
In order to reduce the noise in structure mask image S, morphology closed operator (morphological can be adopted
Close) post processing is carried out to reduce noise to mask image S.
Step A3, grayscale ultrasound image I is done with binary conversion treatment, obtain a width background mask image B.
Wherein Bi,jAnd Ii,jIt is respectively value on coordinate (i, j) for the background mask image B and grayscale ultrasound image I, TBFor
Background noise threshold value.According to the characteristic of grayscale ultrasound image, background noise threshold value T in present implementationBPreset for a craft
Value.With structure mask image S process similar, background mask image B also can using morphology closed operator carry out post processing with
Reduce noise.
Step A4, structure mask image S and background mask image B is carried out or non-(NOR) operation, final obtain smooth
The mask image P (being also called smooth tissue configuration mask image P) in organizational structure region.
Wherein Pi,jFor value on coordinate (i, j) for the smooth tissue configuration mask image P.Similar, smooth tissue structure is covered
Code image P also can carry out post processing using morphology closed operator and reduce noise.
Wherein, the quality in order to reduce operand and improve structure mask image S, is preferable to carry out method at another
In, grayscale ultrasound image I piecemeal is processed, specifically includes step B1~B8.Wherein step B1 and B2 and algorithm steps described above
Rapid A1 with A2 is identical, and specific descriptions are not repeated.
B1, using gradient operator calculate grayscale ultrasound image I gradient modulus value image G.
B2, gradient modulus value image G is done with binary conversion treatment, obtain a width structure mask image S.
B3, by structure mask image S, vertically decile divides M not overlapping region, along graduation such as parallel directions
It is divided into N number of not overlapping region, therefore structure mask image S is divided into the N number of not overlapping subregion of M.
B4, to each of structure mask image S subregion RSm,n, m and n represents in vertical direction and level respectively
Direction sub-zones call number, calculates RSm,nIn pixel value add up and VRSm,n, that is, count RSm,nIn how many pixel generation
Table structure.IfValue tissue default more than noise threshold TSThen it is assumed that current sub-region RSm,nFor structure
Body region, and set RSm,nMiddle all pixels value is 1, otherwise sets RSm,nMiddle all pixels value is 0.
B5, generation one width background mask image B.If the size of background mask image B is identical with grayscale ultrasound image I and sets
All pixels value is 0.
B6 is similar with above-mentioned steps B3, by grayscale ultrasound image I and background mask image B respectively vertically and water
Square to wait point divide the N number of not overlapping region of M.
B7, to each of grayscale ultrasound image I subregion RIm,n, calculate pixel averageIfGreatly
In default background noise threshold value TBIf, the subregion RB of background mask figure Bm,nIn all pixels value be 1.
B8, structure mask image S and background mask image B is carried out or non-(NOR) operation, finally obtain smooth tissue
Configuration mask image P.
Wherein Pi,jFor value on coordinate (i, j) for the smooth tissue configuration mask image P.
Step S104, calculating are along ultrasonic probe scan line depth direction (i.e. image vertical direction) grayscale ultrasound image I's
Edge strength threshold curve Kcurve(or diffusion threshold curve).Threshold curve KcurveIn i-th elementRepresent arbitrarily
I-th row image EiDiffusion threshold value (or edge strength threshold value).
Calculation procedure is as follows:If a height of H of grayscale ultrasound image I, a width of W;If i is the line index in image vertical direction
Number, j is the column index number on image level direction;IfFor edge strength threshold curve KcurveThe edge of correspondence image i row
Intensity threshold,
Step C1, take any i-th row image E on edge strength image Ei, calculate the corresponding edge strength threshold of image i row
ValueOne efficient frontier intensity list El of setting, if list is sky;To image EiUpper any one pixel Ei,jIf, phase
Value P on coordinate (i, j) for the smooth tissue configuration mask image P answeringi,jEqual to 1, by Ei,jPut into effective edge strength list
In El;The number of element in calculations list El, if less than default threshold value TEl, then setIt is worth for sky, otherwise setIntermediate value is the intermediate value of element in list El.
Step C2, to edge intensity threshold curve KcurveIn non-NULL element carry out first-order linear matching, and matching is tied
Fruit is stored in KcurveIn.I.e. KcurveIn any one elementEdge strength threshold value corresponding to image i row.
In another method for optimizing, edge strength threshold curveValue be list El in each element meansigma methodss.
Step S105, any i-th row image E to edge intensity image Ei, from edge strength threshold curve KcurveIn carry
Take corresponding edge strength threshold valueAnd apply mechanically diffusion coefficient function g and obtain diffusion coefficient.
In a method for optimizing, corresponding diffusion coefficient function g of image i rowiFor
E is natural Exponents.
In another method for optimizing, any row image E on edge strength image EiCorresponding diffusion coefficient function gi
For
In another method for optimizing, any row image E on edge strength image EiCorresponding diffusion coefficient function gi
For
In another method for optimizing, any row image E on edge strength image EiCorresponding diffusion coefficient function gi
For
It can thus be seen that working as image EiJ-th pixel Ei,jValue be much larger than edge strength threshold valueWhen, diffusion system
Number giWill be close to 0, thus diffusion is suppressed;As image EiJ-th pixel Ei,jValue be much smaller than edge strength threshold value
When, diffusion coefficient giWill be close to 1, thus diffusion is allowed.
If it is desirable, in the evolutionary process of image, can be with repeat step S102~step S105 to obtain renewal
Diffusion coefficient.
Step S106, the diffusion coefficient according to generation, are diffused to grayscale ultrasound image I processing according to diffusion equation,
Obtain and export finally filtered image It.
Wherein, diffusion equation is:
It=It-1+δ·div(g·▽I).
ItEvolve to the image of time t for grayscale ultrasound image I, δ is evolution time step, div () is divergence operator,
I is the gradient of grayscale ultrasound image I, and the length of grayscale ultrasound image I evolution time is determined by practical application.
To sum up, the image-forming principle according to grayscale ultrasound image, speckle noise feature is in grayscale ultrasound image along probe
Scan depths direction and change.The present invention according to this feature, using the smooth tissue structural region in grayscale ultrasound image, that is,
Neither background and the region of non-organization edge, automatically generate (the diffusion of a diffusion threshold curve contour with grayscale ultrasound image
Each of threshold curve element represents the diffusion threshold value of its corresponding image line) so that image is swept along probe
Retouch depth direction and can reach, using different diffusion threshold values, the effect that optimization suppresses speckle noise.It was verified that through this
The noise reduction of the top and the bottom of grayscale ultrasound image after invention process is consistent.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all essences in the present invention
Any modification, equivalent and improvement made within god and principle etc., should be included within the scope of the present invention.