Professional Documents
Culture Documents
Major 2 Report
Major 2 Report
A Project Report
On
(MAY, 2019)
Annexure B
CERTIFICATE
It is certified that the work contained in the project report titled “Edge Probability and Pixel
Relativity-Based Speckle Reducing Anisotropic Diffusion,” by “Himani Tyagi and Yash Jain,”
has been carried out under my supervision.
Signature of Supervisor
Mrs. Bhawna Gupta
Electronics and Communication
JIIT NOIDA
May, 2019
Annexure C
DECLARATION
We declare that this submission of report presents our ideas in our own words and others ideas or
words have been included and original sources have been adequately cited and referenced. We
also declare that all principles of integrity and honesty and have not misrepresented or fabricated
or falsified any idea/data/fact/source in our submission. We also understand that any kind
violation of the above mentioned sources will be a cause for disciplinary action by the Institute
and can also evoke penal action from the sources which have thus not been properly cited or
from whom proper permission has not been taken when needed.
________________________________
Himani Tyagi (15102116)
_________________________________
Yash Jain (15102143)
Date: __________
ABSTRACT
This project focuses on anisotropic diffusion filters. These filters are widely preferred for
reducing speckle noise in ultrasound images. These filters helps in controlling the diffusion flux
flow which uses local image statistics, thus, providing the speckle reduction that we need.
However, inefficiently using the edge characteristics results in either over-smoothening of
images or an image having fake edges or boundaries. As a result of this inefficient use, the
diagnostic property of images becomes a major issue. To eliminate such problems, a modified
approach to anisotropic diffusion filter is used.
In this, a probability density function of the edges and information of pixel relativity is used for
controlling the diffusion flux flow of the images. The over-smoothening effects is removed by
using pixel relativity information and false edges are removed by probability density function.
Hence, the filter is ideal for reducing the unwanted speckle noise in ultrasound images and helps
in improving the quality of ultrasound images.
ACKNOWLEDGEMENTS
We would like to express our special thanks of gratitude to our supervisor Mrs. Bhawna Gupta
for providing her valuable guidance, time, comments and suggestions throughout the course of
this project.
We would also like to spread our sincere thanks to all the individuals for providing their kind
support and keeping us motivated all the way.
Without all these people it would have not been possible to complete the project. Although any
errors are our own and should not tarnish the reputations of these esteemed persons.
________________________________
Himani Tyagi (15102116)
_________________________________
Yash Jain (15102143)
Date: __________
TABLE OF CONTENTS
References 31-33
LIST OF FIGURES
2.1 MATLAB 4
INTRODUCTION
Speckle noise is the noise that produced due to the effect of surrounding constraints on the
image sensor during image capture. Speckle noise is mostly found in case of medical images
(ultrasound images), Radar images and SAR images.
Speckle noise negatively affects the properties and quality of the images. In major portions,
speckle noise is treated as an un-required noise. The primary reason behind this conclusion is
that the calculation of speckle affected images requires a hard work of expertise and experience.
Furthermore, speckle noise is gradually produced from un-required echoes of ultrasound waves.
However, these echoes are generated from the randomly situated scatters, the speckle noise may
be considered as a random process.[1]
The concern is always about the diagnostic quality of the filtered outputs. For example, in
ultrasound images of liver, speckle noise over the parenchyma region gives us information about
the acidity of the liver. This helps in the treatment of certain diseases like fatty liver. Therefore,
speckle noise should be removed entirely from parenchyma region because it can result in an
incorrect diagnosis.
2
Another example, in ultrasound images of heart, speckle noise present on the blood chambers
prevents or reduces the visibility of septum wall boundaries and ventricle valves. Therefore,
speckle noise should be removed for better treatment but may not be removed entirely.
Hence, to reduce the speckle noise entirely from the entire image, which is the case with most of
the existing filters, is not chosen because of incorrect analysis during diagnosis of various
diseases. Thus, speckle noise must be preserved over the sensitive regions and at the same time,
it should be selectively removed from the regions, which are less likely to affect the diagnosis to
improve the image as well as diagnosis quality.
However a problem exists with the tradition or existing filters. Most of the existing filters cannot
perform selective filtering. The traditional filters are adaptive filters and they are unable to
perform filtering near the boundaries to protect object edges.
3
Chapter 2
BACKGROUND SURVEY
Speckle noise has negative impacts which can be seen in ultrasound images that leads to some
noise. The image of a regular object that has multiple scattering sources which are present inside
a cell resolution will varies the values of pixels accordingly with pixel position because of
constructive and destructive interference. Ultrasound images are compromised due to speckle
noise in the image. Mathematically, it is a multiplicative noise in nature having granular pattern.
Also, speckle noise can be expressed as in equation d(a,b)= J(a,b) * s(a,b) where J is the original
image, s(a,b) is the speckled noise and d(a,b) is the speckled image.
So for speckle reduction many filtering techniques exist which utilizes their own mathematical
model and possess certain limitations which in turn leads to others filters with more
advancement.
Filtering is a process that is widely used in manipulating or to enhance an image. For example,
filtering of an image can be done to enhance certain features or removing other features. Image
processing operations or processes can be implemented using filtering. These processes are
smoothing, sharpening, and edge enhancement etc. It is a neighborhood process, in which the
value of any given pixel in the entire image is calculated by using some algorithm to the values
of the neighboring pixels of the corresponding input image pixels. A pixel's neighborhood are set
of pixels, found by their locations exactly next to that pixel.
4
Fig 2.1 MATLAB
The codes are implemented using MATLAB as the software and providing any ultrasound or
fetal image which is already speckled. But after obtaining de-speckled image it cannot be
compared as no real time de-noised images of them exist as analyzing these images is a
subjective task rather than a practical approach.
5
Chapter 3
DIFFUSION TECHNIQUES
Diffusion filters are those filters which are used for removing noise from an image either by
transforming the image or by solving a partial differential equation (PDE). Furthermore,
depending on the image edges and their direction, a smoothing process is carried out.
Anisotropic diffusion is a very efficient and reliable technique which is non-linear in nature and
at the same time performs feature enhancement and noise reduction.
Isotropic means the same in all directions. So the diffusion behaves the same regardless of which
direction it is diffusing in. Heat and Gaussian blur for example diffuses in an isotropic manner.
Anisotropic means different in different directions. So the diffusion behaves different with
respect to which direction it is diffusing in.
It is a method that is used for reducing noise from an image without even having an effect on
important parts of the image, like edges, lines or other details that are needed for the processing
or interpretation of the image. In Anisotropic diffusion, the resulting image is a mixed source
between the original image and a filter. This filter entirely depends on the local content of the
original image which in return results in anisotropic diffusion.[2]
6
Chapter 4
4.1 SRAD
The filter abbreviates to Speckle Reducing Anisotropic Diffusion and the idea of local statistics
based filtering has been incorporated in anisotropic diffusion.
Local statistics based filtering are various techniques which involves contrast enhancement and
noise filtering on two-dimensional image arrays which are developed based on their mean and
variance. These algorithms do not require the use of any kind of transform and are non-recursive.
These have the same characteristics in each pixel and is processed independently.
Speckle Reducing Anisotropic Diffusion (SRAD) filter uses a function of the gradient and
magnitude operators also called as instantaneous coefficient of variation. Existing speckle
removal filter and the traditional anisotropic diffusion methods in terms of mean preservation,
reduction in variance and edge localization are left behind by the Speckle Reducing Anisotropic
Diffusion filter in the presence of speckle noise.[3]
Intensity of a image given Io(a,b) which has finite power and there is no zero value over the
image, the output image I(a,b,t) is developed according to the following PDE:
(4.1)
7
(4.2)
( )
(4.3)
(4.4)
(4.5)
√
4.2 DPAD
It is a better filter than SRAD known as Detail Preserving Anisotropic Diffusion (DPAD).
Mostly, all the anisotropic diffusion filters detects the edges around the images and tries to avoid
filtering across these edges so as to preserve the object boundaries. These diffusion coefficients
attains low values (nearly zero), near the edges and high values in the similar regions. As a result
these similar in characteristics regions are filtered and the edges of the image are saved.[4]
The working principle of detail preserved anisotropic diffusion filter (DPAD) is the algorithm of
anisotropic diffusion. Equations of DPAD are developed with same approach like SRAD but
only difference is that they re combined with kun filter which is:
(4.6)
8
Where, is the diffusion estimation and is the estimation noise.
4.3 OSRAD
Further improvements are conducted on SRAD and DPAD, and resulted in filter. The new filter
is named as Oriented Speckle Reducing Anisotropic Diffusion (OSRAD).
An important use of curvature of local image makes OSRAD different than others. This image
curvature runs and is based on component that is non-scalar in nature which improves the
efficiency of speckle noise.[5]
4.4 ADMSS
SRAD, DPAD and OSRAD remove speckle from the entire image, which results in piece-wise
smooth images or over-smooth images. A solution to this over-smoothing problem is removed by
this filter which is known as Anisotropic Diffusion With Memory Based On Speckle Statistics
(ADMSS).
Anisotropic diffusion filter with memory based on speckles statistic (ADMSS) filter is an
anisotropic diffusion filter with a probabilistic-driven memory mechanism to overcome the over-
filtering problem by following a tissue selective philosophy. In particular, the formulate of the
memory mechanism as a delay differential equation for the diffusion tensor whom the behavior
is depend on the statistic of the tissues, by accelerating the diffusion process in the region that
meaningless and including the memory effect in the region where relevant details should be
preserved.[6]
Some other filters or approaches involving anisotropic diffusion are two-stage filtering
approaches, in which 1st stage performs the anisotropic diffusion and the 2nd stage includes a
transformation or a different type of filtering technique. The type of anisotropic diffusion filter
being used determines the efficiency of the two-stage approach.
9
4.5 RTAD
It is a two-stage filtering approach. In this approach the input image is filtered using a Rayleigh
statistics based alpha-trimmed mean filter in the first stage and the image is again filtered using
anisotropic diffusion technique in the second stage. In most of the two-stage filtering approaches,
the stage which does not perform anisotropic diffusion contributes more than the stage which
performs anisotropic diffusion. Hence, the disadvantages of RTAD is that it underperforms
anisotropic diffusion technique being used.[7]
4.6 OBNLM
It is a speckle reducing NLM (Non Local Means) filter known as Optimized Bayesian NLM or
OBNLM filter.
It makes use of Pearson’s Distance to measure what is similar between the image patches.
Weighted averages of local and non-local patches is used to obtain the filtered output. These
weights are recognized using similarities between the patches.[8]
Pearson’s Distance or correlation coefficient is the covariance of the two variables which are in
turn divided by the product of their standard deviations.
(4.7)
10
Chapter 5
SUPERPIXELS CONCEPT
Superpixel are a set of image pixels which are stitched together and have same properties and
characteristics. It is based partly on technique of image segmentation. Superpixels are really
helpful for image segmentation. For Example- Instead of looking over the amount of green, red
and blue (RGB) in each pixel, we can look at eye-balls, ears, wheels and various little things that
are typically labeled. Some important properties of superpixels are as follows :-
Homogeneity : Pixels in the same superpixel should display same or similar visual
pleasing features. These superpixels should be similar in sense of properties, especially in
color and texture.
Adhesion : The boundary of superpixels should be strongly stick to the object boundary
in an image. In other words, the set of objects’ boundary is a proper subset of the set of
superpixels’ boundary.
Regularity :The arrangement should be regular, size is similar, and similar shape are
necessary traits, which provides more convenience for consecutive analysis. In most
cases, regularity is always ignored and left out.
Complexity : Complexity of an algorithm has two parts, which includes time complexity
and space complexity. As an image preprocessing technique which is widely performed,
only linear time complexity and linear space complexity are required.
11
5.1 SUPERPIXELS ALGORITHM CATEGORIES
1 GRAPH-BASED ALGORITHMS
NC05
GSO4
SL08
GCa10
GCb10
12
Various gradient-ascent based algorithms are available such :
MS02
QS08
TP09
WS91
The boundary adherence of NC05 is relatively poor and it is the slowest among the
existing methods.
2) GSO4
13
3) SL08
This method is to generate superpixels that stays to a grid by producing optimal paths,
or seams.These paths splits the image into smaller vertical and horizontal regions. A
graph cuts method similar to Seam Carving is used for finding optimal paths in the
image.[11]
5) MS02
14
In mean shift, a step-by-step mode-based procedure for finding local maxima of a
density function and this function is applied to find modes in the color or intensity
feature source of an image. Pixels converges to the same mode and these pixels that
converges defines the superpixels.[12]
MS02 has a complexity of O(NlogN), where N is the number of pixels.
It is an older approach, which produces irregular shaped superpixels which are non-
uniform in size. It is relatively slow and does not offer direct control over the amount,
size, or compactness of superpixels.
1. Here, the search space is limited to a region proportional to the superpixel size which
reduces the number of distance calculations. This also reduces the complexity to be
linear or equal to number of pixels (X) and free of the number of superpixels (K).
2. A weighted distance measure provides the control over the size and compactness
of the superpixels. This weighted distance measure also combines color and
spatial proximity.
ALGORITHM :
T
Cluster centers Ck = [ lk,ak,bk,xk,yk ] is initialized by sampling pixels at regular grid steps Q.
Move these cluster centers to the lowest gradient position in a 3X3 neighborhood.
15
Set label l(j) = 1 for each pixel j.
Repeat.
/* Assignment */
set d(j) = P
set l(j) = k
end if
end for
end for
16
5.4 ADVANTAGES OF USING SLIC SUPERPIXELS
There are various advantages of using SLIC method for producing superpixels over existing
or traditional methods. These advantages are as follows:
SLIC method is the fastest (time complexity) among all mentioned methods.
It handles the entire process more efficiently.
It results in boosted or improved performance in the segmentation process.
It adheres well to the edges. Hence, object boundaries are more visible.
A comparison of SLIC with other existing methods is shown as below:
Here, clearly SLIC method is better approach than graph-based (NC05) and gradient ascent based (MS02)
algorithms as by using SLIC method for producing superpixels, a better result is obtained in terms of
regularity, connectivity, adhesion, visually appealing, regular size, compactness, homogeneity and
compactness.
17
CHAPTER 6
A feature descriptor is a presentation of an image or an image patch that throws away extra
information and extracts useful information and hence, simplifies the image. A feature descriptor
creates a vector or an array of length n by converting an image of size width x height x 3
(channels). In HOG feature descriptor, the input image is of size x X y X 3 which is converted to
a feature vector of length m.
In this feature descriptor, the directions of gradients are used as features. Gradients are x and y
derivatives of an image and are used as magnitude of gradients is large around edges and corners
which carries a lot more information about shape of the objects than the other flat regions.
1. PREPROCESSING
HOG feature descriptor is calculated on a x * y (where x=64 and y=128) square part of an
image. An image can be of any size but the image patch should have fixed ratio of 1:2.
For example, it can be 150×300, 200×400, or 1000×2000 but not 201×305.
(6.1)
√
(6.2)
18
Fig 6.1 Calculation of feature vector
4. Now, after obtaining the feature vector (9 bins), calculate the probability for each bin.
Then construct a 3X3 probability matrix, which looks like:
19
CHAPER 7
SRAD FILTER
Speckle Reducing Anisotropic Diffusion (SRAD) filter helps in reducing speckle noise by using
a function of the gradient and magnitude operators also called as instantaneous coefficient of
variation. Existing speckle removal filter and the traditional anisotropic diffusion methods in
terms of mean preservation and reduction in variance and edge localization are left behind by the
Speckle Reducing Anisotropic Diffusion filter in the presence of speckle noise.[3]
Intensity of a image given Io(x,y) which has finite power and there is no zero value over the
image, the output image I(a,b,t) is developed according to the following PDE:
(7.1)
(7.2)
( )
(7.3)
(7.4)
(7.5)
√
20
,
In the above function defined equation is the speckle scale function. In SRAD PDE the q(a,b,t)
behaves as a edge detector. High values in this function is produced at the edges or in high
contrast region and low values are produced in the congruent regions.
The smoothing amount is controlled effectively by the speckle scale function which is
approximated using:
√ (7.6)
Here var[y(t)] is variance and y(t) bar is mean of the congruent region at time t.
Now, the task is to find out the speckle scale function for which we have to find out congruent
region. Therefore to complete the above task easily, an analytical form of qo(t) is used which is
given by:
(7.7)
Where constant is row and the q0 is the coefficient of variation of the observed image.
'Negative Diffusion' is the concept that differentiates SRAD filter from the conventional
anisotropic diffusion. As we come nearer to the edge center from any size of the edge, the
diffusion in the edge direction is moderately conquered. It returns in such a way that the dark
side of the edge gets darker and bright side gets brighter leading to sharper edge contour.
The entire focus in SRAD filter is on how sharply or precisely one can detect an edge. The
conduct of SRAD is tactful to selection of a threshold value. This threshold value plays an
important role, since it is the only one who will notify us about the ocurance of the edges and at
that point of time we will halt the diffusion process as well as enrichment of contours.
21
Chapter 8
This parameter is a basic measure that calculates the ratio of the mean to the standard deviation
of pixel value and is uses the ratio to measure the level of noise in an image. The value of SNR
for speckle noise is 1.91. It is inversely proportional to speckle i.e, it increases for lower speckle
value and vice-versa.
RMSE abbreviates for root mean square error index. RMSE calculates the squared mean
difference of the original and filtered images, where the original and filtered images have
resolution of X × Y pixels.
√ (8.1)
SSIM abbreviates for structural similarity index and is used to calculate or measure the
homogeneity between the two images. SSIM is associated with the image quality and image
visuals.
Edge Preserving Filters are mostly preferred for medical image de-noising as they do not reduce
the morphological edges during smoothing. EPI or Edge Preservation Index is a scale or metric
that is ised to measure the ability to maintain the details of the image.
22
CHAPTER 9
EXPERIMENTAL RESULTS
All the above mentioned methods are applied to results are calculated as bellows:
23
Liver Ultrasound Image
24
Kidney Ultrasound Image
25
A 1X9 FEATURE VECTOR (9-BIN)
Liver Image 1.215 0 52.3118 98.4109 63.7281 168.7335 61.7175 3.5755 1.2150
Liver Image 0.0019 0 0.0804 0.1512 0.4052 0.2592 0.0948 0.0055 .0019
26
Fig 9.8 HOG plot of fetus US image using SLIC
27
Fig 9.10 HOG plot of liver US image using SLIC
28
Fig 9.12 HOG plot of kidney US image using SLIC
Fetus Image 0.0209 0 0.0453 0.0257 0.4599 0.3308 0.0583 0.0382 0.0209
Kidney Image 0.0014 0 0.0350 0.0024 0.3042 0.1756 0.3550 0.1251 0.0014
29
9.3 Noise Removal using SRAD filter
30
Fig 9.16 Noise removal from Cardiac Ultrasound Image
CALCULATION OF PARAMETERS:
31
REFERENCES
32
8. P. Coupé, P. Hellier, C. Kervrann, and C. Barillot, “Nonlocal meansbased speckle
filtering for ultrasound images,” IEEE Trans. Image Process., vol. 18, no. 10, pp. 2221–
2229, Oct. 2009.
9. J. Shi and J. Malik, “Normalized Cuts and Image Segmentation,” IEEE Trans. Pattern
Analysis and Machine Intelligence, vol. 22, no. 8, pp. 888-905, Aug. 2000.
11. Moore, S. Prince, J. Warrell, U. Mohammed, and G. Jones, “Superpixel Lattices,” Proc.
IEEE Conf. Computer Vision and Pattern Recognition, vol. 15, no. 16, pp. 15-35. 2008.
12. D. Comaniciu and P. Meer, “Mean Shift: A Robust Approach toward Feature Space
Analysis,” IEEE Trans. Pattern Analysis and Machine Intelligence, vol. 24, no. 5, pp.
603-619, May 2002.
33
34
35