Skip Navigation

  Button that takes you back to the home page. Button that takes you to the teacher pages. Button that takes you to the modules and activities page. Button that takes you to the Problem Based Learning model.Image map of some Mars Landing puzzle pieces.  Please have someone assist you with this.

Button that takes you to the Your Situation page.
Button that takes you to the Your Mission page.
Button that takes you to the Enhancing Digital Images. Button that takes you to the Viewing Digital Images. Image that says Your Skills: Seeing Pixels.
Button that takes you to the Your Challenge page.
Your Skills: Seeing Pixels
Pixels?! Right. What's a Pixel?
With the scroll and zoom tools, you can learn something very important about all images that you bring into NIH Image. ("They'll never get it!" opines SAL. "Yes I will!" you retort.) First, scroll the Cydonia.1 image to bring the extreme lower left corner of the image into view. You should be able to see a black band across the bottom of the image.

Image of a computer named SAL.

Note: If you have zoomed up several times, the bottom of the image window may have enlarged so much that it is now off of the bottom of your monitor screen, depending on the size of your monitor, and you will not be able to reach the band. If this happens, magnify the image a few times, and type <apple>-u on the keyboard. This will resize the image window so you can see the lower edge of the image window. Now try scrolling again to the bottom of the image.

Select the zoom tool and place the cursor on the boundary between the black band and the image. Zoom once. Place the cursor on the boundary again and zoom again. Look carefully at the boundary and the black or white spots as you enlarge the image. After three or four zooms, the spots begin to look like little squares. As you continue to zoom (there are seven levels), you will see everything in the image turn into lots of little squares, some brighter and some darker. These little squares are called "picture elements" or "pixels" since they are little pieces or "elements" of the whole picture.

Image of different colored pixels.What are the properties of a pixel? Select Window/Info from the menu bar. A small box will appear at lower left called the Info Box. The top three lines in the box are labeled "X," "Y," and "Value." Place the cursor on one of the pixels in the image. A number will appear on each of the three lines. Move the cursor one pixel to the left; the X number will decrease by one. Move the cursor one pixel to the right; the X number increases by one. Now move the cursor one pixel up, the Y value will increase by one; moving it down will decrease Y by one. Moving the cursor from a pixel of one shade of gray to a pixel with a different shade of gray will change the Value by some unpredictable amount. If you move the cursor back and forth between several pixels, you see that a given pixel always has the same X, Y, and Value. Thus a single pixel is defined by these three numbers: X gives the horizontal location of the pixel in the image, Y gives the vertical position (just as "row" and "column" give the location of a number in a matrix or array), and the Value of a pixel is called its Digital Number, or DN.

SAL warns: "The Info box can be moved by clicking-and-dragging. It will stay wherever you leave it. It can also be "buried" by the image or other windows when they are activated, so be careful where you put it. If you "lose" it under other windows, selecting Window/Info will always bring it to the top."

Image of a different colored pixels.A digital image is a picture made up of a lot of pixels arranged in a specified order in a two dimensional array. How many pixels are there in a typical digital image? You can easily find out, since the pixels are numbered. In NIH Image, the "starting point" for the X,Y position counters is 0,0 in the extreme lower left corner. The maximum X,Y numbers are in the opposite corner. Find them and multiply them together to find the total number of pixels in this image ( for Cydonia.1, it turns out to be over a million pixels!).

"Ahem." SAL clears its voice, and launches into a short lecture (boring, but useful): "Digital images are very important in the Space age. Computer screen images are digital. Photo CD images are digital. Nearly all images taken by spacecraft are digital. This is because digital images are easy to send just about anywhere. How? A digital image is simply a group of numbers in a particular order. If you send the numbers corresponding to the values of each pixel to another person who knows the order in which you are sending the values, then the other person can reassemble the values and recreate the picture using a program like NIH Image. The numbers can be sent by voice through the air, by telephone, by hand signals, by smoke signals, or, in the case of space satellites, by radio. From any place in the Solar System, a spacecraft can send a radio message to Earth containing the numbers describing an image. On the other hand, it is virtually impossible to load a satellite with film, send it to Jupiter to take pictures, and then bring the film back to Earth for processing. Besides, with software such as NIH Image, you can manipulate a digital image in ways that would be very difficult with an image on film."

Image of different colored pixels.Using the Histogram Move the cursor around the image and watch the pixel values change in the Info Box. Most of the pixel values in Cydonia.1 appear to be between about 150 and 180, with a few other values like 245, 47, or 3 occasionally appearing. Can you find out exactly how many of each value there is and what the total range of values is? Yes! Select Analyze/Show Histogram, and a small graph labeled "Histogram" will appear. Place the cursor within the graph and look at the Info box. The top two lines now read "Level" and "Count." The Level is the same as the pixel value, or DN, and the Count is the number of pixels in the image with the corresponding value. If you slowly move the cursor from left to right in the graph, the Level rises from 0 to 255, and the Count changes according to the height of the bar on each level. The total number of Levels, or values, in this or any image that can be displayed in NIH Image is 1 + 255 = 256.

As you look at the histogram, you note that, indeed, most of the pixels have values between about 150 and 180. There are a few counts scattered at values above and below this range. Most of these small counts correspond to the values of the black and white speckles in the image. Can you scroll around the image and figure out which pixels account for the large number of counts at Level 255?

"Ahem." You brace yourself as SAL launches into another short lecture (again boring, but useful): "Let me enlighten you small-brained humans by pointing out that the total number of Levels (values) in this image is 256, which equals 28. An image with 256 levels is defined as an 8-bit' image. Other types of images have only, say, 24 = 16 or 216 = 65,536 possible levels. These images are called '4-bit' and '16-bit' images, respectively, according to the value of the exponent on the 2. Why '2,' you ask? Computers like myself express numbers in binary code based on two digits, 0 and 1, a system much more elegant and efficient than your clumsy human 10-finger based counting system. A number with one bit may be only 0 or 1, for a total of 21 = 2 possible values. There are 22 = 4 possible values for a two bit number (00, 01, 10, and 11), 23 = 8 for a three bit number, and so forth. The smaller the bit count per pixel in an image, the quicker the image can be sent from one place to another. However, the higher the bit count, the better the image is. Eight-bit images with 256 DN values taken by spacecraft are a good compromise between quality and speed of transmission. They are small enough for relatively quick transmission, but show sufficient detail to the human eye (which can only discern about 30 levels of brightness but millions of different colors).

Using the Profile Tool This is another tool showing pixel values, this time along a line anywhere in the image. Click on the Profile Tool icon Image of the Profile Tool the Tool box and move the cursor over onto the image. The cursor turns into a cross-hair. Pick a spot, click-and-drag the mouse without releasing. A line appears between the initial pixel you clicked on and the current position of the cursor. Move the cursor around a bit without unclicking it. The line follows the cursor anywhere in the image. While you hold the mouse down, the Info Box display will change to show three numbers: DX, DY, and Length. DX is the vertical distance between the initial pixel and the cursor, DY is the horizontal distance, and Length is the total length of the line (length is displayed in pixels unless the user has set a new scale). Now release the mouse. A Plot box appears, showing a graph of the pixel values along the length of the line, from the initial pixel to the final cursor position. When you place the cursor on the plot, the value of X that appears in the Info box now refers to the position along the line from the initial pixel, and Y now refers to the pixel Value, or DN. To draw a new line and plot, simply click-and-drag from another location in the image.

Image of different colored pixels.If you double-click on the Profile icon, a dialog box appears that you can use to change some of the ways the plot is drawn. If none of the option boxes have crosses in them, the plot will be automatically scaled to the pixel values and length of the line you draw. You can make the size of the plot the same regardless of the length of the line you draw by clicking on the Fixed Plot Size option box to place a cross in it and typing in Width and Height values. You can also fix the vertical scale by clicking in the Fixed Y Axis Scale option box. This will be useful when you look for smooth areas in the images: with a fixed scale, rough areas will appear bumpy in the graph and smooth areas will appear flat. For the rest of this practice, make sure the Invert box has a check in it. This makes dark spots appear as lows in the plot, while light spots appear as highs. When you have finished selecting your options, click OK. To get rid of the profile lines, click on the Profile tool icon in the Tool box once again.

Now let's look at what the plot is telling us. Choose a line that includes some of the white and black dots. The line in the plot mostly just wanders around, but there are a few "spikes" in it, both up and down, marking the locations of the black and white dots. Now scroll to the lower left corner where some features appear in the image. Draw a line across some of them. Note that the bright areas appear as highs and the dark areas appear as lows. Where there are lots of features, the graph is bumpy; where there are few features, the graph is smooth (except for any spikes). In this image, most of the light and dark contrast is due to topography: bumps and holes on the surface of Mars. Rough ground has lots of shadows and sunlit spots that show up as dark and light areas in the image. Smooth ground will be all about the same shade of gray. So you can use the profile tool to find smooth spots -- and good landing sites -- in the image.

Using the Look-Up-Table (LUT)--Gray Scale You can see objects in a digital image only if a different color or shade of gray is assigned to each different pixel value. Try to imagine what you would get if every pixel value were assigned the same color or shade of gray. When all of the different pixel values in an image are assigned a different shade of gray, the image is called a "gray-scale" image. How do you choose what shade of gray to assign to each pixel value? Any way you want! In NIH Image, it is easy to see what shade of gray is assigned to each value -- just look at the tall, rectangular box at the left edge of the NIH Image screen with the title LUT. In NIH Image, the default LUT is white at the top of the box, shading to black at the bottom. Move your cursor onto the LUT and look at the Info box while you move the cursor up and down the LUT. The numbers that show in the "Index" line in the Info box change from 0 for white to 255 for black - our 256 levels again. (Ignore the RGB line, we will look at it another time.) If you now compare the shade of gray of a particular pixel in the image with the same shade of gray in the LUT, you will see that the pixel value equals the Index number. The LUT is the place where NIH Image "looks" to see which shade of gray to give to each pixel value. What you see in the LUT is what you get in the image.

Note: in image display programs other than NIH Image, the default LUT may be reversed, with dark shades corresponding to low pixel values and light shades corresponding to higher pixel values. You can change the LUT in NIH Image to dark shades for low pixel values and light shades for high values by selecting Options/LUT Options..., placing a cross in the Invert box, and clicking OK.

Using the LUT -- Color Tables Do you have to use continuous shades of gray in the LUT? NO! You can use any shade of gray or any color, in ANY order! NIH Image provides a number of built-in color sequences, called "Palettes," for the LUT. You can find them under Options/Color Tables. Just for fun, select the "Rainbow" palette and see what happens. Wow! Color overload! Move your cursor around your now garishly colored image and look at the pixel values. They are the same as before. Move your cursor up and down the LUT. Again, the values are unchanged. As you compare, say, the yellow pixel values in the image (around 190) with the yellow Level values in the LUT (again around 190), they are the same. You have done nothing to the image except assign a different color to each pixel value.

Try some of the other selections under Options/Color Tables ("System" is a weird one) and see what happens. No matter how strange the image appears, you have not changed the pixel values by choosing a different color palette, you have only changed the color assigned to each pixel value.

Image of different colored pixels.Images like this are obviously "in color," but the colors are not "real"--that is, they do not correspond to the color of anything in the original image. Images colored in this way are called pseudo-color images. (They are also sometimes called "false color" images, but this term should be avoided since it usually has a very specific meaning. See the exercise on Color Images.) Gray-scale images are often changed to pseudo-color because the human eye can see color differences more easily than different shades of gray.

[ Your Situation ] [ Your Mission ] [ Your Skills: / Viewing Digital Images / Seeing Pixels / Enhancing Digital Images / ] [ Your Challenge ]
PBL Model ]

[ Home ] [ Teacher Pages ] [ Modules & Activities

Button that takes you back to the main modules page.

HTML code by Chris Kreger
Maintained by ETE Team
Last updated November 10, 2004

Some images 2004

Privacy Statement and Copyright 1997-2004 by Wheeling Jesuit University/NASA-supported Classroom of the Future. All rights reserved.

Center for Educational Technologies, Circuit Board/Apple graphic logo, and COTF Classroom of the Future logo are registered trademarks of Wheeling Jesuit University.