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.|
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:
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.|
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.|
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.|
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.|
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.|
# ./visualization1.sh input.pan output.pan pany2pan input.png input.pan psharp 8 1 input.pan image1.pan psobel input.pan i2.pan pmeanfiltering 2 i2.pan image2.pan pmult image1.pan image2.pan i4.pan plineartransform 0 0 255 i4.pan i5.pan pim2sl input.pan i6.pan padd i5.pan i6.pan i7.pan ppowerlawtransform 0.3 0 255 i7.pan output.pan ppan2png output.pan output.png