Image Enhancement and Edge Detection Techniques Applied to Renal Magnetic Resonance Imaging
Sara Alford
University of Wisconsin - Madison
ECE 533 Project
December 12, 2003
Problem Statement: To apply image enhancement techniques to magnetic resonance angiography (MRA) and blood oxygen level dependent (BOLD) magnetic resonance (MR) images in order to improve contrast and aid in post processing.
Background
Research Study
In radiology, a highly trained physician examines images of the human body in order to diagnose and treat patients. The quality of these images should be at a high enough level so that they can easily perform their dictation without much thought to the imaging techniques and formation process. My current research uses a type of magnetic resonance imaging, blood oxygen level dependent (BOLD) to determine functional information about a specific organ of interest. A trained individual is needed to post process these images. MRA images are used to determine the anatomy and perfusion of the kidney. Better definition or contrast in the kidneys would be helpful in the diagnosis of ischemia. An image that provided guidelines for the placement of medulla through the location of edges between the medulla and cortex could also improve image processing. This would provide a check to ensure proper placement of the medulla.
MRA is an imaging technique that captures the vasculature of the human body through the use of a Gadolinium based contrast agent, Gd-DTPA [1]. A patient is injected with contrast during scanning, and images are captured during the arterial phase. Arteries will appear bright on the image whereas other structures without the contrast will appear darker. These images can then be used to diagnose the various vasculature diseases and conditions such as ischemia and stenosis.
BOLD MR imaging is typically used to image the brain, but this project investigates its application to the kidneys. From BOLD MR imaging, functional information regarding the renal oxygenation is extracted through the calculation of R2* maps from a series of sixteen T2* weighted images. This could potentially lead to a noninvasive method to diagnose the clinical problem of acute renal ischemia. The technique was validated by Prasad et al [2] and has been used in medical studies investigating the effects of pharmacological agents [3] and water diuresis [4] on the kidney. Our current study’s objective is to assess the potential of BOLD MR imaging to detect acute renal ischemia [5].
Image Physiology
The kidney is divided into three main regions: the cortex, medulla and collection system. This study was concerned with specifically determining oxygenation values for the cortex and medulla separately. Medulla and cortex, shown in Figure 1, differ in the location of the kidney. With T2* weighted MR imaging, the medulla will appear darker in intensity while cortex will appear white on the region. This contrast has not been as good as hoped, and has led to more difficult placement of the medulla.
Figure 1: Kidney Anatomy. Medullary pyramids are shown in the mid region of the kidney for a coronal slice. The collecting system is in the interior, and the cortex is the outer region surrounding the pyramids. (Image taken from Brenner and Rector’s The Kidney online edition [6]).
Image Acquisition
Five medium sized swine were studied under a protocol approved by the University of Wisconsin Research Animal Resources Center. Artificial ventilation and general anesthesia were maintained throughout the study. Guided by x-ray fluoroscopy, a balloon catheter was placed in the renal artery. Magnetic resonance (MR) imaging was performed on a 1.5 T whole-body scanner (Signa LX, GE Medical Systems, Milwaukee, WI) using a torso phased array or cardiac coil. Heart rate, respiration rate, and blood pressure were monitored throughout the study. A 3D-MRA confirmed anatomy and reperfusion to the kidney. A multi-gradient echo (mGRE) sequence was used to acquire T2* weighted images (TR/TE/Flip = 87ms/8.0-44.8ms/40°). Three axial and three coronal slices (Figure 2) were prescribed per kidney with a FOV of 26 cm, matrix of 256x128, NEX of 1, and slice thickness of 10 mm. Breathing was suspended for a scan time of fifteen seconds per slice. Baseline and inflated balloon catheter measurements were obtained.
Figure 2: BOLD MR Images. Coronal (left) and axial (right) mGRE images were taken. Each set contained 16 images.
Image Post Processing
After the acquisition of mGRE images, images are transferred to a SUN workstation to process. MR images were 1024x1024 in size and 24-bit true color. A R2* map is calculated based on the change in intensity at each pixel (Figure 3). Correct placement on the anatomical structure is imperative for meaningful R2* values specific for the cortex and medulla. Based on the scanning parameters chosen, the cortex will appear bright on the image and is typically found near the outer rim of the kidney. The medulla is harder to distinguish due to partial cortical volume averaging and a skewed cross-sectional from a non-orthogonal slice acquisition. The medulla regions appear darker due to the physiologic nature of the medulla. This corresponds to a higher R2* [7-8]. Once regions of interest (ROIs) are determined, the R2* value is calculated by taking an average of the interior pixel’s R2* values. Images are then stored as jpeg files using Huffman sequential coding to compress the image.
Figure 3: Corresponding R2* Maps calculated from coronal (left) and axial (right) mGRE images.
Motivation for Project
Currently, the quality of the images analyzed is not perfect. Contrast in the MRA clearly shows the main artery such as the aorta and its main branches, but renal arteries are not clearly defined. The image typically does not use the full range of pixel values, thereby limiting the contrast. An imaging method such as histogram equalization would take advantage of these neglected pixel values and provide better definition and more information for the reader. One problem faced when analyzing the BOLD MR images is determining the proper medullary ROI placement. By providing the reader with an accompanying image displaying the edges between the medulla and cortex, a more accurate measurement could be taken.
Image Processing Techniques
Histogram Equalization
Histogram equalization is a spatial domain image enhancement technique that modifies the distribution of the pixels to become more evenly spread out over the available pixel range [9]. In histogram processing, a histogram displays the distribution of the pixel intensity values, mimicking a PDF for a continuous function. An image that has a uniform PDF will have pixel values at all valid intensities. Therefore, it will be a high contrast image. Images that have only a limited range will be of lower contrast. Also a dark image will have only low pixel values present whereas a bright image will have only high pixel values present. Histogram equalization attempts to create a uniform PDF or histogram [10]. This can be accomplished by performing a global equalization that considers all the pixels in the entire image, or a local equalization that segments the image into regions.
Negative Images
By calculating the negative of an image, enhancement of white or gray details in a dark background occurs [10]. A negative image is calculated through the equation: P = (L-1) – I, where P is the new pixel value, L is the number of pixel intensity values and I is the original pixel intensity [9]. Subtraction images can also lead to an enhancement of certain regions of an image. In contrast enhanced MRA, a mask image is used and subtracted from a contrast-enhanced image to boost contrast [1].
Edge Detection
In order to extract edge components from an image, first or second derivative methods can be employed [9, 12]. Due to image blurring, most image edges are not sharp lines. Instead a ramping edge is common, with the slope of the ramp proportional to the degree of blurring in the edge. Blurred edges tend to be thick while sharp edges tend to be thin [9]. To determine an edge, a threshold technique is employed. If the value of the derivative is greater than a certain threshold value, then the pixel is deemed an edge pixel. An edge segment is the connected set of edge pixels [9,11]. First order derivative methods use a gradient operator. This operator used partial derivatives to approximate the 2-D gradient. The Prewitt and Sobel operators (Figure 4 and 5) are two of the most used operators in edge detection. The Sobel and Prewitt vary only slightly. The Sobel mask places most importance on the center pixel than the Prewitt operator by incorporating a factor of 2. The Canny operator, another means to determine the first derivative, computes a convolution with a Gaussian signal and pixel values in order to smooth the image and reduce noise effects. It then applies a mask to determine the gradient [13].
-1 / -1 / -1 / -1 / 0 / 10 / 0 / 0 / -1 / 0 / 1
1 / 1 / 1 / -1 / 0 / 1
Figure 4: A 3 x 3 Prewitt mask. These are used to distinguish vertical and horizontal edges in the image. These two masks calculate the gradients Gx and Gy needed to determine the overall gradient.
-1 / -2 / -1 / -1 / 0 / 10 / 0 / 0 / -2 / 0 / 2
1 / 2 / 1 / -1 / 0 / 1
Figure 5: A 3 x 3 Sobel mask. These are used to distinguish vertical and horizontal edges in the image. These two masks calculate the gradients Gx and Gy needed to determine the overall gradient change. More importance is placed on the center pixel in the Sobel mask.
The Laplacian also uses two masks to determine the second derivative of the pixel [9,14]. The Laplacian generally is not used solely to detect edges, but is coupled with a Gaussian function. This eliminates many undesirable effects such as double edges [9]. When it is used with a Gaussian function, it is called the Laplacian of a Gaussian (LoG). The purpose of the Gaussian function is to smooth the image, while the purpose of the Laplacian operator is to provide an image with zero crossings used to establish the edge locations. A 5 x 5 mask is shown in Figure 5.
0 / 0 / -1 / 0 / 00 / -1 / 2 / -1 / 0
-1 / -2 / 16 / -2 / -1
0 / -1 / -2 / -1 / 0
0 / 0 / -1 / 0 / 0
Figure 5: A 5 x 5 Laplacian of Gaussian (LoG) Mask. This mask is used to determine the horizontal and vertical edges of an image.
Work Performed/Methods
Image processing techniques were completed in order to improve the contrast of the MRA and BOLD images using Matlab (Mathworks, Version 6.1). Edge detection algorithms available in the signals processing toolbox were used as a means to improve contrast and have better definition in the kidney. A hard copy of the code can be found in Appendix A and B.
Histogram Equalization
Histogram equalization was performed using the histeq command from Matlab [15]. The default 64 bins were used. Three MRA images were used to assess the algorithm. Analysis was first performed on the entire image. A second experiment first cropped the data, and then applying the image processing techniques. These images were then compared to a cropped version of the global analysis image from the first experiment. Two different cropped regions were completed.
Negative and Subtraction Images
Images were converted to double precision images in order to perform the subtraction operation. Negative images subtracted pixels from the maximum value, providing an inverse image. Subtraction images were calculated by subtracting the original image from the histogram-equalized image.
Edge Detection Algorithms
All edge detection algorithms used were from the edge command in Matlab. Using this command, a Sobel operator, Prewitt Operator, Laplacian of Gaussian operator, and Canny operator were performed on a cropped MR image of the kidney [15]. All examined the image for both horizontal and vertical edges. The Matlab algorithm automatically calculated the threshold for the first image. Based on its value, two or three other threshold values were considered. Binary images displaying edges were plotted.
Results
A histogram of the original MRA image showed a larger percentage of pixel values in the 25-75 intensity range (Figure 6). It confirmed our visual assessment that the image was dark and not taking advantage of the full range of contrast.
Figure 6: An original MRA image and corresponding histogram. MRA images display the vasculature and anatomy of the patient. The corresponding histogram shows most of the pixel values fall between 25 and 75, with a peak about 40.
Three MRA images were analyzed using histogram equalization and negative enhancement techniques (Figure 7-15). Each of these images was cropped prior to enhancement. The analysis was repeated. Cropped image analysis was compared to the initial global analysis by cropping the enhanced image post processing (Figure 16-21). Histogram equalization was also completed with two sets of BOLD MR images (Figure 22-23). Edge detection algorithms were performed on a cropped region of the right kidney. The threshold was varied. Results are shown in Figures 24-27.
MRA Image #1:
Figure 5: MRA Histogram Equalization. a) Original Image b) Global Histogram Equalized Image. The image after histogram equalization displays more contrast then the original, but also led to more background noise.
Figure 6: Histograms. The original histogram (top) compared to the equalized histogram (bottom). The equalization spectrum now has a broader range of pixel intensity values, thereby increasing contrast seen in the image.