registerBrick: Hyperspectral Image Registration (Translation)

View source: R/registerBrick.R

registerBrickR Documentation

Hyperspectral Image Registration (Translation)

Description

Hyperspectral image acquisition normaly causes spatial misalignment between the spectral bands (layers) due to both equipment (such as band-to-band recording delay) and external factors (e.g. sensor vibrations). In this case, a geometric correction is necessary for remote sensing applications such as combining/merging spectral bands. This function uses the HOG (Histogram of Oriented Gradient) descriptor in order to find the optimal translations (xy shift) on multiple 'slave' bands to be spatially align with a 'master' (reference) band. Parallel processing is allowed.

Usage

registerBrick(
  Brick,
  ref_layer = 1,
  layers = "all",
  ncells = 24,
  orient = 8,
  cl = NULL
)

Arguments

Brick

An object of class RasterBrick or RasterStack (from package raster), containing multiple layers (spectral bands).

ref_layer

An integer indicating which layer (spectral band) should be used as reference ('master') to register all the others from. Default is 1, the first band.

layers

Either the character "all" (default), which indicates that all bands should be registered using ref_layer as reference, or a vector of integers specifying which bands to register.

ncells

An integer giving the number of cells to compute the oriented gradients of the HOG descriptor. Default is 24. See OpenImageR::HOG().

orient

An integer giving the number of orientations to compute the oriented gradients of the HOG descriptor. Default is 8. See OpenImageR::HOG().

cl

An integer indicating the number of parallel processes or an object created by parallel::makeCluster(). Default if NULL.

Details

This should be used carefully, as rotation affects the spatial dimensions. The affine parameters are estimated using a general optimization algorithm.

Value

An object of the same classe as the input slave, with the fixed extent.

See Also

OpenImageR::HOG(), registerBand(), registerBand3(), buildBrick()

Examples

path <- system.file('exdata', 'obory.dat', package = 'hyperbrick')
dpath <- system.file('exdata', 'obory_dark.dat', package = 'hyperbrick')
im <- buildBrick(path, hFOV = 36.8, vFOV = 36.8, height = 45,
                 ref_layer = 35, spectral_feature = 'radiance',
                 dark_path = dpath)
print(im)
plotRGB(im, r = 63, g = 34, b = 11, stretch = 'lin')

imreg <- registerBrick(im, ref_layer = 35, layers = c(63, 34, 11))
imreg
plotRGB(imreg, stretch = 'lin')


hyperbrick documentation built on April 1, 2022, 9:07 a.m.