Pansharpening¶
Perform P+XS pansharpening
Description¶
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.
Parameters¶
- Input PAN Image
-inp image
Mandatory - Input panchromatic image.
- Input XS Image
-inxs image
Mandatory - Input XS image.
Output image -out image [dtype]
Mandatory
Output image.
Algorithm -method [rcs|lmvm|bayes]
Default value: rcs
Selection of the pan-sharpening method.
- RCS
Simple RCS Pan sharpening operation. - LMVM
Local Mean and Variance Matching (LMVM) Pan sharpening. - Bayesian
Bayesian fusion.
LMVM options¶
X radius -method.lmvm.radiusx int
Default value: 3
Set the x radius of the sliding window.
Y radius -method.lmvm.radiusy int
Default value: 3
Set the y radius of the sliding window.
Bayesian options¶
Weight -method.bayes.lambda float
Default value: 0.9999
Set the weighting value.
S coefficient -method.bayes.s float
Default value: 1
Set the S coefficient.
Available RAM (MB) -ram int
Default value: 256
Available memory for processing (in MB).
Examples¶
From the command-line:
otbcli_Pansharpening -inp QB_Toulouse_Ortho_PAN.tif -inxs QB_Toulouse_Ortho_XS.tif -out Pansharpening.tif uint16
From Python:
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()