ENVINNDiffusePanSharpeningRaster

This function creates an ENVIRaster to which NNDiffuse pan sharpening has been applied. It is the pan sharpened result of (LowResRaster and HighResRaster).

NNDiffuse pan sharpening works best when the spectral response function of each multispectral band has minimal overlap with one another, and the combination of all multispectral bands covers the spectral range of the panchromatic raster.

The following are input raster requirements for running the NNDiffuse pan sharpening algorithm:

Reference:

Sun, W., B. Chen, and D.W. Messinger. "Nearest Neighbor Diffusion Based Pan Sharpening Algorithm for Spectral Images." Optical Engineering 53, no. 1 (2014).

The result is a virtual raster, which has some additional considerations with regard to methods and properties. See Virtual Rasters for more information, including how they differ from ENVITasks.

The equivalent task is NNDiffusePanSharpening.

Example

The following code opens a low resolution multi-band raster and a high-resolution panchromatic raster and performs nearest neighbor diffusion (NNDiffuse) pan sharpening. It saves the output to a multi-band raster with higher resolution as ENVI format and displays the result.

; Start the application

e = ENVI()

 

; Open low-resolution raster and high-resolution raster input files

lowResFile = Filepath('qb_boulder_msi', Subdir=['data'], $

Root_Dir=e.Root_Dir)

lowResRaster = e.OpenRaster(lowResFile )

highResFile = Filepath('qb_boulder_pan', Subdir=['data'], $

Root_Dir=e.Root_Dir)

highResRaster = e.OpenRaster(highResFile)

 

; Create the NNDiffuse pan sharpening raster

nnDiffusePanSharpeningRaster = ENVINNDiffusePanSharpeningRaster(lowResRaster, highResRaster, $

SPATIAL_SMOOTHNESS=2.5, INTENSITY_SMOOTHNESS=20)

 

; Save it as ENVI format

newFile = e.GetTemporaryFilename()

nnDiffusePanSharpeningRaster.Export, newFile, 'ENVI'

 

; Open the pan sharpened raster

nnDiffusePanSharpenedRaster = e.OpenRaster(newFile)

 

; Display the pan sharpened result

view = e.GetView()

layer = view.CreateLayer(nnDiffusePanSharpenedRaster)

Syntax

Result = ENVINNDiffusePanSharpeningRaster(Low_Resolution_Raster, High_Resolution_Raster [, Keywords=value])

Return Value

This routine returns an ENVIRaster.

Arguments

Low_Resolution_Raster

The low-resolution raster.

High_Resolution_Raster

The high-resolution raster, which must be a single-band raster.

Methods

This virtual raster inherits methods and properties from ENVIRaster; however the following methods will override the ENVIRaster methods:

Dehydrate

Hydrate

ENVINNDiffusePanSharpeningRaster is read-only, so the SetData, SetTile, and Save methods do not apply.

Properties

See ENVIRaster properties.

Keywords

ENVINNDiffusePanSharpeningRaster inherits all properties from ENVIRaster. In addition, the following properties are unique to ENVINNDiffusePanSharpeningRaster.

NAME

Specify a string that identifies the raster.

PIXEL_SIZE_RATIO

A scalar number that defines the pixel size ratio of the low-resolution raster and the high-resolution raster. The NNDiffuse pan-sharpening algorithm requires that the pixel size ratio be an integer. If this property is not set, the value is determined from the metadata of the input rasters. For example, the pixel size of Ikonos low-resolution MSI data is 4 meters, and the pixel size of Ikonos high-resolution Pan data is 1 meter. The ratio is 4/1, so the value is 4.

SPATIAL_SMOOTHNESS

A positive number that defines the spatial smoothness factor (σs) of the NNDiffuse pan sharpening algorithm. SPATIAL_SMOOTHNESS should be set to a value that will resemble a bicubic interpolation kernel. The default value is PIXEL_SIZE_RATIO x 0.62.

INTENSITY_SMOOTHNESS

A positive number that defines the intensity smoothness factor (σ) of the NNDiffuse pan sharpening algorithm. A smaller INTENSITY_SMOOTHNESS value will restrict diffusion and produce sharper images, but will have more noise. For example, a smaller value is good for pan sharpened images that will be used for visualization. A larger INTENSITY_SMOOTHNESS value will produce smoother results with less noise, which is suggested for images that will be used for classification and segmentation purposes. A larger value is also suggested for panchromatic scenes with high contrast (they require less diffusion sensitivity), and with complex scenes (to reduce the possibility of noise). The default is to dynamically adjust to local similarity, as shown in the equation that follows. You can enter a value to override the default, for example, a value in the range 10 x √2 to 20.

where Nj is the difference factor of the nine neighbors given by the following equation:

where Ωj (x,y) defines the diffusion region for each of the nine neighboring super pixels, and (x,y) denotes the position of a pixel in the high-resolution coordinate.

Version History

ENVI 5.2

Introduced

ENVI 5.3.1

Documented the dehydrated form of this virtual raster

ENVI 5.4

Added Dehydrate and Hydrate methods; added NAME keyword

API Version

4.2

See Also

ENVIRaster, NNDiffusePanSharpening Task