IMAGE Team - The Pantheon project

Tutorial: Enhancing X-Ray Image

Identification

Resources

I. Objective

The objective is to enhance the image by sharpening it and by bringing out more of the skeleton details. The narrow dynamic range of the gray levels and the high noise content make this image difficult to analyze without enhancement.

Input image (Gonzalez, 2002).The result image.

II. Method

The strategy is to combine both the unsharp masking with Laplacian and the gradient since the benefit of the unsharp masking is to highlight fine details, and the benefit of the gradient is to enhance prominent edges. Finally, the dynamic range of gray levels is increased using a power-law transformation.

The steps of the method are:

II.1 Unsharp Masking

The unsharp masking is to subtract to the original image a certain fraction of a smoothed version of itself. The process is summarized by:

g(x,y)=f(x,y) - βlp(f(x,y)

where β specifies the fraction of low-pass filter to add to the resulting image.

Herein the masking is done by the psharp operator with β = 1.

panypan input.png input.pan
psharp 8 1 input.pan image1.pan
image1.pan: After the unsharp masking.

II.2 Calculating the Gradient

The gradient image is obtained by a simple differentiation operator. Then the result is smoothed to further disseminate the values to the neighboring pixels in the gradient with respect to their distance.

psobel input.pan i2.pan
pmeanfiltering 2 i2.pan image2.pan
image2.pan: The gradient image.

II.3 Combining the Two Previous Results

The combination is done by multiplying the two previous images. A linear transformation is used to bound the gray levels between 0 and 255.

pmult image1.pan image2.pan i4.pan
plineartransform 0 0 255 i4.pan i5.pan
i5.pan: The Complete Mask.

II.4 Adding the contrasted Image to the Initial Image

The contrast image obtained above is added to the original image to enhance the contrast.

pim2sl input.pan i6.pan
padd i5.pan i6.pan i7.pan
i7.pan: After Masking.

II.5 Correcting the Grayscale Dynamics

The dynamics of grayscale is transformed using a logarithmic transformation. This transformation enhances low grayscale values and shrinks high grayscale values. This transformation also bounds the values between 0 and 255.

ppowerlawtransform 0.3 0 255 i7.pan output.pan
ppan2png output.pan output.png
output.pan: The final result.

III. The Complete Pandore Script


The Pantheon project
Image Team GREYC Laboratory
UMR CNRS 6072 - ENSICAEN - University of Caen, France
This page was last modified on 14 November 2013