calcHistMatch: Illumination correction across scenes using histogram...

Description Usage Arguments Details Value References Examples

Description

This function adjusts the illumination of individual bands across two scenes using a histogram match.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## S4 method for signature 'Satellite'
calcHistMatch(x, target, bcde = NULL, minv = 0L,
  maxv = 1023L, plot = TRUE, use_cpp = TRUE)

## S4 method for signature 'RasterStack'
calcHistMatch(x, target, minv = 0L, maxv = 1023L,
  plot = TRUE, use_cpp = TRUE)

## S4 method for signature 'RasterLayer'
calcHistMatch(x, target, minv = 0L, maxv = 1023L,
  plot = TRUE, use_cpp = TRUE)

Arguments

x

Satellite or raster::Raster* object providing the source band(s) to be adjusted.

target

The target band as raster::RasterLayer.

bcde

Band code which should be alligned

minv

Lower limit of the possible range for transformation (if not provided, defaults to the minimum of both layers).

maxv

Upper limit of the possible range for transformation (if not provided, defaults to the maximum of both layers).

plot

Logical. If TRUE, histogram will be plotted after matching. If FALSE, plotting will be surpressed.

use_cpp

Logical. If TRUE, C++ functionality (via Rcpp) is enabled, which leads to a considerable reduction of both computation time and memory usage.

Details

The function is based on a histogram matching technique described by Morovic et al. (2002).

Value

Satellite object with added atmospheric corrected layers

raster::RasterStack object with atmospheric corrected layers

raster::RasterLayer object with atmospheric corrected layer

References

Morovic J, Shaw J, Sun P-L (2002) A fast, non-iterative and exact histogram matching algorithm. Pattern Recognition Letters 23/1-3: 127-135, doi:10.1016/S0167-8655(01)00107-6.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
path <- system.file("extdata", package = "satellite")
files <- list.files(path, pattern = glob2rx("LC8*.TIF"), full.names = TRUE)
sat <- satellite(files)
target <- getSatDataLayer(sat, "B003n")
 
## Not run: 
## histogram matching
calcHistMatch(sat, target, bcde = "B002n")

## End(Not run)

environmentalinformatics-marburg/satelliteTools documentation built on March 24, 2018, 4:08 a.m.