06-2 - color image processing

8
4/28/2008 1 Color image processing: pseudocolor processing Spring 2008 ELEN 4304/5365 DIP 1 by Gleb V. Tcheslavski: [email protected] http://ee.lamar.edu/gleb/dip/index.htm 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 i li ti di t t ti f l d t il Spring 2008 ELEN 4304/5365 DIP 2 visualization and interpretation of gray scale details on an image or their sequence.

Upload: 184akashdeep

Post on 25-Jul-2015

23 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 06-2 - Color Image Processing

4/28/2008

1

Color image processing: g p gpseudocolor processing

Spring 2008 ELEN 4304/5365 DIP 1

by Gleb V. Tcheslavski: [email protected]

http://ee.lamar.edu/gleb/dip/index.htm

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 i li ti d i t t ti f l d t il

Spring 2008 ELEN 4304/5365 DIP 2

visualization and interpretation of gray scale details on an image or their sequence.

Page 2: 06-2 - Color Image Processing

4/28/2008

2

Intensity slicingThe 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.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

Spring 2008 ELEN 4304/5365 DIP 3

color to the pixels, whose 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.

Intensity slicingAlternatively, 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

Spring 2008 ELEN 4304/5365 DIP 4

used, the mapping function looks like stairs.

Page 3: 06-2 - Color Image Processing

4/28/2008

3

Intensity slicingIn 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

( ) ( )k kf x y c if f x y V= ∈

Spring 2008 ELEN 4304/5365 DIP 5

( , ) ( , )k kf x y c if f x y V ∈Where ck is the color associated with the kth intensity interval Vkdefined by the partitioning planes at l = k-1 and l = k.

Intensity slicingMonochrome image of Pi k

Result of intensity li i i t 8Picker

Thyroid Phantom

slicing into 8 colored regions

Spring 2008 ELEN 4304/5365 DIP 6

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.

Page 4: 06-2 - Color Image Processing

4/28/2008

4

Intensity slicingIntensity slicing takes much useful and meaningful role when subdivision is based

h i l h t i ti f th ion physical characteristics of the image.

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

Spring 2008 ELEN 4304/5365 DIP 7

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.

Intensity slicingAverage rainfall measurements are

Rain fall data plotted on a

usually done by satellites: a gray-scale image is formed, whose intensity values are proportional to

i it ti

world map

Spring 2008 ELEN 4304/5365 DIP 8

precipitation.

Color-coding greatly improves readability of such maps.

Page 5: 06-2 - Color Image Processing

4/28/2008

5

Intensity to color transformationOther 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

Spring 2008 ELEN 4304/5365 DIP 9

the red, green, and blue monitor channels producing a composite image whose colors are modulated by the transformation functions.

Note that the result is a function of pixel’s intensity but not of its position.

Intensity to color transformationAirport X-ray scanner: ordinary luggage and one with a block of simulated plastic explosives.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

Spring 2008 ELEN 4304/5365 DIP 10

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.

Page 6: 06-2 - Color Image Processing

4/28/2008

6

Intensity to color transformationTrimmed 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

Spring 2008 ELEN 4304/5365 DIP 11

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.

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

A frequent use of this approach is in multispectral image

Spring 2008 ELEN 4304/5365 DIP 12

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).

Page 7: 06-2 - Color Image Processing

4/28/2008

7

Intensity to color transformation

Spectral satellite images of DC area: red, green, blue, and near infraredinfrared.

First 3 images combined into a full-color image – sometimes (dense areas) are hard to interpret.

Red component replaced by the

Spring 2008 ELEN 4304/5365 DIP 13

Red component replaced by the near IR (component with strong response to biomass): biomass is represented in red and urban features appear grayish.

Intensity to color transformationImages 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

Spring 2008 ELEN 4304/5365 DIP 14

sulfur deposits are indicated by yellow. Such composite images might be easier to understand and interpret than individual images acquired from individual sensors.

Page 8: 06-2 - Color Image Processing

4/28/2008

8

Full-color image processing basicsThere 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

( , ) ( , )Rc x y R x y⎡ ⎤ ⎡ ⎤

Spring 2008 ELEN 4304/5365 DIP 15

( , ) ( , )( , , ) ( , ) ( , )

( , ) ( , )

R

G

B

c x y R x yx y z c x y G x y

c x y B x y

⎡ ⎤ ⎡ ⎤⎢ ⎥ ⎢ ⎥= =⎢ ⎥ ⎢ ⎥⎢ ⎥ ⎢ ⎥⎣ ⎦ ⎣ ⎦

c

Whose components are the RGB components of a color image at a point. Note that the vector components are spatial variables!

Full-color image processing basicsIt 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 q1) The process

(filtering) has to be applicable to both vectors and scalars;

2) The operation on h t f

Spring 2008 ELEN 4304/5365 DIP 16

each component of a vector must be independent of the other components.