METIP Pixel Calculator Activities - Creating a Mystery Image

Pixel Calculator Activities - Creating an Mystery Image

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

Creating a your own mystery image

Now we're going to learn how to create our own mystery images with the Pixel Calculator.

Writing with the Calculator

Start by finding a file that looks interesting. The file you choose a file that has at least one area which is an even color. A good example is the file puget.bmp.

What picture did you choose?

Pick a 2-3 letter word that you would like to hide in the picture (examples: CAT, DOG, ME, your initials or whatever else you can think of)

What is your 2-3 letter word?

	Zoom in an area which is fairly even in color until you see the numbers.
	Choose the Rectangle Selection tool.
	Write your word or initials in the image using rectangles.

If you are writing your word where the image is dark, use a high numbered gray value in the calculator. If you are writing your word where the image is light, use a low gray value in the calculator.

Here is an example:

A trick: getting rid of odd gray values

Let's start by learning a trick for removing all of the odd numbered gray values in an image. This will help us hide the messages.

	Select File, then Get Image.  Load the image contrast.bmp.
	Zoom in anywhere you like until you can read the numbers.
Fill in this grid with the gray values of the first 5 pixels in any row.
	Select a row using the rectangle selection tool.
	On the calculator, do the operation # / 2, then press the Compute button.

Fill in this grid with the gray values of the first 5 pixels in the row you selected.

	On the calculator, do the operation # * 2, then press the Compute button.

Fill in this grid with the gray values of the first 5 pixels in the row you selected.

Are there any odd numbers in the rectangle you selected?

Hiding your message

We'll start by getting rid of the odd-numbered gray values in the image, then hide your message.

	Load the file you chose before by selecting File, then Get Image.
	Choose the rectangle selection tool.
	Select the entire image with the rectangle selection tool.
	On the calculator, do the operation # / 2, then press the Compute button.
	On the calculator, do the operation # * 2, then press the Compute button. 

Those operations just got rid of all the odd-numbered pixel values in your image.

	Zoom in to an area which is fairly even in color until you see the numbers.

What are some of the gray values you see?

Pick an odd gray value close to the ones on the screen. What number did you choose?
For example, if you see a lot of 10s, 12s, and 14s in the area, then choose the number 11.

	Zoom out once.
	Write your secret message using rectangles and the gray value you just picked.
	Select File, then Save Image.
	Choose a new name for your new file and type it into the edit box.
	Now press the OK button.

What is the name of the file you saved your image in?

Finding your own mystery message

During the last activity, you learned how to create your own mystery images. Now we'll have you test your image first on yourself and then on a classmate.

Recall that there are three steps to discovering a secret message in a mystery image.

1. Find the gray value of any pixel of the message in the mystery image.Usually you are given the coordinates of one message pixel, and then you zoom in to that pixel and write down its gray value.

2. Use the rectangle-selection tool to select part or all of the picture.

3. Use the calculator to show the message.

  	3a.  First use subtraction to make all lower valued pixels 0: 
	        # - (mystery message gray value - 1)
	3b.  Then use multiplication to make all higher valued pixels 255: # * 128.

Now let's try it on your image:

What is the name of your mystery image file?

What was the value you used for your message pixels?

	Use the rectangle-selection tool to select your whole image.

What is the first thing you should enter in the calculator? # - (Remember: This will make all lowered value pixels become 0)

What is the second thing you should enter in the calculator? # * (Remember: This will make all of the higher valued pixels equal 255)

Now enter those two things if you haven't already. What showed up in gray on the screen?

Write down the coordinates of one of the gray message pixels ( ,)

Make your own activity sheet

For this activity, you will be called the author and you will work with any partner you choose.

What is your partner's name?

Author: Fill in these blanks with the file name of your image and the coordinates of a secret message pixel. Then hand the form to your partner and help them discover your secret message!

	Load the image  by selecting File then Get Image.

(Author: Fill in the blanks with the name of your mystery file.)

	Zoom in somewhere near pixel (,), until you can read the numbers. 

(Author: Fill in the blanks with the coordinates of a secret message pixel, then hand this to your partner to fill out the rest.)

What is the value of that secret message pixel?

	Zoom out once or twice.
	Draw a rectangle around as much of the screen as you can.
	Use subtraction on the calculator to make all of the lower valued pixels become 0
	    (hint: # - ).

	Use multiplication on the calculator to make all of the higher valued pixels become 255
	    (hint: # * )

What does the secret message say?

Back to Table of Contents


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