Home

Quick Links

Software Manual
GitHub
API Reference

Documentation Versions

Public Release
8.3.0
8.2.0
8.1.0
8.0.0
7.2.0
7.1.0
7.0.0
6.0.0
3.9.0
3.5.0
USGS

ISIS Application Documentation


blend

Printer Friendly View | TOC | Home

Blends a list of Level2 cubes together along the overlapping areas.

Overview Parameters Example 1

Description

This application is a translation of the Davinci script "blend" (Arizona State University, http://davinci.asu.edu) into ISIS. The blending process itself takes a list of Level2 cubes and blends them together along their overlapping areas by creating a "ramp" from one image to the other.

The ramp-creation process creates a smooth, qualitative transition from one image to the other, and thus modifies pixel values in a manner that does not preserve the scientific integrity of the data. Only the pixel values of the overlapping area are changed, however. Consequently, this application is best suited to blend images that are similar in contrast and/or brightness. As part of the THEMIS mosaicking pipeline, it is customary to use the ISIS application "sigmastretch" (itself a translation of another Davinci script, "sstretch") to reduce and contrast differences between images.

In the "blend" script, each output pixel value is a weighted average of the pixel values taken from the two input images being examined at a time. The closer a pixel is to one image border over the other, the more heavily its value will be weighted in favor of that image.

The "closeness" of a pixel to one image versus another is determined by the aforementioned ramp. The ramp is a map of the overlapping area between two images, where every pixel position in the overlap maps to a value from 0.0 to 1.0. Here, a value of 1.0 means the pixel falls entirely within the first image, and a value of 0.0 means it falls entirely within the second image. Thus, a value of 0.5 would indicate the pixel is equidistant from the borders of the two images.

Once the ramp has been generated, each pixel in the overlap is given a new value by the formula:

        overlap[i] = ramp[i] * image_1[i] + (1.0 - ramp[i]) * image_2[i]
      
where overlap refers to the overlapping area in both images, as both will be adjusted by the same calculation; ramp is the 0.0 to 1.0 map; image_1 is the first image; image_2 is the second image; i is the unique index of the current pixel being adjusted.

This program is conceptually similar to the Isis program "noseam", in that it takes a list of images and attempts to smooth out the boundaries between them. Unlike "noseam", however, "blend" does not perform the mosaicking as part of the blending routine.

The output of this application is a list of images, formatted for easy ingestion into additional Isis mosaicking tools (see "automos" and "mapmos"), where any overlaps between images will share the same pixel values.


Categories


Related Objects and Documents

Applications


History

Travis Addair2011-09-08 Original translation of the Davinci "blend" script into ISIS.
Travis Addair2011-11-30 Added new queue technique to create the ramp, resulting in significant performance gains overall.

Parameter Groups

Files

Name Description
FROMLIST List of cubes to blend
TOLIST List of the blended cubes to be created

Options

Name Description
STOP Maximum number of pixels away from edge to search
ERROR Every image must overlap at least one other
X

Files: FROMLIST


Description

A list of map projected Level2 cubes to blend. The Mapping groups must match in order to sucessfully run this program.

Note that the order of the images in this list can have a significant impact on the output results. The order of blending will proceed in the order of the list, regardless of the actual spatial ordering (in planetary coordinates) of the images.

Each time an image is processed (from the top of the list to the bottom), it is blended with every image that came prior in the list, ensuring that every image gets blended once and only once with every other image. Since every blend of one image to another is a separate operation, pixels that overlap with more than two images can change depending on the order of the blend operations.

Type filename
File Mode input
Close Window
X

Files: TOLIST


Description

This list of output files must contain a file name to correspond to each input file in the FROMLIST. Input files will be associated with output files by index, so that the blended product of the first file in the FROMLIST will be written to the name and location of the first file in the TOLIST, and so on. Each output file will be written to the exact location with the exact name specified, unless the location and name happen to be identical to those of its corresponding input file, in which case the program will terminate and generate an error message.

If this list is not specified, the output files will be placed in the directories of their input files, and the output filename will be a modification of the input filename with an added ".blend" extension (e.g. "foobar.cub" becomes "foobar.blend.cub").

Type filename
File Mode input
Internal Default Automatic
Close Window
X

Options: STOP


Description

Defines how far from image boundaries the "blend ramp" will be calculated between two images. After moving "stop" steps from the image border, all remaining values in the ramp will be considered the same distance from the edge. By choosing a lower value, the algorithm will work much faster, but the ramp will also be much sharper and shorter.

The default value is a sufficiently large number so that the ramp-creation process will calculate distance values for the entire overlapping area for most images. A typical value for this parameter would be 100 for most THEMIS images, generally resulting in a smooth ramp indistinguishable from letting the distance calculation run to completion.

Type integer
Default 100000
Close Window
X

Options: ERROR


Description

Enabling this requires that every image overlap at least one other image. Otherwise, an error will be reported and the program will end.

Type boolean
Default false
Close Window

Example 1

Two Images, Side-By-Side

Description

This example shows the most typical use of the blend application. The input is simply two images laid side by side in map-projected space. The stop value is set to 200 so that the ramp will only be calculated out to 200 pixels from the image boundary.

Command Line

blend fromlist=fromlist.lis stop=200
Specify a list of images to blend along with a stop value, specifying how many "distance steps" to calculate from the image border before stopping. After "stop" number of steps, all remaining values in the ramp will be filled in with the stop value.

GUI Screenshot

The blend GUI

Example GUI

Screenshot of the GUI with parameters set to blend the images in the FROMLIST. Because the TOLIST parameter is set to its default value of "Automatic", each output image will be placed into the directory of its corresponding input image.

Input Image

Mosaic of unblended input images

Mosaic of the input images for blend

Parameter Name: FROMLIST

This is a cropped subsection of the mosaic of the input images before being blended. Note the clear delineation of the two images by the sharp contrast along their overlapping area.

Data File

Links open in a new window.
FROMLIST This list contains the names of two files to be blended together. The file names are separated by new lines.

Output Image

Mosaic showing results of the blend application

Mosaic of the output images for blend

Parameter Name: TOLIST

This is the same subarea of a mosaic of the output images after being blended together. The seam from the "before" mosaic is now gone, and there is a smooth transition from one image to the other, such that they appear to be one continuous image.