Mars Global Surveyor
Mars Orbiter Camera

What about the histograms?

What is a histogram?

A histogram is a graph or table that shows the relationship between each brightness level in a picture and that fraction, amount, or percentage of the picture that has that brightness level. For example, a picture that was all black would have a histogram with a single value (for example, 100%) at the "0" brightness level. An all white image would have a histogram with a single value at the "255" brightness level. An image that was 1/2 white and 1/2 back would have two spikes in its histogram, each at 50%, at "0" and "255." An image that had equal numbers of gray levels between 0 and 255 would have a flat histogram, with equal percentages at each gray level. Remember this last example, as we'll return to it shortly.

Real images have differing shades of gray, depending on lighting conditions, the slope (slopes towards the sun are brighter than those pointing away from the sun, etc.), and whether the surface is composed of light or dark materials. Typically, images have histograms that resemble the familiar "bell-shaped" curve used to assign classroom grades.

A comparison of Viking and MOC Histograms

Figure 1 shows three histograms. From top to bottom, these are the 8-bit (256 shades of gray) histograms of Viking Orbiter images 035A70 and 070A13, as they are read from the Planetary Data System CD-ROMs, and MOC image 22003. These are also given, in tabular form, in their entirety: 035A70, 070A13, and 22003.

Figure 1: Comparison of Viking and MOC 8-bit Histograms

Examination of Figure 1 shows three attributes of the Viking histograms, relative to the MOC histogram.

  1. The vertical lines that define the curves are more broadly spaced for the two Viking histograms than they are for the MOC histogram (that is, the vertical lines in the MOC histogram are closer together).

  2. The Viking histograms have long "tails" (brightness values that occur in small numbers) between 0 and 50 and between 130 and 255; the MOC image histogram has short "tails."

  3. The Viking histograms are mostly confined between about brightness levels 50 and 130, while the MOC histogram is confined between 50 and 100.

The first of these attributes results from the fact that the Viking data as archived by NASA have 1 more bit of information than was actually acquired by the Viking Orbiter cameras. Inspection of a part of the 035a70 table shows what's going on:


 Brightness		   # of Pixels   % of Image   Graph of # of Pixels

     50                           441       0.03
     51                             1       0.00
     52                           458       0.04
     53                             1       0.00
     54                           646       0.05
     55                             3       0.00
     56                          2051       0.16
     57                             2       0.00
     58                          2703       0.21  *
     59                             1       0.00
     60                          7432       0.58  ***
     61                             2       0.00
     62                         22573       1.78  **********
     63                             0       0.00
     64                         22217       1.75  **********
     65                             1       0.00
     66                         40797       3.21  *******************
     67                             1       0.00
     68                         51385       4.04  ************************

Note that the odd-numbered brightness values (e.g., 51, 53, 55, etc.) occur very infrequently in the image (1 or 2 times in the entire image), while even values (50, 52, 54, etc.) occur much more often. This shows that there really is one-half the amount of data (every other brightness level) between 0 and 255, or only 128 real shades of gray.

Compare this to a similar section of the MOC histogram:


 Brightness		   # of Pixels   % of Image   Graph of # of Pixels

     40                             0       0.00
     41                             0       0.00
     42                             0       0.00
     43                             2       0.00
     44                             6       0.00
     45                            42       0.00
     46                            94       0.00
     47                           161       0.00
     48                           263       0.00
     49                           387       0.00
     50                           851       0.01
     51                          2207       0.02
     52                          4872       0.05
     53                          9014       0.09
     54                         13674       0.14  *
     55                         18935       0.19  *
     56                         25813       0.26  **
     57                         37456       0.38  ***
     58                         56386       0.57  ****
     59                         91238       0.93  *******
     60                        142126       1.45  ***********
     61                        196481       2.00  ****************
     62                        235086       2.39  *******************
     63                        262813       2.67  *********************
     64                        294254       2.99  ************************
     65                        332896       3.39  ***************************

Note that for MOC, that once values begin to appear, around brightness "42," every brightness value thereafter has an associated large number of occurrences.

Thus, the every-other value nature of the Viking data is responsible for the spacing seen in the histogram. This is the difference between 7- and 8-bit data.

The second attribute of the Viking data, that is, the long "tails" of values, can be seen in another excerpt from the 035A70 table:


 Brightness		   # of Pixels   % of Image   Graph of # of Pixels

    140                           305       0.02
    141                             0       0.00
    142                           318       0.03
    143                             0       0.00
    144                           236       0.02
    145                             0       0.00
    146                           230       0.02
    147                             2       0.00
    148                           234       0.02
    149                             0       0.00
    150                           271       0.02
    151                             0       0.00
    152                           195       0.02
    153                             3       0.00
    154                           170       0.01
    155                             2       0.00
    156                           174       0.01
    157                             2       0.00
    158                           158       0.01
    159                             1       0.00
    160                           209       0.02

Note that every even brightness value has a few hundred occurrences. This is similar to the example given earlier of an image with equal numbers of pixels at all brightnesses. Inspection of the raw images (e.g., see the raw images in http://www.msss.com/education/facepage/face.html) shows "salt and pepper" noise (randomly spaced pixels that are either darker or brighter than their neighbors) that is characteristic of the telecommunications system used during Viking. This noise produces the long "tails" seen in the histogram.

Thus, the second attribute is explained by the noisier communication system of Viking relative to Mars Global Surveyor.

The final attribute is explained by a combination of the two previous explanations. The Viking image histograms are more spread out than the MOC image histograms because (1) the Viking data were "expanded" from 7- to 8-bit during their initial ground processing in 1976 and (2) radio system noise accounts for the longer tails.

Are gray levels missing from the MOC image?

With the background given above, it is possible to address the question of whether or not MOC images are "missing" brightness levels, as has been alleged by some.

Figure 2 shows shows three histograms. The top shows the 8-bit histogram of Viking image 035A70, as described above. The middle shows what that histogram looks like when the low values associated with the every-other nature of the data are removed (thus recreating the "original" 7-bit, 128 gray levels recorded by the Viking camera. Note that the spread in brightnesses is now one-half what it was earlier: the actual spread of brightnesses for 035A70 is seen to be between about 30 and 65-70, or 35-40 shades of gray. The bottom histogram is that from the MOC image, showing a range from about 45 to about 95, or roughly 50 shades of gray.

Figure 2: 7- vs. 8-bit Histograms

Thus, the MOC data are not particularly different from the Viking data. Indeed, the MOC data actually have more gray levels than the Viking images.

Why are there so few gray levels in the Viking and MOC images?

In general, Mars is a low-contrast planet. This means that there are few areas that are really dark and few areas that are really bright, and that really dark and really bright areas usually don't occur next to one another. In fact, most of Mars is relatively bland. However, as noted at the top of this page, brightness depends also on slope and illumination conditions. When setting the exposure for both the Viking and MOC images, people worried about potential slope effects that could make the image too dark or too light, and also about occasional exceptions to the rule that bright and dark things don't occur very often. Thus, they were conservative in setting the controls, giving themselves more room above and below the expected "average" brightness in case something unforeseen was in the picture. By increasing the potential range of brightnesses that would fall between 0 and 255, the actual brightnesses were compressed into a smaller portion of that range. Hence, the images have low contrast, or in other words, narrow histograms.

Conclusion

There are no missing gray levels. The MOC and Viking images are very comparable in terms of the shades of gray they recorded. The primary differences between the images of the "Face on Mars" acquired by Viking and that acquired by MOC is the difference in the illumination direction and sun elevation, and the factor of ten higher spatial resolution of the MOC image. If it doesn't look like a face, it isn't because gray levels are missing.