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)
Optical image. It should be RasterStack or RasterBrick
Radar image. It should be RasterStack or RasterBrick
Logical. If TRUE
, the PCA is calculated using the correlation
matrix (standardized variables) instead of the covariance matrix (non-standardized variables)
If TRUE
the NA values of the images will be omitted from the analysis
This parameter is Logical. It prints progress messages during execution
A list with Fused images (RasterStack), Variance, Proportion of variance, Cumulative variance, Correlation and Contribution in percentage.
Before executing the function, it is recommended that images coming from different sensors or from the same sensor have a co-registration.
if (FALSE) { # \dontrun{
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")
} # }