Chapter 2 Correction of Inhomogeneous MR Images Using Multiscale
2.2. Materials and methods
2.2.1. Retinex algorithm
In general, the human visual system is better than machines when processing images.
Observed images of a real scene are processed based on brightness variations. The images captured by machines are easily affected by environmental lightening conditions, which tend to reduce its dynamic range. On the contrary, the human visual system can automatically compensate the image information by psychological mechanism of color constancy. Color constancy, an approximation process of human perception system, makes the perceived color of a scene or objects remain relatively constant even with varying illumination conditions.
Land [77] proposed a concept of the retinex, formed from "retina" and "cortex", suggesting
- 18 -
that both the eye and the brain are involved, to explain the color constancy processing of human visual systems. After the human visual system obtain the approximate of the illuminating light, the illumination is then discounted such that the "true color" or reflectance can be determined. More details about subject color constancy can be found in [83–84].
Hurlbert and Poggio [80] and Hurlbert [81] applied the retinex properties and luminosity principles to derive a general mathematical function. Differences arose when images from various center/surround functions in three scales of gray-level variations were shown.
Hurlbert [80, 81] applied a center/surround function to solve the brightness problem, using the learning mechanism of neural networks and a general solution to evaluate the relative brightness in arbitrary environments.
Although Jobson et al. proposed a single-scale retinex (SSR) algorithm that could support different dynamic-range compressions [82, 85], the multi-scale retinex (MSR) can better approximates human visual processing, verified by experiments [82, 85–87], by transforming recorded images into a rendering which is much closer to the human perception of the original scene.
2.2.2. Single-scale retinex
The basics of an SSR [77] were briefly described as follows. A logarithmic photoreceptor function that approximates the vision system was applied, based on a center/surround organization [77, 85]. The SSR was given by
)] spectral band, and “*” represented the convolution operator. In addition, F( yx, ) was represented as
- 19 -
∫∫
F(x,y)dxdy= 1, (2.2) which was the normalized surround function. The purpose of the logarithmic manipulation was to transform a ratio at the pixel level to a mean value for a larger region. We selected MR images for our implementation with this form in Equation (2.5) proposed by Land [77].This operation was applied to each spectral band to improve the luminosity, as suggested by Land [77]. It was independent from the spectral distribution of a single-source illumination since the reflectance distribution in an image, so
) where S represented the spatially weighted average value, as long as
) This approximate equation was the reflectance ratio, and was equivalent to illumination variations in many cases.
2.2.3. The surround function
Several types of surround function were implemented. First, an inverse-square spatial surround function proposed by Land [77] was formed as
/ 2 could be changed to another surround function as
- 20 -
Moore et al. [78–79] used a surround function on an exponential function with the absolute value r as to approximate the spatial response, where c2 was a space constant.
Hurlbert and Poggio [80] and Hurlbert [81] used the Gaussian surround function
23 to reconcile natural and human vision, where c was a space constant. For a given space 3 constant, the inverse-square surround function accounted for a greater response from the neighboring pixels than the exponential and Gaussian functions. The spatial response of the exponential surround function was larger than that of the Gaussian function at distant pixels. Therefore, the inverse-square surround function was more commonly used in global dynamic-range compression, and the Gaussian surround function was generally used in regional dynamic-range compression [82].
The exponential and Gaussian surround functions were able to produce good dynamic-range compression over neighboring pixels [78, 81–82]. From the proposed surround functions [78–81], the Gaussian surround function exhibited good performance over a wider range of space constants, so it was used to enhance contrasts and to solve the inhomogeneity of MR images in the present study.
2.2.4. Adjustment of single-scale retinex output
The final process output was not obvious from the center/surround retinex proposed by
- 21 -
Land [77]. Moore et al. [78] also offered an automatic gain and offset operation, in which the triplet retinex outputs were regulated by the absolute maximum and minimum values of all scales in a scene. In this study, a constant gain and offset technique (as shown in Figure 2.1) was used to select the best rendition.
Figure 2.1 A histogram distribution plot that illustrated the gain and offset values of an MR image, which underwent the single-scale retinex (SSR) to enhance its contrast.
Figure 2.1 described how to choose the transferred output interval of both the highest- and lowest-scale rendition scene for each SSR. The offset value can be directly determined by the lower bound. Furthermore, the gain can be computed according to the range between the upper and lower bounds. The selection of a larger upper bound leaded to minor contrast improvement but prevents heavy distortion caused by truncation. The lower bound functions in a similar way as explained previously. Adjustments to the gain and offset result in the retinex outputs caused little information lost, and the constant gain and offset of retinex was
- 22 -
independent of the image content. We evaluated the effects of variations in the histogram characteristics in a gray-level scene. The gain and offset were constant between images in accordance with the original algorithm proposed by Land [77], and also demonstrated that it can be applied as a common manipulation to most types of images.
2.2.5. Multiscale retinex
It was our intention to select the best value of scale factor c in the surround function )
, ( yx
F based on the dynamic-range compression and brightness rendition for every SSR.
We also intended to maximize the optimization of the dynamic-range compression and brightness rendition. MSR was a good method for summing a weighted SSR according to
∑
= where N represented a scaling parameter, R represented the ith component of the nth scale, niMSRi MSR combined various SSR weightings [82, 85], selecting the number of scales used for the application and evaluating the number of scales that can be merged. Important issues to be concerned were the number of scales and scaling values in the surround function, and the weights in the MSR. MSR was implemented by a series of MR images, based on a trade-off between dynamic-range compression and brightness rendition. Also, we needed to choose the best weights in order to obtain suitable dynamic-range compression at the boundary between light and dark parts of the image, and to maximize the brightness rendition over the entire image. We verified the MSR performances on visual rendition with a series of MR images scanned by MR systems. Furthermore, we compared the efficacy of the MSR technique in
- 23 -
enhancing the contrast of these MR images with other image processing techniques.
An algorithm for MSR as applied to human vision has been described in past literature [82, 85]. The MSR worked by compensating for lighting variations to approximate the human perception of a real scene. There were two methods to achieve this: (1) compare the psychophysical mechanisms between the human visual perceptions of a real scene and a captured image, and (2) compare the captured image with the measured reflectance values of the real scene.
To summarize, our method involved combining specific features of MSR with processes of SSR, in which the center/surround operation was a Gaussian function. A narrow Gaussian distribution was used for the neighboring areas of a pixel (which was regarded as the center).
Space constants for Gaussian functions with scales of 15, 80, and 250 pixels in the surrounding area, as proposed by Jobson et al. [82, 85], were adopted in this study. The logarithm was then applied after surround function processing (i.e., two-dimensional spatial convolution). Next, appropriate gain and offset values were determined according to the retinex output and the characteristics of the histogram. These values were constant for all the images. This procedure yielded the MSR function.
2.2.6. Phantom and animal magnetic resonance imaging (MRI)
All experiments were performed at the Nuclear Magnetic Resonance (NMR) Center, and were carried out in accordance with the guidelines established by the Animal Care and Utilization Committee.
A single adult male Wistar rat weighing 275 g (National Laboratory Animal Center, Taiwan) was anesthetized using 2 % isoflurane and positioned on a stereotaxic holder. The body temperature of the animal was maintained using a warm-water circulation system.
For MR experiments, images were captured on a Bruker BIOSPEC BMT 47/40 spectrometer (Bruker GmBH, Ettlingen, Germany), operating at 4.7 Tesla (200 MHz),
- 24 -
equipped with an actively shielded gradient system (0 ~ 5.9 G/cm in 500 ms). A 20-cm volume coil was used as the RF transmitter, and a 2-cm linear surface coil and the above volume coil were used separately as the receiver. Coronal T2-weighted images of the phantom – comprising a 50-ml plastic centrifuge tube filled with water and an acrylic rod – and the rat brain were acquired using RARE sequences with a repetition time of 4000 ms, an echo time of 80 ms, a field of view of 3 cm, a slice thickness of 1.5 mm, 2 repetitions, and an acquisition matrix of 256 × 256 pixels.
2.2.7. Peak Signal-to-Noise Ratio and Contrast-to-Noise Ratio Analysis
The PSNR [88] and contrast-to-noise ratio (CNR) were commonly used performance indices in image processing [12, 14]. The PSNR was given by
∑
−⋅where y(k, l) and m(k, l) were the enhanced and original images of size K and L respectively, and Ipeak was the maximum magnitude of images [88]. The CNR was given by
- 25 -