METIP Pixel Calculator Activities - Contrast Enhancement

Pixel Calculator Activities - Contrast Enhancement

by Lauren Bricker
Project Director: Steven Tanimoto
Department of Computer Science & Engineering,
University of Washington, Box 352350,
Seattle, WA 98195-2350 USA

Max and Min

Doing arithmetic with the Pixel Calculator is a little different than doing it on a regular calculator. This activity will help you to understand what is happening.

	Load the image contrast.bmp by selecting File then Get Image.
	Zoom in anywhere you like until you can read the numbers.
	Choose the rectangle selection tool from the toolbar. 
	Draw a horizontal selection rectangle around at least 5 pixels.

Fill in this grid with any 5 pixels in a horizontal row.

	On the calculator, click: # + 252 then press Compute.

What is the highest gray value in your selected rectangle?

	Choose the rectangle selection tool from the toolbar. 
	Draw a horizontal selection rectangle BELOW those pixels and 
               around at least 5 pixels.

What is the middle pixel's gray value? Use this value in the next step.

	On the calculator, click: # -  then press Compute. (fill the blank in with 
               the pixel value from the line above)

Fill in this grid with the 5 pixels in the bottom row.

What is the lowest gray value in your selected rectangle?

What is the range (smallest to highest) of possible gray values for a pixel?

Contrast Enhancement

Now we'll learn how to use the calculator interface to enhance the contrast on an image.

	Load the image contrast.bmp by selecting File then Get Image.

What does the picture look like?

	Zoom in anywhere you like until you can read the numbers.

Fill in this grid with any 5 pixels in a row.

Subract one gray value from the one next to it. What is the difference?

	Choose the rectangle selection tool from the toolbar. 
	Draw a horizontal selection rectangle around at least 5 pixels.
	On the calculator, click: # * 10 then press Compute.

Fill in this grid with those same 5 pixels in a row.

Now, how far apart are the gray values of touching pixels?

	Choose the rectangle selection tool from the toolbar. 
	Draw a horizontal selection rectangle BELOW those pixels
             and around at least 5 pixels.
	On the calculator, click: # + 100 then press Compute.

Fill in this grid with the 5 pixels in the bottom row.

Now, how far apart are the gray values of touching pixels?

Which do you think will work better to reveal hidden contrast in an image
multiplication addition

Why?

Using contrast enhancement

	Now Load the file aperson.bmp by selecting File then Get Image.

Can you take a guess at who you think this is a picture of?

	Draw a rectangle around the entire image. 	
	Enter: # + 50 then press Compute on the calculator.

Can you tell who's in the picture now?

	Reload the file aperson.bmp.
	Draw a rectangle around the entire image. 	
	Enter: # * 8 then press Compute on the calculator.

Who is in the picture?

Factoid

Did you know that image processing is used in television studios to make pictures look better?

Back to Table of Contents


bricker@cs.washington.edu
Last modified: Monday 25 February 1996