Académique Documents
Professionnel Documents
Culture Documents
2011-2012
CHAPTER 1
INTRODUCTION
1.1. Overview
The ovaries are a pair of organs in female reproductive system. They are located in the pelvis, one on each side of the uterus. Ovary is about the size and shape of an almond. The ovaries have two functions: they produce eggs (also called ova) and female hormones (estrogen and progesterone). Figure 1.1 shows the location of ovary in the female reproductive system. Every month, during a womans menstrual cycle, an egg grows inside an ovary and it grows in a tiny sac called a follicle. Once an egg matures, the sac breaks open to release the egg. The egg travels through the fallopian tube to the uterus for fertilization. Then the sac dissolves and becomes corpus luteum which produces hormones that help prepare for the next egg. In recent times there is an increase in the incidence of Ovarian abnormalities like infertility, ovarian cyst and risk of malignancy. Hence, regular diagnosis of ovary is necessary for general and reproductive health of women.
Page 1
2011-2012
Abnormalities associated with ovaries are classified into functional cysts and endometriotic, or neoplastic cysts [1-6]. Endometrotic cysts can be benign or malignant cysts. The classification is shown in Table 1.1.
Functional Cysts
Endometriotic/ Neoplastic Cysts Benign cyst Malignant cyst a. Epithelial Ovarian cancer i. Mucinous carcinoma Hyperstimulation ii. iii. Endometrial tumor Serous tumor cystadeno
Ovarian cysts are very common, appear in a very short time and disappear quickly. Cysts can be alone or in groups, small or large. There might appear multiple functional cystsPolycystic Ovarian Syndrome and Ovarian hyperstimulation syndrome which leads to problems of infertility. Other functional cysts such as corpus luteum cyst, hemorrhagic ovarian cyst, cystadenoma, teratomas are benign in nature. Often when these cysts are a few centimeters in size, surgery is recommended. The risk of malignancy increases when cysts become solid. Annually, 22,000 women are diagnosed having ovarian carcinomas, from which 16,000 are serious cases, causing death. Ovarian cancer accounts for nearly 3% of all cancers among women. It is the ninth most common cancer and fifth most common cause of cancer-related death in women. Often it is considered as silent killer because many times there are no symptoms until the disease has progressed to an advanced stage but given these statistics, it's more important than ever to spread awareness and increase early detection [79].
Page 2
2011-2012
Page 3
2011-2012
US energy is reflected back to the transducer which converts it into echo signals. These signals are then sent into amplifiers and signal processing circuits in the imaging machine's hardware to form a 2-D image [11]. The gynecological ultrasonography can be performed transabdominally, generally with a full bladder which acts as an acoustic window to achieve better visualization of pelvis organs, or transvaginally with a specifically designed vaginal transducer. Transvaginal imaging utilizes a higher frequency imaging, which gives better resolution of the ovaries, uterus and endometrium, where as larger lesions reaching into the abdomen are better seen transabdominally.
Page 4
2011-2012
(a)
(b) Figure 1.2 Transvaginal Ultrasound Image of Ovary Table 1.2 Conditions for Abnormality
Normal Ovary Major-axis length : 3cm-5cm Minor-axis length : 1.5cm-3cm Shape: Oval (Almond) Number of follicles: 7 to 8 >5cm >3cm Change in Shape
Abnormality
Figure 1.3(a) and 1.3(b) shows the ultrasound images of normal and abnormal ovary respectively. Figure 1.3(a) and 1.3(b) shows ultrasound images of ovary with ovary region marked with white and follicles with pink colors. In Figure 1.3(a), the ovary, number and size of the follicles are within the normal range. The major-axis length is 2cm and minor-axis length is 1.4cm. Figure 1.3(b) shows enlargement of ovary and also presence of multiple cysts with major-axis length of ovary region measured 12cm.
Page 5
2011-2012
portable, and highly accepted by patients. Several statistical studies on the accuracy rate of diagnosing the abnormalities related to ovary using ultrasonic examination have been carried out [13] and shown in Table 1.3.
Table 1.3 Accuracy Rate of Ovarian cyst diagnosis using ultrasound examination
However, the sonographic evaluation of ovary from ultrasound images has the following disadvantages:
a) The images produced by sonography are of poor quality and low contrast. Degradation of the image quality is due to the presence of artifacts such as dropout/shadowing, reverberation, speckle, noise, clutter which may be a source of
Department of ECE, RNSIT
Page 6
2011-2012
confusion for the interpreting physician. Among these speckle noise is the major contributor to the low quality of the image which is visible in all ultrasound images as a dense granular noise that is spread throughout the image. Hence the evaluation of ovaries from ultrasound images whether it is normal or abnormal is a challenging task in the presence of speckle.
b) Since many crucial features for differentiating normal and abnormal ovaries are based on shape and size of the ovary, an accurate extraction of the feature set is essential for the successful diagnosis. The features are presently extracted by the expert and hence are prone for subjective error. A computer aided extraction of these features may solve the human made error. Segmentation of ovary has to be done to find the feature set. This is tedious because of the homogeneity between the Region of Interest (ovary) and the complex background. Few examples of Ultrasound images of ovary illustrating the above problem are shown below: From, Figure 1.4(a) and 1.4(c), it can be seen that the ovary (ROI) is almost merged in the background.
Page 7
2011-2012
In addition ultrasonography is much more operator-dependent, reading ultrasound image requires well-trained and experienced radiologists. Even well trained experts may have a high inter-observer variation rate. Hence there is a need for diagnostic support system for detection of ovarian abnormalities a) To help experts in making accurate diagnosis b) To save the time and effort of specialists.
enhancement. ii. To develop segmentation algorithms to extract ovary from its background in an US image. iii. To extract features of the ovary iv. To classify the ovary as normal or abnormal based on size, shape, major-axis length and minor-axis length. b. Hardware implementation of working model on Virtex 2 Pro development kit.
Page 8
2011-2012
Page 9
2011-2012
CHAPTER 2
LITERATURE SURVEY
Proper diagnosis is needed for proper treatment of a disease which requires the use of high-end technologies .Diseases can be diagnosed through blood tests, biopsys etc. But the accurate, non-invasive diagnosis is obtained through the use of high end technologies. Medical imaging technologies provide an incomparable opportunity to understand, detect, prevent and treat a wide variety of human diseases. The early detection, prevention and treatment of diseases using modern medical imaging techniques have contributed to longer, healthier life expectancy.
A variety of Medical Imaging technologies have been introduced enabling improved quality and sensitivity for the representation of human organs and tissues. They are improved with modalities for clinical diagnosis, using minimally invasive techniques for the whole body, tissues, organs or cells. It encompasses various methods including [14]: i. X-ray computed tomography (CT) ii. Magnetic resonance imaging (MRI) iii. Single-photon-emission tomography (SPECT) iv. Positron-emission tomography (PET) v. Ultrasonography.
DIAGNOSTIC USE To detect infarction, tumours, calcifications, haemorrhage and bone trauma. To determine stage of cancer and to follow progress To detect both acute and chronic changes in the lung parenchyma, that is, the internals of the lungs
Page 10
2011-2012
Imaging the brain, heart, muscles and joints, for detecting cancer and evaluating blood vessels.
To analyze the blood flows through arteries and veins in the brain To detect tumors
Ultrasonography
In the field of Anesthesiology, Cardiology, Emergency Medicine, Gastroenterology, Gynecology, Obstetrics, Ophthalmology, Musculoskeletal
Among various medical imaging techniques, ultrasound Imaging is widely used for diagnosis of gynecological abnormalities since it is safe, provides fast examination, cheap and portability of hardware.
However, the images produced by ultrasonography are of poor quality and low contrast. Degradation of the image quality is due to the presence of artifacts such as dropout/shadowing, reverberation, speckle, noise, clutter which may be a source of confusion for the interpreting physician. Among these speckle noise is the major contributor to the low quality of the image. It tends to obscure and mask diagnostically important details, thereby distracting the diagnosis. Hence, speckle reduction is one of the critical pre-processing techniques to improve the image quality and possibly the diagnostic potential of medical ultrasound imaging.
Page 11
2011-2012
Another major challenge in identifying ovarian abnormalities is the segmentation of ovary from the ovarian ultrasound images. This is complex because of the homogeneity between the ovary (ROI) and background. Hence, segmentation is important because many crucial features for discriminating normal and abnormal ovary are based on the features like major-axis length, minor-axis length, solidity, eccentricity and area. These features can be effectively extracted after the ovary boundary is correctly detected. Thus, Speckle reduction and Segmentation is essential for correct diagnosis and classifying ovary as normal or abnormal.
Page 12
2011-2012
noise from the corrupted images. First, the directional difference based noise detector was used to identify the noisy pixels by comparing the minimum absolute value of four mean differences between the current pixel and its neighbors in four directional windows with a predefined threshold. Then, the adaptive weighted mean filter was adopted to remove the detected impulses by replacing each noisy pixel with the weighted mean of its noise-free neighbors in the filtering window. This was able to remove the noise even when SNR>60% with good preservation of edges. Bilateral filter [21-23] smoothens images while preserving edges, by means of a nonlinear combination of nearby image pixels. It extends the concept of Gaussian smoothing by weighting the filter coefficients with their corresponding relative pixel intensities. Pixels that are very different in intensity from the central pixel are weighted less even though they may be in close proximity to the central pixel. This could achieve better PSNR compared to anisotropic filters and other non-linear filters.
Contrast Enhancement:
Ovaries are the region of interest (ROI) and to extract features of ovary, it is required to first segment the ROI from the background. This can be done only if the ROI and background are well separated. But after filtering the image appear smoothened but may not have a good contrast between the ROI and the background. Hence linear and non-linear enhancement methods can be applied to provide good contrast between the object and the background. Image Enhancement aims to process an image so that output image is more suitable than the original image. Enhancement techniques can be classified into linear and Non-linear enhancement methods. [24-25] discusses different Linear enhancement techniques:-Scaling, min-max operator, Laplacian operator, Gaussian operator and brightness operator. Non-linear enhancement techniques: - Negative, log transforms, gray-level slicing, power-law transforms, unsharp masking, histogram equalization, histogram matching, adaptive histogram equalization, high-boosting.
Page 13
2011-2012
The literature on computer assisted approaches to the ovary image segmentation is scarce. Many techniques deal with segmentation of only ovarian follicles from ultrasound images of ovary. In [26], edge detection method for extraction of ovary from ovarian ultrasound image is proposed. The segmentation techniques used are bi-level thresholding and morphological operators. In [27] Potocnik and Zazula proposed optimal thresholding and krishs operator method for segmentation of follicles in ovarian ultrasound images. For speckle reduction, Homomorphic region growing mean filter (HRGMF) was used. The features used for classifying the follicle region are area, eccentricity and compactness. But the algorithm required more execution time. The recognition rate was approximately 70%. The recognition rate was increased to 88% by using region growing methods.
Anthony Krivanek and Milan Sonka [28] proposed a technique for detection of follicle wall inner and outer border which involved following four steps: watershed segmentation, interactive selection of the follicle of interest, inner border detection, and outer border detection. Watershed segmentation was used to approximately detect the inner borders of all the follicles of interest. After interactive follicle selection, the approximate inner border determined by watersheds was used to define a region of interest (ROI) for inner border graph search. The resulting inner border was then used to guide the search for the outer border. The results showed the border positioning errors were small: 0.63 inner border and 0.67 0.41 mm for outer border detection. 0.36 mm for
Potocnik and Zazula [29] proposed another technique prediction correction algorithm (based on kalman filter theory) and cellular neural networks (CNN) for detection of follicular region. They could achieve sensitivity of 78% and specificity of 15%. In [30] Yinhui Deng, Yuanyuan Wang and Ping Chen proposed a technique for the detection of polycystic ovarian
Department of ECE, RNSIT
Page 14
2011-2012
syndrome. The method used for despeckling was adaptive morphological filter. Modified watershed algorithm and clustering methods were used to get the region of interest and to exactly classify the follicular cysts. The algorithm achieved the accuracy rate of 84%.
In [31-32], P.S.Hiremath and Jyothi R. Tegnoor proposed horizontal scaling thresholding (HST) and vertical scaling thresholding (VST) techniques for extraction of follicles from ultrasound images of ovary. After, the results obtained from HST and VST were fused by image fusion. The features used for classification (whether follicle or not) are area, Ratio of major-axis length to minor-axis length, centroid, compactness and extent. The classification rate for the proposed method was 83.33%, false acceptance rate (FAR) -2.08% and false rejection rate (FRR) -16.66%.
[33] Presents detection of follicle using edge based method. The pre-processing (speckle filtering) was done by using Gaussian filter and contourlet transforms. For enhancement, histogram equalization was used. Edge based methods like canny, sobel and prewitt were applied on histogram equalized image to get the follicle region. To remove small objects other than follicles, some morphological operators such as filling holes, erosion were performed. For classification, features used are area, ratio of major-axis length and minoraxis length and compactness. The results showed the classification rate of 75.2% with the false acceptance rate (FAR) 22.5% and false rejection rate (FRR) 24.1%. The results were further improved by using active contour methods [34-35] with detection rate increased to 94.2%, false acceptance rate (FAR) of 12.6% and false rejection rate (FRR) of 5.7%.
The above literature [27-35] presents methods for segmentation of only ovarian follicle (dark region) from ovarian ultrasound image. Scope of the project is to develop algorithm for segmentation of ovary from ovarian ultrasound images which is complex due to the homogeneity between ROI and background.
Page 15
2011-2012
CHAPTER 3
PRE-PROCESSING
RGB TO GRAY ROI EXTRACTION SPECKLE FILTERING ENHANCEMENT
PROCESSING
SEGMENTATION FEATURE EXTRACTION CLASSIFICATION
NORMAL/ABNORMAL OVARY
The input to the Ovarian Abnormality detection system is the Transvaginal Ultrasound image of Ovary. The quality of ultrasound images is often restricted to the physical nature of the imaging system. It is attributed to speckle noise in the field and the multiple reflections of the transmitted ultrasound waves, caused by coherent summation of the backscattering of the incident wave after it hits the interfaces of tissues of different acoustic impedances [36]. The image is of low contrast, and there is homogeneity between ROI and its background. So in pre-processing stage, there is a need to suppress the speckle
Department of ECE, RNSIT
Page 16
2011-2012
noise which can be done by using various speckle filtering methods. But this does not increase the contrast between the ROI and background. So enhancement methods can be used to get good contrast.
The next step in processing is segmentation which is very challenging since ovary (ROI) and its background are still not separable. Therefore, a good segmentation algorithm is required to correctly extract the ovary. This is followed by feature extraction in which features such as eccentricity, major-axis length and minor-axis length are extracted which in turn aids in classifying ovary as normal/abnormal.
Figure 3.2 (a) Ultrasound Image of Ovary and (b) An image showing fan area and margin area
Page 17
2011-2012
The Transvaginal ultrasound image of normal ovary consists of ovary and follicles (cysts and calcifications-if any). In ovarian ultrasound images, the appearance of ovary has the following features: Central Echogenic Medulla Homogeneous echo texture Anechoic follicles in the cortex Machine /image feature: In this project, the ultrasound images taken from the ultrasound machine are in 24-bit format. This is because the ultrasound machine also used for Doppler sonography. Hence the 24-bit format has to be converted to 8-bit format for further processing.
3.2. Pre-Processing
The input is TVS image of ovary which is in 24-bit format. In the pre-processing, the 24-bit format image has to be converted into 8-bit format. The next step is the selection of Region of interest (Ovary) which helps in increasing the speed and accuracy. Speckle filtering algorithm is applied on ROI to remove the speckle noise. This is followed by contrast enhancement which provides good contrast between ROI and background and makes the image suitable for segmentation. The Pre-Processing Stage consists of RGB to Gray, ROI selection, Speckle Filtering and Enhancement. The block diagram of Pre-Processing is shown in Figure 3.3.
ROI Selection
Contrast Enhancement
Pre-Processing
Page 18
2011-2012
R G B
The equation representing RGB to Gray Conversion is given by Equation (3.1) (3.1)
Page 19
2011-2012
distracting the diagnosis. Hence Speckle filtering is a prerequisite in medical ultrasound imagery, provided that the features of interest for diagnosis are not lost. Mathematical Model of Speckle: The nature of speckle noise pattern in ultrasound imaging depends on the number of scatters per resolution cell, spatial distribution and characteristics of the imaging system itself. Based upon these, the speckle pattern is categorized into fully formed speckle (Rayleigh distribution), non-randomly distributed speckle with long order range (k-distribution) and with short range order (Rician distribution) [37]. Most of the studies on speckle in ultrasound imaging reveals it as a fully formed
are the multiplicative and additive noise components. In is prominent and hence the
ultrasound images the multiplicative noise component primary goal of this work is to remove
The speckle reduction filters can be classified as spatial domain and frequency domain filters. The spatial domain filter involves modification of pixels on the image itself. The frequency domain filter involves filtering in the transform domain. Spatial domain filters are preferred because it is easier to implement on real-time systems and they work faster than other methods like multi-resolution or wavelets based filters. The spatial domain filters are classified into linear and nonlinear filters. Let and are despeckled and
original images respectively. The following are the list of filters which were analyzed in this project.
A.
Linear Filters Linear filtering is filtering in which the value of an output pixel is a linear combination of the values of the pixels in the input pixel's neighbourhood. The linear filters used for
Page 20
2011-2012
speckle reduction are Mean filter, Adaptive weighted mean filter, Switching based Adaptive Weighted Mean filter and convolution based filters like Gaussian, bilateral filters. 1) Mean filter: It is widely used for removal of additive noise and less effective for multiplicative speckle noise [24],
2) Adaptive weighted mean filter: It is based on local statistics such as mean, variance, standard deviation. This will effectively preserve the edges and features of the image. The standard adaptive mean filters for speckle reductions are based on the multiplicative model as in (2). The filters considered are Lee, Frost and Kuan filter. i)Lee filter [38]: Lee is used primarily to filter speckled data. A simple lee filter is described by the following equations: | |
The Lee filter is based on the approach that if the variance over an area is low or constant, then the smoothing will be performed. Otherwise, if the variance is high, smoothing will not be performed. ii) Kuan filter [39]: Kuan filter smoothens the image without removing edges or sharp features in the images. kuan filter is given by
Page 21
2011-2012
Where
the image, = variation coefficient of the image , ENL = Effective Number of looks. iii) Frost filter [40]: It is an exponentially damped circularly symmetric filter that uses local statistics while preserving edges in ultrasound images. The replacement of pixel is based on the distance from the filter center, the damping factor, and the local variance. It is expressed as follows [41]:
( )| |
Where k is a constant controlling the damping rate of the impulse response function, and denotes the pixel to be filtered. It is seen that when the variation coefficient is small, the filter behaves like a Low Pass filter when tendency to preserve the original observed image. 3) Switching based Adaptive Weighted Mean Filter (SAWM) [20]: It is able to filter the noise from image even when the SNR is > 60%. It preserves the details of an image. It works in two phases: i) Detect the noisy pixel using directional difference based noise detector. ii) For the detected noisy pixel filtering is done using adaptive weighted mean filter. SAWM is given by following equations: The set of noisy pixels |
Department of ECE, RNSIT
is large it has a
in
of image (
is defined as )
Page 22
2011-2012
To discriminate between noisy pixel and edge pixel , four sub windows are taken .For each sub window, the weighted mean value of the difference between centre pixel and its neighboring pixels is calculated. The minimum of four absolute weighted mean values is determined by { If centre pixel is noisy, then then | will take a larger value .If the centre pixel is noise-free, with threshold T is used to detect
pixel as noisy or noise-free. The detected noisy pixels are processed through adaptive weighted mean filter. The output of SAWM can be represented by ( Where ) is the
is the binary flag (1 for noisy pixel and 0 for noise-less pixel),
weighted mean of noise-free pixels in the filtering window. 4) Gaussian smoothing [42]: The Gaussian smoothing operator is used to `blur' images and remove noise. It uses a different kernel that represents the shape of a Gaussian (`bellshaped') hump. An isotropic (i.e. circularly symmetric) Gaussian has the form
The idea of Gaussian smoothing is to use this 2-D distribution as a `point-spread' function, and this is achieved by convolution. 5) Bilateral filter [21-23]: It is a convolution based linear filter. There are many types of bilateral filters depending on the choice of weighting functions. For Gaussian based bilateral filter, it can be expressed as:
Department of ECE, RNSIT
|| || || ||
Page 23
2011-2012
spatial and intensity domains, respectively, N(X) is a spatial neighborhood of pixel g(X), || || is Euclidean distance, C is used for the normalization and is expressed as
|| || || ||
high, the filter will act as a smoothing filter and will blur the edges. If their values are too low, the noise cannot be removed.
B.
Non-Linear Filters Non-linear filtering is filtering in which the value of an output pixel is a non-linear combination of the values of the pixels in the input pixel's neighborhood. It tends to preserve edges compared to linear filters. The non-linear filters considered for speckle reduction are median, Adaptive median filter, Weiner filter and diffusion filter. 1) Median filter [24]: It provides excellent noise-reduction capability with less blurring .It is not used for speckle removal because of its smoothing property. It is expressed as: ( )
2) Adaptive Median filter [24] : It preserves edges and smoothens the noise-free pixel. It can be used for speckle suppression but not effective in preserving the intrinsic details. Detection of noisy pixel and filtering are done by the following steps: 1. Initialize the window size w=3,5,7,. 2. Compute pixel values in 3. If 4. If < , respectively. < , then go to step 5.Else w=w+2. by .
Page 24
and
2011-2012
5. If
<
<
then
by
3) Diffusion filter: It is based on Partial differential equations (PDE) and takes advantage of the locality and anisotropy of certain differential equations. It is found that operators of this class are capable of smoothing images without crossing the boundaries between th eir homogeneous regions. Perona and malik proposed the nonlinear PDE for smoothing image in continous domain [43].It is given by: [ | | ]
Where is the gradient operator, iv is the divergence operator, ||denotes the magnitude, c | | is the diffusion coefficient and I is the original image. Speckle Reducing Anisotropic Diffusion (SRAD) [44] is proposed for speckled images. It is the combination of diffusion and lee filters. It utilizes the coefficient of variation which serves as edge detector and it exhibits high values at edges and produces low values in homogeneous regions. Thus it ensures edge preserving and edge enhancing at the edges. Given an intensity image support , the output image [ having finite power and no zero values over the image is evolved according to the following PDE: ]
| , and
[ [ { [ [
] )] ] ( )] }
2011-2012
( )( [
) )]
( )(
And variation
is the speckle scale function. In the SRAD, the instantaneous coefficient of serves as the edge detector in spackled imagery. The function exhibits
high values at edge or on high-contrast features and produces low values in homogenous regions. The modification reflects encouraging isotropic diffusion in homogenous regions of the image where fluctuates around . The speckle scale function
effectively controls the amount of smoothing applied to the image by SRAD. It is estimated using [ ]
Where
] and are the intensity variance and mean over a homogenous area
at t, respectively. 4) Wiener filters [25]: It restores the image in the presence of blur as well as noise. It is based on the computation of local image variance. When the local variance of the image is large, the smoothing is little. If the variance is small, the smoothing will be better. It is also known as Least Mean Square filter, is given by the following expression: degradation function and Functions and is its conjugate complex. is the
Filter assumes noise and power spectra of object a priori. The equation for Weiner filter is given by equation 3.20.
Page 26
2011-2012
followed by enhancement techniques, to provide a good contrast between ROI (ovary region) and background. The proposed method involves Non-Linear Enhancement techniques such as Contrast stretching and power-law transforms. The contrast enhancement model is shown in Figure 3.5. The filtered image is the input for contrast enhancement stage. The contrast enhancement consists of two stages: Contrast Stretching and Power Law Transforms.
3.2.4.1. Contrast Stretching Contrast Stretching is a simple piecewise linear image enhancement technique that attempts to improve the contrast in an image by `stretching' the range of intensity values it contains to span a desired range of values, e.g. the full range of pixel values that the image type concerned allows. In order to perform stretching we must first know the upper and lower pixel value limits over which the image is to be normalized, denoted by a and b respectively. These are generally the upper and lower limits of the pixel quantization range in use (i.e. for an 8-bit image, a=255 and b=0). In its simplest form, the first part of the contrast stretch operation then scans the input image to determine the maximum and minimum pixel values currently present, denoted c and d respectively. Based on these four values (a, b, c and d), the image pixel range is stretched according to the following formula:
Page 27
2011-2012
)(
Figure 3.6 shows a typical transformation used for contrast stretching. The locations of points ( and ( control the shape of the transformation function thus producing
various degrees of spread in the intensity levels of the output images, hence affecting the contrast of the image.
3.2.4.2. Power-Law Transforms (Gamma Correction) To visualize the Region of Interest (ROI) from its background more precisely, after contrast enhancement, it is followed by Power-Law Transforms. The Power-Law transformations have transformation function shown in equation 3.22.
Where C and are positive constants. In general, a value of > 1 enhances the contrast of high-value portions of the image at the expense of low-value regions, whilst we see the reverse for < 1. This gives the power-law transform properties similar to both the logarithmic < 1 and exponential > 1 transforms. Power-Law transformation curve for different values of is shown in Figure 3.7.
Page 28
2011-2012
3.3. Processing
The processing stage involves two steps: Segmentation and Feature Extraction. The output of contrast enhancement stage provides good contrast between the Region of Interest (ovary) and background but the homogeneity between the ROI and its background makes the segmentation process difficult. Hence a good segmentation algorithm is required to extract ROI (ovary) from its complex background. The next step after extraction of ovary is to extract the features which help in classification of ovary as normal/abnormal. The processing stage is shown in Figure 3.8.
Page 29
2011-2012
3.3.1. Segmentation
The proposed approach for segmentation technique is bi-level thresholding methods. Thresholding is used to segment an image by setting all pixels whose intensity values are above a threshold to a foreground value and all the remaining pixels to a background value. The thresholding techniques consist of Adaptive thresholding (Local Region based thresholding) and Global thresholding. The segmentation model is shown in Figure 3.9.
+
Global Thresholding
Morphological Operators
To Feature Extraction
3.3.1.1. Adaptive Thresholding In adaptive thresholding method, the threshold value is calculated in an adaptive way. The main idea of adaptive thresholding is to divide an image into sub images and threshold these individually .Since the threshold for each pixel depends on its location within an image this technique is said to adaptive. In other words, Local adaptive thresholding selects an
Department of ECE, RNSIT
Page 30
2011-2012
individual threshold for each pixel based on the range of intensity values in its local neighborhood. Given a window size W W and a user defined threshold value T, the adaptive threshold is calculated as shown in Equation 3.23. (3.23)
3.3.1.2. Bi-Level Thresholding Even though the maximum percentage of ovary is extracted, there are some regions which still show homogeneity between extracted region and background. In order to extract ovary accurately from background, Bi-Level thresholding is applied which is a Global thresholding method. This method is used to create a mask which helps in getting correct boundary of Ovary (ROI). In Bi-Level thresholding, a threshold value T is selected. The Bi-level thresholding is given by equation 3.24. It is graphically shown in Figure 3.10. (3.24)
Page 31
2011-2012
3.3.1.3. Morphological Operators The process of segmentation is followed by morphological operators [45-46] such as region filling, closing, erosion and dilation to get the complete and exact boundary of ovary and to remove spurious objects. . Region Filling: A hole may be defined as a background region surrounded by a
connected border of foreground pixels. For example, Let denote by A a set whose elements are 8-connected boundaries, each boundary enclosing a background region (a hole). The algorithm for region filling is as follows: Given a point in each hole, the objective is to fill all the holes with ones (for binary images). Start from forming an array containing A), except at the locations in hole, which is set to one. Then, the following procedure fills all the holes with ones: of zeros (the same size as the array corresponding to the given point in each
where B is the symmetric structuring element. The algorithm terminates at the iteration step k if = .The set then contains all the filled holes; the union of and A contains all
the filled holes and their boundaries. The process is shown in Figure 3.11.
Page 32
2011-2012
Closing: Closing consists of a dilation followed by erosion and can be used to fill in holes and small gaps.
Where A denotes the set, B is the structuring element. An example of closing operator is shown in Figure 3.12. Object pixels in (a) are represented as 1 and background pixels are represented as 0. The origin in (b) is marked as x.
a) Binary Image A
Dilation: The dilation process is performed by laying the structuring element B on the image A and sliding it across the image in a manner similar to convolution. The difference is in the operation performed. It is best described in a sequence of steps: If the origin of the structuring element coincides with a 'white' pixel in the image, there is no change; move to the next pixel. If the origin of the structuring element coincides with a 'black' in the image, make black all pixels from the image covered by the structuring element. The dilation operation is represented by notation shown in equation 3.27.
Page 33
2011-2012
With a dilation operation, all the 'black' pixels in the original image will be retained, any boundaries will be expanded, and small holes will be filled. An example of dilation process is shown in Figure 3.13.
a) Binary Image A
c) Result of Dilation
Erosion: The erosion process is similar to dilation, but we turn pixels to 'white', not 'black'. As before, slide the structuring element across the image and then follow these steps: If the origin of the structuring element coincides with a 'white' pixel in the image, there is no change; move to the next pixel. If the origin of the structuring element coincides with a 'black' pixel in the image, and at least one of the 'black' pixels in the structuring element falls over a white pixel in the image, then change the 'black' pixel in the image (corresponding to the position on which the center of the structuring element falls) from black to a 'white'. The dilation operation is represented by notation shown in equation 3.28.
Erosion shrinks objects and swells holes inside objects. An example of erosion process is shown in Figure 3.14.
Page 34
2011-2012
a) Binary Image A
c) Result of Erosion
Labelling: A connected component labeling (CCL) algorithm finds all connected components in an image and assigns a unique label to all points in the same component [46]. The algorithm for CCL is as follows: 1. Scan the binary image to find an unlabeled foreground pixel and assign it a new label L. 2. Recursively assign a label L to all its foreground neighbors (having value 1). 3. Stop if there are no more unlabeled foreground pixels. 4. Go to step 1. The labeling of objects is done and area of each labeled components is calculated. The component with the largest area is the Region of Interest (Ovary).
Page 35
2011-2012
The parameters considered are Size Parameters: Major-axis length, Minor-axis length Shape parameter: Eccentricity
3.3.2.1. Size Parameters The size parameters used for classification are Major-axis length and Minor-axis length. Ovary is oval shaped compact structures, which resembles the ellipse shape. The major and minor axes of the ellipse are diameters (lines through the centre) of the ellipse.
(a)
(b)
Figure 3.15 (a) An ellipse showing the major-axis and minor-axis length and (b) Ovary region (1-majoraxis length nad 2-minor-axis length)
Major-axis length (Length): The major-axis of an ellipse is the line passing through foci, center and vertices of the ellipse. Scalar specifying the length (in pixels) of the major axis of the ellipse that has the same normalized second central moments as the region. Minor-axis length (Width): The minor-axis of an ellipse is the line through the center of the ellipse, which is perpendicular to the major-axis. It is the length (in pixels) of the minor axis of the ovary region that has the same normalized second central moments as the region.
Page 36
2011-2012
3.3.2.2. Shape Parameter The eccentricity is the ratio of the distance between the foci of the ellipse and its major axis length. The value is between 0 and 1 (0 and 1 are degenerate cases; an ellipse whose eccentricity is 0 is actually a circle, while an ellipse whose eccentricity is 1 is a line segment). This property is supported only for 2-D input label matrices. The eccentricity is a measure of how round or needle-shaped an ellipse is. The eccentricity equation is given by Where a is the semi-major axis length and b is semi-minor axis length. For a circle, the major and minor axes are equal lengths. If the major and minor axes are the same length, then the quotient is 1, subtracted from 1 gives zero. Thus, a circle has
zero eccentricity. As an ellipse becomes more needle-shaped the minor axes length of an ellipse a approaches zero and the eccentricity approaches 1. By approximating the shapes of ovary with ellipses, the system can then use the eccentricity of the ellipses to quantify ovary shape.
3.4. Classification
The Classification of Ovary whether normal/abnormal is based on the features extracted such as major-axis length, minor-axis length and eccentricity. For the normal ovary, the major-axis length should be within the range of 3cm to 5cm, minor-axis length should be within the range of 1.5cm to 3 cm and eccentricity should be between 0.78 and 0.9. Any variations in these measurements are considered as abnormal.
Page 37
2011-2012
CHAPTER 4
High-level language for technical computing Development environment for managing code, files, and data.
Page 38
2011-2012
3.
Mathematical functions for linear algebra, statistics, Fourier analysis, filtering, optimization and numerical integration.
4. 5. 6.
2-D and 3-D graphics functions for visualizing data. Tools for building custom graphical user interfaces. Functions for integrating MATLAB based algorithms with external applications and languages, such as C, C++, Fortran, Java, COM and Microsoft Excel.
The M-file provided by the MATLAB is a text editor where we can define our own function. This function can be called from the command window or can be called from the separate M-File. The M-file is saved by default in the current directory mentioned in the MATLAB. We can change the current directory in the MATLAB by using the file navigation system. The variables associated with the M-file will be available in the workspace window. All the commands executed in the current session of the MATLAB is available in the Command history window of the MATLAB. 4.1.1.2. SIMULINK Simulink (Simulation and Link) is a graphical extension to MATLAB for modeling and simulation of the systems. In Simulink, systems are drawn on screen as block diagrams. There are many blocks in the simulink such as input device (such as function generators) and output devices (such as oscilloscopes). The key features of this tool are: 1. Extensive and expandable libraries of predefined blocks. 2. Ability to manage complex designs by segmenting models into hierarchies of design components. 3. Model Explorer to navigate, create, configure and search all signals, parameters, and properties of the model. 4. Ability to interface with other simulation programs and incorporate hand-written code, including MATLAB algorithms 5. Option to run fixed or variable-step simulations of time-varying systems interactively or through batch simulation. 6. Functions for interactively defining inputs and viewing outputs to evaluate model behavior.
Page 39
2011-2012
7. Graphical debugger to examine simulation results and diagnose unexpected behavior in the design.
4.1.1.3. SYSTEM GENERATOR System Generator is a design tool from Xilinx that enables the use of The Mathworks model-based design environment Simulink for the FPGA design. It converts a Simulink model of Xilinx blocks into an efficient hardware implementation. Designs are captured in the Simulink modeling environment using a Xilinx specific blockset.
There are several Xilinx Blocksets and Xilinx Reference Blocksets provided in the Simulink. Some of the blocks used for this project are:
1. Gateway In: It provides an interface to the Xilinx Bloclset from the external world. It converts the inputs of type simulink integer, double and fixed point to Xilinx fixed point type. The Gateway in block is shown in the Figure 4.1.
2. Gateway Out: It provides an interface to the Xilinx Blockset from the external world. It converts the Xilinx fixed point inputs into outputs of type simulink integer, double or fixed point. The Gateway Out Block is shown in the Figure 4.2.
3. System Generator: This block should be present wherever the Xilinx Blocksets are used. This block can be used to generate the HDL netlist or perform hardware co-simulation for the
Page 40
2011-2012
required FPGA target board provided by the Xilinx. The System Generator is shown in the Figure 4.3.
4. CMult: The Xilinx CMult block implements a gain operator, with output equal to the
product of its input by a constant value. This value can be a MATLAB expression that evaluates to a constant. The CMult block is shown in the Figure 4.4.
Figure 4. 4 CMult
5. AddSub: The Xilinx AddSub block implements an adder/subtractor. The operation can be fixed (Addition or Subtraction) or changed dynamically under control of the sub mode signal. The AddSub block is shown in the Figure 4.5.
Figure 4. 5 AddSub
6. Delay: The Xilinx Delay block implements a fixed delay of L cycles. The delay value is displayed on the block in the form , which is the Ztransform of the blocks transfer
function. Any data provided to the input of the block will appear at the output after L cycles.
Department of ECE, RNSIT
Page 41
2011-2012
The rate and type of the data of the output will be inherited from the input. The Delay block is shown in the Figure 4.6.
Figure 4. 6 Delay
7. Register: The Xilinx Register block models a D flip flop-based register, having latency of one sample period. The Register block is shown in the Figure 4.7.
Figure 4. 7 Register
8. Convert: The Xilinx Convert block converts each input sample to a number of a desired arithmetic type. For example, a number can be converted to a signed (two's complement) or unsigned value. The Convert block is shown in the Figure 4.8.
Figure 4. 8 Convert
9. Virtex 2 to 5 Line Buffer: The Xilinx Virtex2 5 Line Buffer reference block buffers a sequential stream of pixels to construct 5 lines of output. Each line is delayed by N samples, where N is the length of the line. Line 1 is delayed 4*N samples, each of the following lines
Page 42
2011-2012
are delay by N fewer samples, and line 5 is a copy of the input. The . Virtex 2 to 5 Line Buffer block is shown in the Figure 4.9.
10. 5x5 Filter: The Xilinx 5x5 Filter reference block is implemented using 5 n-tap MAC FIR Filters. The filters can be found in the DSP library of the Xilinx Reference Blockset. Nine different 2-D filters have been provided to filter grayscale images. The filter can be selected by changing the mask parameter on the 5x5 Filter block The 2-D filter coefficients are stored in a block RAM, and the model makes no specific optimizations for these coefficients. You can substitute your own coefficients and scale factor by modifying the mask of the 5x5 filter block, under the Initialization tab. The 5x5 Filter block is shown in the Figure 4.10.
11. Constant: The Xilinx Constant block generates a constant that can be a fixed-point value, a Boolean value, or a DSP48 instruction. This block is similar to the Simulink constant block, but can be used to directly drive the inputs on Xilinx blocks. The Constant block is shown in the Figure 4.11.
Page 43
2011-2012
Figure 4. 11 Constant
12. Relational: The Xilinx Relational block implements a comparator. The Relational block is shown in the Figure 4.12.
Figure 4. 12 Relational
13. Mux: The Xilinx Mux block implements a multiplexer. The block has one select input (type unsigned) and a user-configurable number of data bus inputs, ranging from 2 to 1024. The Mux block is shown in the Figure 4.13.
Figure 4. 13 Mux
4.1.1.3.1. Hardware Co-Simulation The Xilinx BlockSets in the simulink model will be implemented onto the FPGA using the hardware co-simulation option provided by the System Generator Block. The Xilinx Blocksets are always placed between the Gateway in and out blocks. The non-Xilinx
Page 44
2011-2012
Blocksets are present outside the gateways blocks. Only the Blocksets present in between the Gateway blocks are implemented onto the FPGA.
When the hardware co-simulation is performed for the simulink model, the entire Xilinx Flow starting with the synthesis until place and route are automatically performed to generate a FPGA programming file. Then it will automatically create a hardware simulation token for the design as shown in the Figure 4.14. Finally the token is programmed to download the FPGA programming file onto the FPGA using the USB JTAG cable. The major advantages of the hardware co-simulation is it speeds up the simulation with the hardware in the loop.
Page 45
2011-2012
Features of Virtex2 PRO are: 1. 30,816 Logic Cells 2. 136 18-bit multipliers 3. 2,448Kb of block RAM 4. Two PowerPC Processors 5. DDR SDRAM DIMM that can accept up to 2Gbytes of RAM 6. 10/100 Ethernet port 7. USB2 port 8. Compact Flash card slot 9. XSGA Video port 10. Audio Codec 11. SATA, and PS/2, RS-232 ports 12. High and Low Speed expansion connectors with a large collection of available expansion boards
Table 4. 1 Virtex 2 PRO Naming Convention
XC2VP30 FFG
896
Number of Pins
-7
Speed Grade
Page 46
2011-2012
24-bit format to 8-bit format ROI Selection Speckle Reduction Filter (Bilateral Filter) Contrast Enhancement (Contrast Stretching, Power Law Transforms)
Pre-Processing
Processing
Labelling of Objects-Regionprops(Area>=Value)
Feature Extraction
Classification
Normal Ovary
Abnormal Ovary
Page 47
2011-2012
The Implementation flow is shown in the Figure 4.16. The Transvaginal Ultrasound Image is converted from 24-bit format to 8-bit format (intensity image). The intensity image is applied to ROI selection block where only ROI region is cropped for the next process. The cropped ROI image is filtered by using speckle reduction techniques. The filtering is followed by enhancement techniques to provide a good contrast between ROI and background. The enhanced image is applied to segmentation algorithms where the homogeneous ROI and background are separated. The final extraction of ROI from complex background is done by using morphological operators like region filling, closing, dilation and erosion. The labeling block removes some spurious objects other than ROI (Ovary) in the image. After extracting the ROI, the next step is to extract the features such as major-axis length, minor-axis length and eccentricity which can be used for classification of ovary as Normal/Abnormal.
532x434
Figure 4.17 RGB (24-bit format) to Gray (8-bit format) Conversion Module
The RGB Image is stored as a three dimensional array in the MATLAB. The first two indexes of the array specify the row and column of the image and the third index specifies the color plane where 1 is red, 2 is green, and 3 is blue. The R, G, B components are stored in the MATLAB as a two-dimensional array with dimensions having 532 rows and 434 columns. The input R, G and B components of the image are converted to the Luminance (Y) Component using the equation 3.1. The 24-bit image of the TVS Ovary Image is shown in the Figure 4.18(a). The Luminance (Y) Component of the TVS image of Ovary is shown in the Figure 4.18(b).
Page 48
2011-2012
Figure 4. 18 MATLAB Implementation of the RGB (24-bit) to intensity(8-bit) Module (TVS image of Ovary)
4.2.1.2. MATLAB Implementation of ROI Selection The ROI selection block selects the Region of Interest (Ovary) from Transvaginal Ultrasound Image of Ovary. Figure 4.19 (a) shows the TVS image of Ovary and ROI selected image is shown in Figure 4.19 (b).
4.2.1.3. MATLAB Implementation of Speckle Filtering One of the critical processes in ultrasound image processing is Speckle Reduction since it tends to obscure fine details in an image. The speckle filtering can be done in spatial domain as well as in frequency domain. The Spatial domain filtering is preferred since it is easier to implement and has faster execution time compared to frequency domain filtering. Spatial domain filtering is further classified into Linear and Non-Linear filtering. From different Linear and Non-Linear filters [15- 25] discussed in Chapter 3, the convolution filters like
Department of ECE, RNSIT
Page 49
2011-2012
Gaussian filter and Bilateral filters provides better performance in terms of smoothing , edge preservation and contrast enhancement. But for higher values of sigma, the Gaussian filter cannot be used since it tends to lose the details in an image. Hence Bilateral filter is better in smoothing and detail preservation compared to others. The bilateral filter requires no iteration [21-23]. The window size chosen is 5x5 and sigma value as 10. The algorithm for Bilateral filter implementation is as follows: Read the Input Image. Choose the values of window size and sigma (5- window size and 10-sigma). For chosen window, find the dimensions i.e., [X,Y]=size(window). Compute the Gaussian distance weights using the formula (4.1)
Create a null matrix B with dimension equal to size of input image. Now convolve the window on Input image and by extracting the local regions.
Page 50
2011-2012
Figure 4.20 (a) shows the ROI image and Figure 4.20 (b) shows the filtered image using Bilateral filter.
4.2.1.4. MATLAB Implementation of Contrast Enhancement The contrast enhancement is required since there is a need for good contrast between ROI (ovary) and background. From filtered image shown in Figure 4.20 (b), it can be seen that the ovary region (as marked in 1.2) is not distinguishable from background. Hence filtered image should be applied to contrast enhancement techniques in order to have good contrast between the ovary region and background. The Contrast Enhancement consists of two stages: Contrast Stretching and Power Law Transforms. Figure 4.21 (a) shows the result of Contrast Stretching. The Contrast Stretching is followed by Power- Law transforms whose result is shown in Figure 4.21 (b).
Page 51
2011-2012
a) Contrast Stretching
4.2.1.5. MATLAB Implementation of Segmentation Module The segmentation module takes the output from the Contrast enhancement module. The Segmentation module consists of two steps: Adaptive Thresholding and Global Thresholding. The Adaptive Thresholding makes the image to be divided into subimages depending on the window size given. The Global thresholding is performed to get the image mask by setting the threshold value equal to 0.128. The output of Adaptive thresholding is shown in Figure 4.22 (a) and Figure 4.22 (b) shows the result obtained for Global Thresholding (Image Mask).
a) Adaptive Thresholding
The output of Adaptive threshoding and Global Thresholding (~ Image MaskNegation of Image mask) are summed to get the boundary of ovary. The result is shown in
Department of ECE, RNSIT
Page 52
2011-2012
Figure 4.23. From the result, it can be seen that there are some spurious objects that must be removed. This can be done by using morphological operators.
Figure 4. 23 MATLAB Implementation of Adaptive thresholding and Global Thresholding (Negation of Image mask)
The morphological operators such as region filling, closing, erosion and dilation are performed on output of bi-level thresholding methods. The result is shown in Figure 4.24.
The labeling of components is done for the output obtained from morphological operators. The area of each labeled components is calculated. From the Figure 4.24, it is observed that the largest area corresponds to ovary region. Hence the largest area component is chosen from the labeled components. The result is shown in Figure 4.25.
Page 53
2011-2012
4.2.1.6. Feature Extraction Module The features extracted are Major-axis Length, Minor-axis Length and eccentricity. For the image shown in Figure 4.25, the features obtained are as follows:
The measures should be in terms of centimeters in order to classify an image as normal or abnormal. Hence the resolution of the machine should be known .For the images (TVS of Normal Ovarian Image) used in this project, 63 pixels corresponds to 1cm. For the images (TVS of Abnormal Ovarian Image) used in this project, 52 pixels corresponds to 1cm. Therefore, Size Parameters: Major-axis length 184/63 = 2.92cm Minor-Axis Length- 63.2427/63= 1.0039cm
Department of ECE, RNSIT
Page 54
2011-2012
Shape Parameter: Eccentricity=0.9391 The Figure 4.18 is the transvaginal ultrasound image of normal ovary. The results obtained for Figure 4.18 is shown in Figure 4.25 and 4.26. The results obtained for transvaginal ultrasound image of abnormal ovary is shown below in Figure 4.27:
ROI Selection
Filtering
Enhancement
Page 55
2011-2012
Size Parameters: Major-axis length 340.4077/52 = 6.54cm Minor-Axis Length- 218.9975/52= 4.2115cm Shape Parameter: Eccentricity=0.7656 4.2.1.7. Classification The ovary is classified as normal/abnormal dependes on the parameters shown in Table 4.2
Table 4.2 Parameters Used for Classification
Normal Ovary Major-axis length :-3cm-5cm Minor-axis length :-1.5cm-3cm Shape:- Oval (Almond)
Department of ECE, RNSIT
2011-2012
The outputs of Feature Extraction for Figure 4.18 and Figure 4.27 are shown in Figure 4.26 and 4.28 respectively. If the eccentricity is within the range of 0.78 to 0.9, the shape is considered to be ellipse.
Segmentation
Feature Extraction
Size Parameter: Major-Axis Length = 2.92cm Minor-Axis Length=1.0039cm Shape Parameter: Eccentricity = 0.9391 Classification
(a)
Page 57
2011-2012
Segmentation
Feature Extraction
Size Parameter: Major-Axis Length = 6.54cm Minor-Axis Length=4.2115cm Shape Parameter: Eccentricity = 0.7656 Classification
(b)
Figure 4. 29 Classification of Transvaginal Ultrasound Images of Ovary
From, Figure 4.29 (a) classification result is normal since the size parameter and shape parameter are within the normal range (Major-Axis Length = 2.92cm, Minor-Axis Length=1.0039cm and Eccentricity = 0.9391). Whereas Figure 4.29 (b) shows the ovary is classified as abnormal , this is because the size and shape parameters are not within the normal range (Major-Axis Length = 6.54, Minor-Axis Length=4.2115 and Eccentricity = 0.7656). 4.2.1.8. Image Fusion It is not an important process in this project. In order to find whether the extracted ovary is exact or not, the edge detection of segmented image is performed and its output is fused with ROI selected image. The result is shown in Figure 4.30 (a) and Figure 4.30 (b).
Department of ECE, RNSIT
Page 58
2011-2012
. (a)
(b) Figure 4. 30 Fusion of Edge detection of Segmented Image and ROI Selected Image
The overall Implementation flow with results corresponding to each stage is given in Figure 4.31.
Page 59
2011-2012
Ultrasound Image
Filtered Image
Enhanced Image
Processing
Morphological Operator (erosion-> Dilation)
Creating Mask using Bilevel Thresholding + Morphological Operator (Fill holes->erosion-> Dilation)
Image Mask
Fill holes
Pre-Final output
Final output
Feature Extraction
Page 60
2011-2012
Figure 4. 32 Blocks for reading an Image and Serialization Department of ECE, RNSIT
Page 61
2011-2012
The detailed block description used for reading an Image and serialization is shown in Table 4.3.
Table 4.3. Blocks used for serialization
Sl. No
Path
Description
Signal Processing 2 Reshape Blockset Math Functions reshape Convert to 1D vector signal
Signal Processing 3 To Frame Blockset Math Functions Signal ManagementSignal Attributes Set the output signal to be frame-based or sample based.
Page 62
2011-2012
4.2.2.2. RGB to Gray Conversion (24-bit to 8-bit format) The input is in 24-bit format, this is to be converted into 8-bit format. Further processing is done on this vector , since the processing would be sufficient on one plane rather than three planes. Another advantage is that it speeds up the processing. The architecture for RGB to Gray module is shown in Figure 4.33. The implementation is based on the equation 4.5 ----------------- (4.5)
The gateway in block provides the input to the module . The cast block converts the input pixel format into arithmetic type since the hardware supports only fixed-point operations. The equation 4.5 is implemented using multiplier block i.e., CMult and AddSub block from Xilinx blocksets. The output is stored in the register for storing the values for next process.
Page 63
2011-2012
4.2.2.3. Filtering The speckle Filtering technique used is Convolution based filtering. The 2-D filtering algorithm is processing the Ultrasound image pixel streams using convolution filters vector as shown in Figure 4.34. Each convolution filter is a 5-tap MAC FIR filter. The filter architecture, as shown in Figure 4.35.The Convolution filter consists of an image sample stream buffer, filter coefficient memory, comparator, address control unit, MAC unit and capture register. The image sample stream buffer and the filter coefficient memory store N image sub segments and M coefficients respectively. The comparator generates the `reset pulse and `enable pulses for the accumulator and capture register respectively. The pulse is asserted when the address is zero and is delayed to account for pipeline stages. The address control unit provides the necessary address logic for the filter coefficient memory and the image sample stream buffer, in addition to the timing control for the comparator.
Convolution Filter
Line Buffers
Convolution Filter
Convolution Filter
Absolute Unit
Convolution Filter
Page 64
2011-2012
The sampled inputs are passed to virtex 2 to 7 line buffer which is nothing but a delay lines for the input samples. The architecture for 2D image filtering based on Convolution using Xilinx blocksets is shown in Figure 4.36. The subsystem contains the architecture of filter and its implemenation is shown in Figure 4.37. The implementation of convolution filter is shown in Figure 4.38.
Page 65
2011-2012
Page 66
2011-2012
4.2.2.4. Enhancement The enhancement block is implemented by the architecture shown in Figure 4.40 using multiplier and addition blocks.
Page 67
2011-2012
4.2.2.5. Segmentation The Segmentation block involves thresholding to create an image mask. The architecture for thresholding is shown in Figure 4.41. The threshold value is set to 70.
4.2.2.6. HARDWARE SOFTWARE CO-SIMULATION In this project, the color conversion, filtering, enhancement and segmentation blocks are implemented on Virtex 2 Pro development kit as explained in previous sections. The JTAG Co-simulation is performed for compilation and synthesis of the module. When compilation is successful, the JTAG hardware co-simulation symbol appears in the netlist. The symbol must be included in the design which is shown in Figure 4.42. The simulation period is set to 1/7 and stop time to 352*352+2*352+10.
Department of ECE, RNSIT
Page 68
2011-2012
Page 69
2011-2012
4.2.2.7. Extraction of Ovary The final extraction of ovary is obtained by using the callback function in Matlab. The callback function can be combined to System generator model by giving the name of function in Model Properties. The result obtained is shown in Figure 4.43.
Page 70
2011-2012
CHAPTER 5
SL No 1.
Filter Assessment Parameters Peak Signal to Noise Ratio (PSNR):It provides the quality of the image in terms of the power of the original and denoised image[47]-[48]. MSE is Mean Square Error which quantifies the amount of despeckling between original and despeckled images
Where, 2. Effective Number of Looks (ENL): It is the measurement of statistical fluctuations introduced by speckle. A large ENL value represents better
Page 71
2011-2012
quality performance of despeckled image.[48] NSD is Noise Standard Deviation which finds the content of speckle noise in the image.Small NSD value represents the clear image. [ [ ] ]
3. Image Quality Index (IQI): It represents the degree of distortion of the image in terms of loss of correlation, luminance distortion and contrast distortion. When IQI is nearer to unity, distortion is less.[48]
( 4.
() )
Mean Structure Similarity Index Map (MSSIM) and Structure Similarity Index Map(SSIM):They are used to compare luminance, contrast and structure between the original and despeckled images. The value of MSSIM should be closer to unity in order to have optimal measure of similarity [47]. Where, ( ( ) ) [( )( )]
Page 72
2011-2012
iterations the SRAD filter over smoothens the image resulting in loss of details. c) From Table 5.2, it is evident that among all linear and non-linear filters, bilateral filter has a faster execution time. The following are the features desired by any efficient speckle filter like smoothing the noise (high PSNR), contrast enhancement and edge preservation. It is observed from the above results and discussions that no single filter is satisfying all the above required features. Hence a new Hybrid/multi-stage filtering method is thus proposed that satisfies these requirements. a) Hybrid Filter [SRAD and Gaussian filter]: The combination of linear and non-linear filter is called Hybrid filter which is shown in Figure 5.1. In the first stage Non-linear filter and
Department of ECE, RNSIT
Page 73
2011-2012
in the second stage linear filter is used. Non-Linear SRAD filter is considered as it provides smoothing (PSNR=36.7695) with preservation of edges (Figure 5.5(j)) and linear Gaussian filter has the PSNR (57.2364) and improves the contrast of an image. Hence this combination will satisfy the requirements listed for a good speckle filter. The performance of the hybrid filter can be seen in Table 5.2 and Figure 5.5(m). b) Multistage Filter [Adaptive and Gaussian bilateral filter]: In this method two linear filters which provide better performance in terms of smoothing, preservation of edges and contrast enhancement are cascaded. In the first stage, the SAWM filter is used as it provides a PSNR (52.42) with less distortion (IQI=0.97). In the second stage, Gaussian bilateral filter is considered which has PSNR (82.72) and MSSIM (=0.98) which preserves edges as well as smoothens the noise. The Gaussian filter with the sigma value of 2 and window size of 3x3 can also provide contrast enhancement. The performance of multi-stage filter is shown in Table 5.2 and Figure 5.5(n).
Ultrasound Image Gaussian filter Despeckled Image
SRAD
Ultrasound Image
SAWM M
Bilateral filter
Despeckled Image
From the above discussions, it is observed that hybrid and multi-stage filter satisfies all the requirements listed for a speckle reduction. The performance of multi-stage filter is better as it has higher values of PSNR, IQI, ENL and MSSIM compared to hybrid filter. As seen in subjective analysis and hybrid filter (Figure 5.5(m) and Figure 5.5(n)), the multi-stage filter has lesser speckle noise, good preservation of edges and improved contrast than hybrid filter.
Page 74
2011-2012
Table 5.2 PSNR, IQI, ENL and MSSIM Ultrasound Image of Ovary ENL MEAN LEE FROST KUAN SAWM MEDIAN ADAPTIVE MEDIAN Gaussian smoothing SRAD Weiner Bilateral filter Hybrid filter Multistage Filter 0.0499 0.1023 0.0427 0.0627 0.0742 0.0622 0.0624 0.0724 0.0382 0.0419 0.0619 0.0622 0.0658 IQI 0.8674 0.8667 0.8294 0.8667 0.9704 0.9048 0.9597 0.6714 0.6997 0.6342 0.6424 0.4444 0.7234 PSNR 40.4858 40.4827 37.982 37.3466 52.4284 43.1458 46.9287 57.2364 36.7695 37.0442 82.7247 68.3962 89.5276 MSSIM 0.9236 0.923 0.9015 0.9148 0.9774 0.9507 0.9766 0.7155 0.8017 0.7801 0.9826 0.522 0.9148
Figure 5.4 Plot of ENL, IQI and MSSIM Department of ECE, RNSIT
Page 75
2011-2012
Page 76
2011-2012
Figure 5.5 a)Original Image b)Mean c)Lee d)Frost e)Kuan f)SAWM g)Median h)Adaptive Median i)Gaussian smoothing j)SRAD k)weiner l)Bilateral filter m)Hybrid filter n)Multistage Filter
Filter Selection for Ovarian Abnormality Detection system Since the filtering algorithms are also evaluated subjectively, when the above discussed filters are applied to the Abnormality detection system, the bilateral filter gave better filtering without loss of contrast between ROI (Ovary) and background. Though the results obtained for multi-stage filter and hybrid filter is having better PSNR, IQI,ENL and MSSIM , the above filters is not suitable for the detection system of Ovarian Abnormality. But the results of hybrid/multistage is also better in terms of qualitative analysis and may be useful for getting the filtered as well as contrast enhanced images.
Department of ECE, RNSIT
Page 77
2011-2012
Images Obtained Results Major Axis Minor Length (length)Axis (in cm) Length (width) (in cm) 1 2.60 1.96 2 4.36 2.31 3 2.44 1.05 4 4.15 1.29 5 5.60 1.99 6 4.11 2.15 7 2.80 0.94 8 2.34 1.14 9 4.20 2.65 10 3.12 1.60
Department of ECE, RNSIT
Expert Value Eccentricity Major Axis Length (length) (in cm) 0.6599 0.8473 0.9023 0.9501 0.9349 0.8525 0.9419 0.8725 0.5625 0.8123 2.11 4.02 3.02 3.96 4.08 3.87 2.98 2.51 4.38 3.04
Inference Minor Axis Length (width) (in cm) 1.98 2.47 1.86 1.58 1.14 2.41 1.02 1.24 2.75 1.70
Abnormal Normal Normal Normal Abnormal Normal Normal Normal Abnormal Normal
Page 78
2011-2012
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
6.56 3.59 3.91 2.77 1.96 2.34 3.53 3.74 2.79 3.44 3.58 1.86 3.96 2.26 4.08 2.87 5.20 5.62 6.74 7.45
4.06 2.11 2.01 1.77 0.98 1.44 1.85 2.25 1.75 1.56 1.55 1.09 1.66 1.05 3.18 1.68 3.33 4.69 5.70 5.50
0.7843 0.8096 0.8133 0.7699 0.8249 0.7902 0.8500 0.8003 0.7788 0.9801 0.9005 0.8370 0.9080 0.8837 0.8190 0.7926 0.7250 0.5503 0.5642 0.6744
6.24 3.38 3.70 2.96 2.14 2.08 2.70 2.38 3.21 3.12 3.64 2.41 4.60 2.97 4.10 3.00 5.52 7.02 8.17 7.20
4.27 2.08 1.90 2.07 1.72 2.20 2.85 1.88 2.42 1.49 1.83 1.63 2.34 1.48 4.32 2.19 3.23 4.98 6.53 5.38
Abnormal Normal Normal Normal Normal Normal Normal Normal Normal Normal Normal Normal Normal Normal Normal Normal Abnormal Abnormal Abnormal Abnormal
Out of 25 normal images, 23 images are classified as normal and 2 are classified as abnormal. Among 5 abnormal images, 3 are classified as abnormal and 2 images are classified as normal. Hence, True Positive=3 True Negative=23 False Positive=2 False Negative=2
The error percentage is calculated based on the results obtained and expert values.
Page 79
2011-2012
Images 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Average %
23.2 8.04 19.2 4.5 27.1 5.8 6.04 6.7 4.1 2.5 4.8 5.8 5.3 6.4 8.4 12.1 23.5 36.3 37.8 9.3 1.6 22.8 13.9 23.9 0.4 4.3 5.8 19.9 17.5 3.3 11.9
1 6.4 43.5 18.3 42.7 10.27 7.8 8.06 3.6 5.8 4.9 1.4 5.4 14.4 43.02 34.54 35.08 16.44 27.68 4.4 15.3 33.12 29.05 29 26.3 23.2 3.0 21.9 12.7 2.18 17.4
The error percentage for length and width is calculated by using the formula 5.3 and 5.4. | |
Page 80
2011-2012
The average Error Percentage for Major-Axis length (length) obtained is 11.9%. The average Error Percentage for Minor-Axis length (width) obtained is 17.4%. The average Error Percentage for Major-Axis length (length) and Minor-Axis length (width) obtained is 14.9%.
Page 81
2011-2012
3) Run button 4) Image display 5) Feature extraction values and classification result. The patient history, patient details would be entered in the GUI.The original transvaginal ultrasound image of the ovary will be displayed when an open image button is clicked. After the run button is clicked, the GUI would perform processing such as filtering, enhancement, segmentation, features extraction and classification. The feature extraction results (Major-axis length and Minor-Axis Length) is displayed various textbox. The classification result is displayed in the Impression column. The layout of GUI is shown in Figure 5.6 and Results Obtained in GUI is shown in Figure 5.7(a) and 5.7(b).
Page 82
2011-2012
(a)
Page 83
2011-2012
Module
MATLAB Output
Original Image
Filtered Image
Enhancement
Page 84
2011-2012
Segmentation
Feature Extraction
Classification
Department of ECE, RNSIT
Page 85
2011-2012
As we can see from the Table 5.5, there are small or minor changes between the MATLAB and hardware software co-design outputs for all the modules.Secondly, the Simulation time for the hardware/software co-design model depends on the blocks used. Finally, the Xilinx Blocks works with the Xilinx fixed point type rather than the simulink integer, double type.
Logic Utilization Number of Slices Number of Slice Flip Flops Number of 4 input LUTs Number of bonded IOBs Number of
Used 72 56
Utilization 0% 0%
126
27392
0%
556
0%
28
136
20%
Page 86
2011-2012
Minimum period: 7.778ns Minimum input arrival time before clock: 0.208ns Maximum output required time after clock: 0.370ns Maximum combinational path delay: No path found
Page 87
2011-2012
CHAPTER 6
PAPER PRESENTATION
Paper Title A Novel Approach for Speckle Reduction and Enhancement of Ultrasound Images The paper has been accepted and published in International Journal of Computer Application (IJCA) in volume 45, May 2012. Description In recent years, ultrasonography is being used for effective diagnosis of various organs such as the heart, kidney, prostate, liver, ovary, uterus, thyroid glands etc. Unfortunately, one of its shortcomings is the low contrast, high noise images which are an inevitable byproduct. This is due to an artifact known as Speckle which obscures fine details in an image and may lead to erroneous diagnosis. Hence Speckle Filtering is a prerequisite in ultrasonography, provided that the features of interest for diagnosis are not lost. This paper presents a Hybrid and multistage Filtering approach in order to reduce the Speckle noise and improve the visual quality for better diagnosis. The performance of our approach is compared with the other Speckle reduction Filters on the basis of image quality parameters like Peak Signal to Noise Ratio (PSNR), Effective Number of Looks (ENL), Image Quality Index (IQI) and Mean Structure Similarity Index Map (MSSIM). We could achieve in Multistage approach a better performance with higher value of PSNR (79.915), IQI (0.9497), MSSIM (0.9945) and ENL (0.0984) compared to Hybrid Filter.
Page 88
2011-2012
CHAPTER 7
Page 89
2011-2012
and lateral sectional image is required. Along with volume, other parameters such as area, perimeter, solidity can be used to increase the specificity and sensitivity of the system. Algorithms like elliptic curve fitting for shape analysis can be used to obtain precise shape of ovary. In this project, speckle filter, enhancement and thresholding are implemented on the hardware, Virtex 2 Pro. The morphological operators and feature extraction modules can be developed on the hardware to make it as standalone system.
Page 90
2011-2012
REFERENCES
[1] Ferrazzi E, Zanetta G, Dordoni D, Berlanda N, Mezzopane R et al, Transvaginal ultrasonographic characterization of ovarian masses: comparison of five scoring systems in a multicenter study Ultrasound Obstet Gynecol 1997;10:192-197. [2] Timmerman D, Bourne TH, Tailor A, Collin WP, Verreist H, Vandenberghe K, Vergote I, A comparison of methods for preoperative discrimination between malignant and benign adnexal masses: The development of a new logistic regression model AMJ Obstet Gynecol 1999;181:57-65. [3] [4] [5] [6] [7] http://www.marilynglenville.com/general/cysts.htm. http://women.webmd.com/ovarian-cysts. http://www.tree.com/health/ovarian-cysts-types.aspx http://www.emedicinehealth.com/ovarian_cysts/article_em.htm Jemal A, Thomas A, Murray T, Thum M. Cancer statistics, 2002. CA Cancer J Clin 2002;52:23-47. Carlson KJ, Kates SJ, Singer DE, Screening for ovarian cancer. Ann Int Med 1994;121:124-132.
[8]
[9]
http://www.cancer.net/patient/Ovarian Cancer.htm
[10]
Eliete Golendziner, ,
Marcelo Moretto, , Kristhiane Di Domenico, , Eduardo Becker Jr, Poli Mara Spritzer, Ovarian And Uterine Findings In Pelvic Sonography Avenida Independncia 1211/201, 90035-077 Porto Alegre, Rs, Brazil. [11] PNTWells, Ultrasound imaging Institute of Medical Engineering and Medical Physics, School of Engineering, Cardiff University, Queens Buildings, The Parade, Cardiff CF24 3AA, UK, Phys. Med. Biol. 51 (2006) R83R98.
Department of ECE, RNSIT
Page 91
2011-2012
[12] Eberhard Merz , Ultrasound in Obstetrics and Gynecology, Georg Thieme Verlag, 2nd edition 2007. [13] Abass Aflatoonian, Reza Aflatoonian, Zahra Khashavi, Comparison between Transvaginal Sonography and Cytological results for detection of ovarian cysts Iranian Journal of Reproductive Medicine Vol.1, No.1 pp. 16-19, 2003. [14] http://www.comp.leeds.ac.uk/medvis/Info/index.html [15] Yongjian yu and scott t. Acton., Speckle reducing anisotropic diffusion, IEEE Transactions On Image Processing, Vol. 11, No. 11, November 2002 [16] Zhang F, Yoo YM, Koh LM, Kim Y, Nonlinear diffusion in Laplacian pyramid domain for ultrasonic speckle reduction, IEEE Trans Med Imaging. 2007 Feb;26(2):200-11. [17] R.Vanithamani, G.Umamaheswari ,Performance Analysis of Filters for Speckle Reduction in Medical Ultrasound Images International Journal of Computer Applications (0975 8887)Volume 12 No.6, December 2010. [18] Jappreet Kaur, Jasdeep Kaur, Manpreet Kaur, Survey of Despeckling Techniques for Medical Ultrasound Images Int. J. Comp. Tech. Appl., Vol 2 (4), 1003-1007. [19] K. Thangavel , R. Manavalan, I. Laurence Aroquiaraj, Removal of Speckle Noise from Ultrasound Medical Image based on Special Filters: Comparative Study ICGST-GVIP Journal, ISSN 1687-398X, Volume (9), Issue (III), June 2009. [20] Filter Xuming Zhang and Youlun Xiong., Impulse Noise Removal Using Directional Difference Based Noise Detector and Adaptive Weighted Mean, IEEE Signal Processing Letters, Vol. 16, No. 4, April 2009. [21] Tomasi C, Manduchi R., Bilateral filtering for gray and color images,. Proc.Int. Conf. Computer Vision 1998, 839-846.
Page 92
2011-2012
[22] Phelippeau H, Talbot H, Akil M, Bara S., Shot noise adaptive bilateral filter, Proceedings of the 9th International Conference on Signal Processing 2008,864-867 [23] Barash D., Fundamental relationship between bilateral filtering, adaptive smoothing, and the nonlinear diffusion equation, IEEE Transactions on Pattern Analysis and Machine Intelligence 2002, 24:844-847. [24] R.C. Gonzalez and R.E. Woods: Digital Image Processing, Addison- Wesley Publishing Company, 2002. [25] A.K. Jain, Fundamental of Digital Image Processing, Englewood Cliffs, NJ: PrenticeHall, 1989. [26] Nasrul Humaimi Mahmood, Siti Nor Zawani Ahmmad, Hazrin Hashim and Siti Nurhidayah Naqiah Abdull Rani Ovary ultrasound image edge detection analysis: A tutorial using MATLAB International Journal of Engineering Research and Applications (IJERA) ISSN: 2248-9622 Vol. 2, Issue 3, May-Jun 2012, pp.1635-1642. [27] Boiidar PotoEnik, Damjan Zazula, Automated Computer-Assisted Detection of Follicles in Ultrasound Images of Ovary Tenth IEEE Symposium on Computer-Based Medical Systems 1063-7125/97 [28] Anthony Krivanek and Milan Sonka Ovarian Ultrasound Image Analysis: Follicle Segmentation IEEE Transactions on Medical Imaging, Vol. 17, No. 6, December 1998 [29] Boiidar PotoEnik, Damjan Zazula Automated Ovarian Follicle Segmentation Using Region Growing, First Int'l Workshop on Image and Signal Processing and Analysis, June 14-15, 2000, Pula, Croatia [30] Yinhui Deng, Yuanyuan Wang and Ping Chen, Automated Detection of Polycystic Ovary Syndrome from Ultrasound Images, 30th Annual International IEEE EMBS Conference Vancouver, British Columbia, Canada, August 20-24, 2008
Page 93
2011-2012
[31] P.S.Hiremath and Jyothi R. Tegnoor, Recognition of Follicles in Ultrasound Im ages of Ovaries using Geometric Features IEEE Transactions On Medical Imaging Vol. 17, No. 6 978-1-4244-4764. [32] P.S.Hiremath and Jyothi R. Tegnoor, Follicle Detection in Ultrasound Images of Ovaries using Active Contours Method, IEEE Transactions On Medical Imaging Vol. 18, No. 9, 978-1-4244-8594-9. [33] P.S.Hiremath and Jyothi R. Tegnoor, Automatic Detection of Follicles in Ultrasound Images of Ovaries using Edge Based Method, IJCA Special Issue on Recent Trends in Image Processing and Pattern Recognition RTIPPR, 2010. [34] P.S.Hiremath and Jyothi R. Tegnoor, Automatic Detection of Follicles in Ultrasound Images of Ovaries using Active Contours Method, 2010 IEEE International Conference on Computational Intelligence and Computing Research.
[35] Palak
Mehrotra
Chandan
Chakraborty
Biswanath
Ghoshdastidar,
Sudarshan
Ghoshdastidar, Automated Ovarian Follicle Recognition for Polycystic Ovary Syndrome 2011 International Conference on Image Information Processing (ICIIP 2011). [36] A.Achim,A.Bezerianos and P.Tsakalides,Novel Bayesian multiscale method for speckle removal in medical ultrasound images, IEEE Trans. Med. Imag.,vol.20, no.8 pp.772783,Aug.2001. [37] Khaled Z. AbdElmoniem, Yasser M. Kadah and AbouBakr M. Youssef, Real Time Adaptive Ultrasound Speckle Reduction and Coherence Enhancement,
078032977/00/$10 2000 IEEE, pp. 172-175. [38] J.S. Lee, Refined filtering of image noise using local statistics," Jou rnal of Computer Graphic and Image Processing, vol. 15, pp. 380-389, 1981. [39] D.T. Kuan, A.A. Sawchuk, T.C. Strand, and P. Chavel, Adaptive restoration of images with speckle, IEEE Trans. ASSP., vol. 35,no. 3, pp. 373-383, March 1987.
Department of ECE, RNSIT
Page 94
2011-2012
[40] V.S.Frost,J.A.Stiles, K.S.Shanmugam and J.C.Holtzman, A model for radar images and its application for adaptive digital filtering of multiplicative noise, IEEE Transactions on pattern analysis and machine inelligence,Vol.4,No.2, pp.157- 165,1982. [41] Oleg V. Michailovich and Allen Tannenbaum., Despeckling of Medical Ultrasound Images, IEEE Transactions On Ultrasonics, Ferroelectrics, And Frequency Control, Vol. 53, No. 1, January 2006. [42] http://homepages.inf.ed.ac.uk/rbf/HIPR2/csmooth.html [43] P. Perona and J. Malik, Scale space and edge detection using anisotropic diffusion, IEEE Trans. Pattern Anal. Machine Intell., Vol.12, pp. 629639, 1990. [44] Yongjian yu and scott t. Acton., Speckle reducing anisotropic diffusion, Ieee Transactions On Image Processing, Vol. 11, No. 11, November 2002 [45] http://ee.lamar.edu/gleb/dip/index.htm [46] Na Harrington, Thesis Report On Segmentation Of Human Ovarian Follicles From Ultrasound Images Acquired In Vivo Using Geometric Active Contour Models And A Naves Bayes Classifier [47] R. Sivakumar, M. K. Gayathri and D. Nedumaran., Speckle Filtering of Ultrasound BScan Images - A Comparative Study of Single Scale Spatial Adaptive Filters, Multiscale Filter and Diffusion Filters, IACSIT International Journal of Engineering and
Technology, Vol.2, No.6, December 2010 ISSN: 1793-8236 . [48] D.Sakrison,On the role of observer on and a distortion measure Vol in image 1251-
transmission,IEEE 1267,November,1977.
Transaction
Communication.
25,pp.
[49] http://visl.technion.ac.il/projects/2006w09/
Page 95
2011-2012
Page 96
2011-2012
Page 97
2011-2012
Page 98
2011-2012
Page 99
2011-2012
Page 100
2011-2012
Page 101
2011-2012
Page 102