You are on page 1of 8

4/28/2008

Color image p g processing: g pseudocolor processing

byGlebV.Tcheslavski:gleb@ee.lamar.edu http://ee.lamar.edu/gleb/dip/index.htm
Spring2008 ELEN4304/5365DIP 1

Preliminaries
Pseudocolor (false color) image processing consists of assigning colors to gray values based on a specified criterion. The term pseudocolor emphasizes that the colors were assigned artificially opposing to the true (real) colors. The principal use of pseudocolors is for human visualization and interpretation of gray scale details on an i li ti di t t ti f l d t il image or their sequence.

Spring2008

ELEN4304/5365DIP

4/28/2008

Intensity slicing
The technique of intensity (density) slicing can be explained by interpreting a grayscale image as a 3D function being sliced by a plane parallel to the coordinate plane of the image. For instance, a plane at li slices the image into two levels. Assigning next one color to the pixels, whose intensities are above the plane and another color to the pixels, whose pixels intensities are below the plane (pixels are on different sides of the plane), we create a two-color image, whose appearance depends on pixel intensities.
Spring2008 ELEN4304/5365DIP 3

Intensity slicing
Alternatively, the same mapping can be interpreted using the following representation. Any input intensity level is assigned to one of two colors, depending on whether it is above or below the value of li. When more levels are used, the mapping function looks like stairs.

Spring2008

ELEN4304/5365DIP

4/28/2008

Intensity slicing
In general, this technique is as follows: Supposing that the image has the gray scale values [0, L-1] where the level l0 represents black [f(x,y) = 0] and the level lL-1 represents white, we form P planes perpendicular to the intensity axes at levels l1, l2,..., lP such that 0 < P < L-1 and the planes partition the gray scale into P + 1 intervals V1, V2,, VP+1. Then, intensity to color assignment is made according to

f ( x, y ) = ck

if f ( x, y ) Vk

Where ck is the color associated with the kth intensity interval Vk defined by the partitioning planes at l = k-1 and l = k.
ELEN4304/5365DIP 5

Spring2008

Intensity slicing
Monochrome image of Picker Pi k Thyroid Phantom Result of intensity slicing i t 8 li i into colored regions

It is quite evident that the regions appearing as uniform (with a constant intensity) in the monochrome image are really quite variable as shown in the pseudocolor image.
ELEN4304/5365DIP 6

Spring2008

4/28/2008

Intensity slicing
Intensity slicing takes much useful and meaningful role when subdivision is based on physical characteristics of the image. h i l h t i ti f th i In X-ray images of the weld, it is known that, while encountering porosity or a crack in the weld, the full strength of the X-rays would hit the sensor. Therefore, assuming 8-bit X-ray weld images, the intensity values close to 255 would indicate problems. Therefore, assigning one color to level 255 and another color to all other levels, would simplify the weld inspection and lower its error rate.
Spring2008 ELEN4304/5365DIP 7

Intensity slicing
Average rainfall measurements are usually done by satellites: a grayscale image is formed, whose intensity values are proportional to precipitation. i it ti Rain fall data plotted on a world map

Color-coding greatly improves readability of such maps.


Spring2008 ELEN4304/5365DIP 8

4/28/2008

Intensity to color transformation


Other types of intensity-to-color transformations exist. One practically attractive method implies performing three independent transformations on the intensity of any input pixel. The results are fed separately into the red, green, and blue monitor red green channels producing a composite image whose colors are modulated by the transformation functions.
Spring2008

Note that the result is a function of pixels intensity but not of its position.
9

ELEN4304/5365DIP

Intensity to color transformation


Airport X-ray scanner: ordinary luggage and one with a block of simulated plastic explosives. Pseudocolor image obtained with the first set of transformation functions: explosive and background have different intensity levels and are mapped to different colors. The block, however, is quite uniform. Explosives and the bag were mapped by similar transformations: the observer can see through the explosives.
Spring2008 ELEN4304/5365DIP 10

4/28/2008

Intensity to color transformation


Trimmed sinusoidal functions used for the intensity transformations in the previous example. Changing the phase and frequency of each sinusoid can emphasize (in color) ranges in the gray scale: if all three transformations have the same phase and frequency, the output image would be monochrome. A small change in phase between 3 transformations leads to a slight change in pixels, whose intensities correspond to peaks. Pixels with intensity values in the steep section of sinusoids are assigned to much stronger colors.
Spring2008 ELEN4304/5365DIP 11

Intensity to color transformation


Often, it is desired to combine several monochrome images into a single color composite image.

A frequent use of this approach is in multispectral image processing: different sensors produce individual monochrome images, each in a different spectral band. Next, three images can be selected for display (based, for instance, on a type of information each sensor produces).
Spring2008 ELEN4304/5365DIP 12

4/28/2008

Intensity to color transformation


Spectral satellite images of DC area: red, green, blue, and near infrared. infrared First 3 images combined into a full-color image sometimes (dense areas) are hard to interpret. Red component replaced by the near IR (component with strong response to biomass): biomass is represented in red and urban features appear grayish.
Spring2008 ELEN4304/5365DIP 13

Intensity to color transformation


Images of Io combined from different Galileo imagers (some of them are in an invisible region). However, g ) , understanding of chemical and physical processes affecting sensor responses helps building meaningful color maps: Material newly ejected from active volcanoes are mapped to red; older sulfur deposits are indicated by yellow. yellow Such composite images might be easier to understand and interpret than individual images acquired from individual sensors.
Spring2008 ELEN4304/5365DIP 14

4/28/2008

Full-color image processing basics


There are two major categories of full-color image processing: 1) Process each component image (R,G,B, for instance) individually and then form a composite processed image; 2) Directly work with color pixels: since full-color images have at least 3 components, color pixels are vectors In RGB color space, an arbitrary vector (color pixel) is

c R ( x, y ) R ( x , y ) c( x, y, z ) = cG ( x, y ) = G ( x, y ) c B ( x, y ) B ( x , y ) Whose components are the RGB components of a color image at a point. Note that the vector components are spatial variables!
Spring2008 ELEN4304/5365DIP 15

Full-color image processing basics


It might be easier to process each individual component image but the result of such processing is not always equivalent to direct processing. In order to both processings to be equivalent: p g p g q 1) The process (filtering) has to be applicable to both vectors and scalars; 2) The operation on each component of h t f a vector must be independent of the other components.
Spring2008 ELEN4304/5365DIP 16

You might also like