This algorithm allows to fusion images coming from different spectral sensors (e.g., optical-optical, optical and SAR, or SAR-SAR). It is also possible to obtain the contribution (%) of each variable in the fused image.

fusionRS(x, y, stand.varb = TRUE, na.rm = FALSE, verbose = FALSE)

Arguments

x

Optical image. It should be RasterStack or RasterBrick

y

Radar image. It should be RasterStack or RasterBrick

stand.varb

Logical. If TRUE, the PCA is calculated using the correlation matrix (standardized variables) instead of the covariance matrix (non-standardized variables)

na.rm

If TRUE the NA values of the images will be omitted from the analysis

verbose

This parameter is Logical. It prints progress messages during execution

Value

A list with Fused images (RasterStack), Variance, Proportion of variance, Cumulative variance, Correlation and Contribution in percentage.

Note

Before executing the function, it is recommended that images coming from different sensors or from the same sensor have a co-registration.

Examples

if (FALSE) {
library(ForesToolboxRS)
library(raster)

# Load example datasets
data(img_optical)
data(img_radar)

# Fusion of images - optical and radar data
fusion <- fusionRS(x = img_optical, y = img_radar, na.rm = TRUE)
plotRGB(fusion[[1]], 1, 2, 3, axes = FALSE, stretch = "lin", main = "Fused images")
}