View source: R/registerBrick.R
registerBrick | R Documentation |
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.
registerBrick( Brick, ref_layer = 1, layers = "all", ncells = 24, orient = 8, cl = NULL )
Brick |
An object of class |
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 |
ncells |
An integer giving the number of cells to compute the oriented
gradients of the HOG descriptor. Default is 24. See |
orient |
An integer giving the number of orientations to compute the
oriented gradients of the HOG descriptor. Default is 8. See |
cl |
An integer indicating the number of parallel processes or an
object created by |
This should be used carefully, as rotation affects the spatial dimensions. The affine parameters are estimated using a general optimization algorithm.
An object of the same classe as the input slave
, with
the fixed extent.
OpenImageR::HOG()
, registerBand()
, registerBand3()
,
buildBrick()
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')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.