Perform P+XS pansharpening
This application performs P+XS pansharpening. Pansharpening is a process of merging high-resolution panchromatic and lower resolution multispectral imagery to create a single high-resolution color image. Algorithms available in the applications are: RCS, bayesian fusion and Local Mean and Variance Matching(LMVM).
This application has several output images and supports “multi-writing”. Instead of computing and writing each image independently, the streamed image blocks are written in a synchronous way for each output. The output images will be computed strip by strip, using the available RAM to compute the strip size, and a user defined streaming mode can be specified using the streaming extended filenames (type, mode and value). Note that multi-writing can be disabled using the multi-write extended filename option: &multiwrite=false, in this case the output images will be written one by one. Note that multi-writing is not supported for MPI writers.
- Input PAN Image
- Input panchromatic image.
- Input XS Image
- Input XS image.
-out image [dtype] Mandatory
-method [rcs|lmvm|bayes] Default value: rcs
Selection of the pan-sharpening method.
Simple RCS Pan sharpening operation.
Local Mean and Variance Matching (LMVM) Pan sharpening.
-method.lmvm.radiusx int Default value: 3
Set the x radius of the sliding window.
-method.lmvm.radiusy int Default value: 3
Set the y radius of the sliding window.
From the command-line:
otbcli_Pansharpening -inp QB_Toulouse_Ortho_PAN.tif -inxs QB_Toulouse_Ortho_XS.tif -out Pansharpening.tif uint16
import otbApplication app = otbApplication.Registry.CreateApplication("Pansharpening") app.SetParameterString("inp", "QB_Toulouse_Ortho_PAN.tif") app.SetParameterString("inxs", "QB_Toulouse_Ortho_XS.tif") app.SetParameterString("out", "Pansharpening.tif") app.SetParameterOutputImagePixelType("out", 3) app.ExecuteAndWriteOutput()