Pseudocolor Image Processing

Pseudocolor (or false color) image processing is a technique where colors are assigned to grayscale values in a monochrome image based on a specified criterion. Unlike true color images, where colors represent actual spectral information, pseudocolor assigns artificial colors to enhance the visual interpretation of grayscale images. This process is particularly useful in scientific and medical imaging, where human interpretation benefits from the ability to discern thousands of color shades, compared to the limited range of grayscale shades.

Intensity Slicing Technique

One of the simplest and most commonly used methods in pseudocolor processing is intensity slicing, also known as density slicing. The technique involves treating the grayscale image as a 3D function, where the x and y axes represent the spatial coordinates of the image, and the z-axis (intensity) represents the grayscale values. Planes are then placed at various levels along the intensity axis, slicing the function into different segments.

Geometric Interpretation

Mathematically, intensity slicing can be described as follows: Let the grayscale image be represented by a function f(x,y)f(x, y), where f(x,y)[0,L1]f(x, y) \in [0, L-1] is the intensity level at coordinates (x,y)(x, y), with 0 representing black and L1L-1 representing white. If we introduce P slicing planes perpendicular to the intensity axis, at levels l1,l2,,lPl_1, l_2, \ldots, l_P, then the image is divided into P+1P+1 intensity intervals:

V1=[0,l1],V2=(l1,l2],,VP+1=(lP,L1]V_1 = [0, l_1], V_2 = (l_1, l_2], \ldots, V_{P+1} = (l_P, L-1]

Each interval VkV_k is assigned a specific color ckc_k, so that any pixel whose intensity falls within a particular interval will be colored accordingly. For example, if a pixel at (x,y)(x, y) has an intensity f(x,y)=if(x, y) = i and iVki \in V_k, then the pixel will be colored ckc_k.

Example of Intensity Slicing

Consider a monochrome medical image with intensity values ranging from 0 to 255 (8-bit grayscale). We can define three slicing planes at intensity levels 85, 170, and 255, creating four intervals:

V1=[0,85],V2=(85,170],V3=(170,255]V_1 = [0, 85], \quad V_2 = (85, 170], \quad V_3 = (170, 255]

Assign colors c1=bluec_1 = \text{blue}, c2=greenc_2 = \text{green}, and c3=redc_3 = \text{red}. This will result in pixels with intensity values below 85 being colored blue, pixels between 85 and 170 being colored green, and those above 170 being colored red. By adjusting the slicing planes, the image’s appearance can be modified, emphasizing different features based on intensity.

interpretation of the intensity slicing technique
FIGURE 6.18: interpretation of the intensity slicing technique

Mathematical Expression of Color Assignment

The intensity-to-color mapping is expressed as:

f(x,y)=ckiff(x,y)Vkf(x, y) = c_k \quad \text{if} \quad f(x, y) \in V_k

This process can be visualized geometrically. Figure 6.18 (hypothetical) illustrates a slicing plane at intensity level lil_i, with pixels above the plane assigned one color and those below assigned another. This results in a two-color image. By moving the slicing plane up and down along the intensity axis, the distribution of colors changes.

For a more complex example, consider defining multiple slicing planes that partition the grayscale into finer intervals. If PP slicing planes are defined at intensity levels l1,l2,,lPl_1, l_2, \ldots, l_P, the grayscale is divided into P+1P+1 intervals, and each interval is assigned a different color. The final image will display a variety of colors based on the intensity levels of the original grayscale image.

FIGURE 6.20: image of the Picker Thyroid Phantom. (b) Result of density slicing into eight colors. (Courtesy of Dr. J. L. Blankenship, Instrumentation and Controls Division, Oak Ridge National Laboratory.)

Example of Intensity Slicing

A practical application of intensity slicing is demonstrated with the Picker Thyroid Phantom image. Figure 6.20(a) shows the original monochrome image, which, at first glance, appears to have regions of constant intensity. However, Figure 6.20(b) reveals the result of dividing the grayscale into eight color regions. This process exposes variations in intensity that were not easily detectable in the monochrome image. For example, the left lobe, which appears as a dull gray in the original image, is shown in the color image to contain eight distinct regions, each representing a different intensity level.

In this basic example, the grayscale was divided into intervals, and each region was assigned a different color, regardless of the actual meaning of the grayscale values. The purpose was to highlight the various intensity levels. However, intensity slicing becomes even more meaningful when the subdivision of the grayscale is based on the physical properties of the image.

Monochrome X-ray image of a weld. (b) Result of color coding. (Original image courtesy of X-TEK Systems, Ltd.)
FIGURE 6.21: (a) Monochrome X-ray image of a weld. (b) Result of color coding. (Original image courtesy of X-TEK Systems, Ltd.)

For instance, in Figure 6.21(a), an X-ray image of a weld is shown, with several cracks and porosities visible as bright white streaks. In such cases, high-intensity values (like 255 in an 8-bit image) indicate a problem, such as a crack, where the X-rays fully penetrate the material. By using intensity slicing to assign a distinct color to the intensity level of 255 and another color to all other values, as shown in Figure 6.21(b), the task of identifying defects in the weld becomes much easier for human inspectors. This method reduces error rates by enhancing the visual representation of critical intensity levels.

Intensity to Color Transformations

FIGURE 6.23
Functional block diagram for pseudocolor image processing.
fR, fG, and fB are fed into the corresponding red, green, and blue inputs of an RGB color monitor.

Beyond the simple intensity slicing technique, more general transformation methods provide a broader range of pseudocolor enhancement capabilities. A particularly effective approach involves performing three independent transformations on the intensity values of each pixel in the image. These transformations are then mapped into the red, green, and blue (RGB) channels of a color display. The result is a composite image where the color is controlled by the specific transformation functions applied.

Mathematical Framework

Consider an image where each pixel intensity is represented by f(x,y)f(x, y), where f(x,y)[0,L1]f(x, y) \in [0, L-1], with LL being the maximum intensity value (e.g., L=256L = 256 for an 8-bit image). The pseudocolor transformation method involves defining three transformation functions, Tr(f)T_r(f), Tg(f)T_g(f), and Tb(f)T_b(f), which map the intensity value of each pixel into the red, green, and blue channels, respectively.

For each pixel at location (x,y)(x, y), the transformed RGB values are calculated as:

R(x,y)=Tr(f(x,y))R(x, y) = T_r(f(x, y)) G(x,y)=Tg(f(x,y))G(x, y) = T_g(f(x, y)) B(x,y)=Tb(f(x,y))B(x, y) = T_b(f(x, y))

Here, TrT_r, TgT_g, and TbT_b are transformation functions that can be linear or nonlinear, depending on the desired color mapping effect. These functions are applied independently to each pixel’s intensity value.

Example: Nonlinear Transformations

In contrast to the simple linear slicing technique, this approach can use nonlinear transformations, providing significant flexibility in color mapping. For example, consider applying the following transformation functions:

Tr(f)=sin(πfL)T_r(f) = \sin\left(\frac{\pi f}{L}\right) Tg(f)=cos(πfL)T_g(f) = \cos\left(\frac{\pi f}{L}\right) Tb(f)=sin(2πfL)T_b(f) = \sin\left(\frac{2\pi f}{L}\right)

These transformations create a smooth variation in color as the intensity values change, with red, green, and blue channels modulated differently by the intensity. As a result, pixels with different intensity values will have a wide variety of color combinations, depending on the specific values of f(x,y)f(x, y).

Application

This method is particularly useful when dealing with images where the intensity values correspond to physical properties, such as temperature or pressure gradients. By choosing appropriate transformation functions, the pseudocolor representation can be tailored to highlight important features in the data, making the image more interpretable for human observers.

Summary

Pseudocolor Image Processing is a technique in digital image processing where grayscale images (images with only shades of gray) are converted into color images to enhance visual interpretation. This method is particularly useful in fields like medical imaging, satellite imagery, and microscopy, where distinguishing features in grayscale images can be difficult.

Concept of Pseudocolor Image Processing

  1. Grayscale to Color Mapping: In a grayscale image, pixel values typically range from 0 (black) to 255 (white) for 8-bit images. Pseudocolor image processing maps these pixel values to colors, improving visual distinction between different intensities. For example, a pixel value of 50 might be mapped to a shade of blue, while a pixel value of 200 might be mapped to a shade of red.

  2. Color Look-Up Table (LUT): The process involves applying a color look-up table (LUT), which is a predefined set of colors that correspond to grayscale intensity values. The LUT assigns specific colors to specific intensity ranges. For example:

    • Intensity values 0-50 → Blue
    • Intensity values 51-150 → Green
    • Intensity values 151-255 → Red
  3. Color Spaces: The color in pseudocolor images is often represented in various color spaces like RGB (Red, Green, Blue) or HSI (Hue, Saturation, Intensity). The transformation from grayscale to pseudocolor can involve mapping grayscale intensity to one of these color spaces.

Mathematical Explanation

The main mathematical concept behind pseudocolor processing is the mapping function, which transforms the grayscale intensity into color values using a predefined LUT.

Let f(x,y)f(x, y) be the intensity of the pixel at location (x,y)(x, y) in the grayscale image. The pixel intensity value f(x,y)f(x, y) is mapped to an RGB color triplet [R(x,y),G(x,y),B(x,y)][R(x, y), G(x, y), B(x, y)], where:

  • R(x,y)R(x, y) is the red component of the color
  • G(x,y)G(x, y) is the green component
  • B(x,y)B(x, y) is the blue component

The mapping is done through a function TT, often referred to as the color transformation function:

T(f(x,y))=[R(x,y),G(x,y),B(x,y)]T(f(x, y)) = [R(x, y), G(x, y), B(x, y)]

This transformation assigns a unique color value to each grayscale intensity based on the predefined LUT.

Example

Consider a simple 3×3 grayscale image where the pixel intensities are:

[10015020050100150050100]\begin{bmatrix} 100 & 150 & 200 \\ 50 & 100 & 150 \\ 0 & 50 & 100 \\ \end{bmatrix}

Now, assume we use the following pseudocolor LUT:

  • 0-50 → Blue (RGB: [0, 0, 255])
  • 51-150 → Green (RGB: [0, 255, 0])
  • 151-255 → Red (RGB: [255, 0, 0])

After applying pseudocolor processing, the resulting color image will have these RGB values:

[GreenRedRedBlueGreenRedBlueBlueGreen]\begin{bmatrix} Green & Red & Red \\ Blue & Green & Red \\ Blue & Blue & Green \\ \end{bmatrix}

This transformation helps in identifying different intensity regions much more easily compared to the original grayscale image.

Applications

  1. Medical Imaging: In MRI and X-ray images, subtle intensity differences in grayscale may not be easily visible. Pseudocolor can highlight these differences to help in diagnosis.
  2. Satellite Imagery: Remote sensing data collected in grayscale can be colorized to make features like vegetation, water bodies, and urban areas more distinguishable.
  3. Thermal Imaging: Infrared (thermal) images are often shown in grayscale, but pseudocolor techniques are used to highlight temperature variations using different colors.

Advantages

  • Enhanced Visualization: Pseudocolor processing improves the human ability to distinguish features in an image.
  • Information Highlighting: It helps in emphasizing certain ranges of data, making it easier to detect anomalies or patterns.

Disadvantages

  • Subjective Interpretation: The color mappings are arbitrary and may not correspond to any physical properties of the object being imaged, which could lead to misinterpretation.
  • Limited Quantitative Use: It enhances visual perception but does not necessarily add quantitative information to the data.

References

  1. Gonzalez, R. C., & Woods, R. E. (2007). Digital Image Processing (3rd ed.). Pearson Education. This book provides an in-depth discussion of pseudocolor image processing and its applications.
  2. Pratt, W. K. (2007). Digital Image Processing: PIKS Inside (4th ed.). Wiley. This is another detailed source on image processing techniques, including pseudocolor mapping.
  3. Russ, J. C. (2016). The Image Processing Handbook (7th ed.). CRC Press. This reference covers various image processing techniques, including pseudocolor.

Leave a Comment