3.4 Working with images
3.4 Working with images
In the Image and Mosaic views you can create color composite images, apply a set of contrast stretch and filter operations, overlay data from range maps and other instruments onto the images that you are viewing, and optionally export your image analysis work as image files. In this section we will discuss each of these features in detail.
3.4.1 Creating color composite images
There are two primary tools for creating color tools for creating color composite images in the Image view: Define Bands and Define Band Range. These tools let you specify a combination of image bands for each of the red, green and blue channels of the resulting image.
Define Bands
When an Image view is first opened, you can see the default color band(s) of the currently displayed image. With the Define Bands tool, you can create a color composite image from multiple bands (as in Figure 3.6). To use the Define Bands tool, select Define Bands from the Action menu. This will display the Define Bands dialog, as shown in Figure 3.7.
At the top of the dialog you see listed the list of available images in the view (left2, left5, left6). At the bottom there are the equation fields labeled Red, Green, and Blue. By default, these fields all contain the same equation (left[1]). Now we will show how you can enter you own equations to define an RGB composite image.
The format of the equations allows you specify arithmetic combinations of
image bands. You can define an arithmetic combination using the following
operators:
| + | Add together two image bands, such as left1 + left2, or an image band and a constant, such as left1+42 |
| - | Subtract two image bands, such as left5 - left2, or an image band and a constant, such as left1 - 0.5 |
| * | Multiply two image bands, such as left1 * left2 or an image band and a constant, such as left2 * 1.25 |
| / | Divide two image bands, such as left5 / left2 or an image band by a constant, such as left1 / 1.33 |
| ( ) | Group a set of operations parenthetically to specify a particular evaluation order, such as 0.3*(left1+left2+left3) |
The image band terms that you combine with the operators are formatted according to
where imageName is one of the names of available images in the upper part of the Define Bands dialog, and bandNumber may range from 1 to the total number of bands in the image. (The number of bands in the image is given in the Downlink info pane.) Most of the time you may be interested in writing equations using only one particular image, but sometimes combinations of different images can be useful.
To see the result of your image composite equations, specify an equation for each
of the red, green, and blue channels and click the Ok button. The image will
recompute its appearance. To return to the image to its original appearance, select
an image from the Image menu to revert the display.
![]() |
| For Pancam images, you can also use the familiar Pancam filter naming convention in band equations, for example (L2+L5-L6)*0.5, which is equivalent to (left2+left5+left6)*0.5. L1 through L8 and R1 through R8 are valid, depending on what filters are available in a given dataset. The Define Bands dialog lists all the available filters in the area at the top of the dialog. |
Define Band Range
The second tool for creating color composite images is the Define Band Range dialog. This tool lets you quickly define red, green, and blue color components with menus and spinner controls. It is particularly useful for averaging a set of adjacent bands and assigning the result to a color channel.
To use the Define Band Range dialog, select Define Band Range from the Action menu. The dialog is split into three panels from left to right, one for the red, green, and blue channel of the composite image (see Figure 3.8). At the top of each channel control panel you select the image to use. Next, for the selected image you set the minimum and maximum band index to use. If you set the minimum value to be the same as the maximum value, then only that band of the image will be assigned to that color. If you specify a range of bands (max ¿ min), then that color will be computed by averaging the brightness of all the bands in the range.
As you select the band ranges for each color channel, the Image view display will automatically update to view the newly defined composite image as you work. When the image finally looks as you want it to, close the dialog or click the Dismiss button to continue working. To return to the image to its original appearance, select an image from the Image menu to revert the display.
3.4.2 Stretching

The Contrast Adjuster dialog shows you the image preview (upper-right), the histogram (lower-right), and the stretch tool panel (left). If the image appears too dark or too bright, you can brighten or darken the image by dragging the red, diamond-shaped handles in from the left and right as shown in Figure 3.9.
As you drag these handles, the vertical lines on the histogram that indicate the range of brightness that they represent track with them, and the overall brightness and contrast of the preview image will change. To temporarily apply the current stretch to the full-size image, click the Apply button. To cancel a stretch that isn’t to your liking, click the Cancel button. To commit your stretch operation, click the Ok button.
Within the brightness range of the stretch you can change the stretch curve from a line to any type of curve you like by adding control points and moving them around. To add a control point on the stretch curve, click on the curve with the mouse. You can drag a control point anywhere on the curve that you like to define the shape of the curve. You can add more points by clicking on other parts of the curve, and you can remove a control point by dragging it onto another point or off of the curve area. The first and last control points (located on the left and edges of the curve area, below and above the diamond-shaped handles) are special: they control the overall brightness of the curve, and when you drag them up or down, all of the other control points move with them.
In addition to defining your own curves by directly manipulating the stretch
curve, the following tools let you specify particular kinds of stretches:
|
| Linear interpolation: connect all stretch curve control points with straight lines |
|
| Smooth interpolation: connect all stretch curve control points a cubic spline curve |
|
| Linear mapping: place all control points in a straight line |
|
| Gamma mapping: place all control points on a gamma curve. Takes an argument of exponent to the gamma function. Suggested range: 0.25 to 2.5 |
|
| Square root mapping: place all control points on a square root curve (also equivalent to a gamma with exponent value of 2) |
|
| Log mapping: place all control points on a logarithmic curve |
|
| Increase contrast: places the minimum and maximum brightness value limits closer together, increasing overall contrast |
|
| Reduce contrast: spreads out the minimum and maximum brightness value, reducing overall contrast |
By default the Contrast Adjuster dialog is configured to stretch the image with the same stretch in all 3 bands. To independently stretch the image in each the of red, green, and blue channels, select the Three Channels button at the bottom left of the dialog. The Contrast Adjuster will resize to display three channel control panels colored red, green, and blue according to their corresponding color channels. You can return to the single stretch curve mode by selecting the One Channel button in the lower left of the dialog.
3.4.3 Filtering
You can apply various filters to an imagecube to improve or enhance its appearance.
The filters available in Maestro are:
To apply a filter to an image, select it from the Action-¿Filters menu or from the toolbar. You can apply any number of filters in any order you need to enhance an image. The Undo tool lets you undo a filter if you aren’t happy with how it changed the image. You can Undo a filter by selecting Undo from the Action menu or the toolbar.

Anaglyph stereo
For stereo image pairs it is often useful to view the image pair in 3D using red-blue stereo glasses (see Figure 3.10). The Anaglyph Stereo tool is a shortcut for creating a color composite images using the left and right image of a stereo pair. To use the Anaglyph Stereo tool, select Anaglyph Stereo from the Action menu. This will display a left-blue, right-red anaglyph image that you can view in 3D with red-blue anaglyph stereo glasses (red over the left eye and blue over the right).
3.4.4 Overlaying onto images
Maestro can overlay information such as 3D positions or data from other instruments onto images. In the following sections we explain how to use each of these features in more detail.
Range overlay
To visualize the distance to each point as a color overlay, select the Overlay Range menu item on the Action-¿Overlay menu. This action will overlay a color map onto the image. The overlay is colored varying from green to blue to red, where green pixels are close to the rover, blue are further away, and red is furthest (see Figure 3.11 for example). Wherever there is no color in the overlay there is no 3D position information available.
Elevation overlay
To visualize the distance to each point as a color overlay, select the Overlay Elevation menu item on the Action-¿Overlay menu. This action will overlay a color map onto the image. The overlay is colored varying from green to blue to red, where green pixels are lowest, blue are higher, and red is highest. Wherever there is no color in the overlay there is no 3D position information available.
Coregistration overlay
You can overlay images from different instruments using the coregistration feature. This is useful for determining placement of Mini-TES spectra relative to a Pancam, Navcam, or Hazcam image or mosaic (see Figure 3.12).
The Image view and ImageCube view each have a Coregistration overlay drag icon in the view pane title bar. If you click on this icon and drag it onto another Image view or Mosaic view, this will produce a coregistration overlay in the view you drop onto.

You can overlay any image that has the Coregistration Overlay drag icon in the view title bar. (To have the icon, the image must have a camera model that Maestro recognizes.) You can drag onto any image or mosaic that has a range map to provide 3D information. The coregistration overlay then takes every 3D position in the destination view and projects it into the camera model of the first view and copies the color in the image onto the coregistration overlay.
The Coregistration overlay procedure takes only a few seconds to run when overlaying camera images. When overlaying a Mini-TES imagecube onto a single image the overlay takes a little longer. When overlaying a Mini-TES imagecube onto a Mosaic view, the overlay can take 5 or more minutes to complete. For this reason, when you drag a Mini-TES imagecube onto a Mosaic view, a dialog (see Figure 3.13) pops up to ask you if you really want to perform this lengthy operation.
![]() |
| Expert note: The determination of where overlaid images are coregistered is usually made using range map data for greater accuracy. However, sometimes range maps do not provide complete coverage of an area you want to overlay onto. You can direct the coregistration overlay to assume range at infinity in these cases by checking the “Coregistration range at infinity” check box menu item in the Browser menu, after which any coregistration overlays that you run will always assume range at infinity. Note that this will produce overlays that are not accurate for locations near to the rover. |
Overlay transparency slider
When you are viewing an overlay of range, elevation, or coregistration, you see a blend of the overlay with the background image. It is often useful to vary the transparency of the overlay to see more or less of the overlay image than the background image. You can do this by dragging the Overlay transparency slider located on the toolbar (see Figure 3.14). The slider is originally positioned at 50% overlay transparency to show the overlay and background equally. As you drag the slider to the right, the background dims and the overlay brightens. As you drag the slider to the left, the background image gets brighter and the overlay becomes more transparent.
3.4.5 Displaying the image header
You can display the header of a PDS image in an Image view or ImageCube view by selecting the Show Header menu item in the Action menu. The header is displayed in a separate window (see Figure 3.15).
3.4.6 Exporting the image
The image that is displayed in the Image view can be exported as a JPEG or TIFF
image file. To export, select one the following options on the Action-¿Save Image
menu:
| JPEG (100%) | Save in JPEG file format using 100% quality, resulting in low loss of data and a large file size |
| JPEG (75%) | Save in JPEG file format using 75% quality, resulting in lossy compression of data and a small file size |
| TIFF | Save TIFF in file format with no loss of data and a large file size |
A Save file chooser will be displayed, in which you can select the folder and enter the filename of the image file to export.
















