1

I use QGIS 3.6.1 with the plugin orfeo-toolbox to create a pan-sharped Landsat 8 image. I use the BundleToPerfectSensor function because calling the Pansharpening function results to the error: Inputs are not occupy the same physical space!

The problem is that execution with default parameters is extremely slow - more than 2 hours and 30 minutes (even after adding memory to the OTB plugin - 1024 mb).

How long does it take to you to create a pan-sharp Landsat 8 image using the QGIS OTB plugin?

Do you use the default settings?

My logs:

Processing algorithm… Algorithm 'BundleToPerfectSensor' starting… Input parameters: { 'inp' : 'G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/LC08_L1TP_160017_20180716_20180730_01_T1_B8.TIF', 'inxs' : 'G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/RGB.tif', 'out' : 'G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/PAN_full.tif', 'elev.dem' : '', 'elev.geoid' : '', 'elev.default' : 0, 'mode' : 'default', 'method' : 'bayes', 'method.bayes.lambda' : 0.9999, 'method.bayes.s' : 1, 'lms' : 4, 'interpolator' : 'nn', 'fv' : 0, 'outputpixeltype' : 1 } 2019-10-17 17:20:57 (INFO): No kwl metadata found in file G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/RGB.tif 2019-10-17 17:20:57 (INFO): No kwl metadata found in file G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/LC08_L1TP_160017_20180716_20180730_01_T1_B8.TIF 2019-10-17 17:20:57 (INFO): Default RAM limit for OTB is 1024 MB 2019-10-17 17:20:57 (INFO): GDAL maximum cache size is 812 MB 2019-10-17 17:20:57 (INFO): OTB will use at most 8 threads 2019-10-17 17:20:57 (INFO): Reproject XS onto Pan... 2019-10-17 17:20:57 (INFO): Elevation management: setting default height above ellipsoid to 0 meters 2019-10-17 17:20:57 (INFO): Fusion of XS and Pan... 2019-10-17 17:20:57 (INFO): Bayesian fusion algorithm 2019-10-17 17:20:57 (INFO): Estimated memory for full processing: 12196.3MB (avail.: 1024 MB), optimal image partitioning: 12 blocks 2019-10-17 17:20:57 (INFO): File G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/PAN_full.tif will be written in 13 blocks of 16361x1270 pixels 2019-10-17 17:32:17 (INFO): Estimation will be performed in 11 blocks of 16361x1501 pixels 2019-10-17 20:04:20 (INFO): Estimated memory for full processing: 10136.5MB (avail.: 1024 MB), optimal image partitioning: 10 blocks 2019-10-17 20:04:20 (INFO): Estimation will be performed in 11 blocks of 16361x1501 pixels 2019-10-17 22:37:53 (INFO): Estimated memory for full processing: 13226.1MB (avail.: 1024 MB), optimal image partitioning: 13 blocks 2019-10-17 22:37:53 (INFO): Estimation will be performed in 14 blocks of 16361x1179 pixels``` 2019-10-18 01:14:02 (INFO): Estimated memory for full processing: 5149.29MB (avail.: 1024 MB), optimal image partitioning: 6 blocks 2019-10-18 01:14:02 (INFO): Estimation will be performed in 7 blocks of 16361x2358 pixels Execution completed in 37821.38 seconds Results: {'out': 'G:/!DELETE/testing_pansharp/LC08_L1TP_160017_20180716_20180730_01_T1/PAN_full.tif'} Loading resulting layers Algorithm 'BundleToPerfectSensor' finished

4
  • (I use Monteverdi, not QGIS-OTB so this may be different) Usually I do it in two steps: 1- Superimpose, 2- Pansharpening. OTB is fussy about grid alignment. I can give only 256Mb of RAM but it works anyway. – Kazuhito Oct 17 '19 at 12:45
  • @Kazuhito How long does it take to complete a single scene? – Comrade Che Oct 17 '19 at 12:47
  • 1
    For a scene of L8(B4/B3/B2+B8), Composite: 37 sec, Superimpose 258 sec, Pansharpen 190 sec. (Windows10 on Intel Core i5, 2.0 GHz, 2 cores, 4GB RAM). – Kazuhito Oct 17 '19 at 13:20
  • 1
    @Kazuhito It took more than 2.5 horus to complete with BundleToPerfectSensor function. My PC is faster than yours: i7-3770 CPU @ 3.40Ghz, 4 cores, 16 GB RAM. OTB Results are: Composite: 11 sec, Superimpose 78 sec, Pansharpen 142 sec. Perhaps sometning wrong with the QGIS OTB Plugin. I will create issue for this problem. Thx for you comments. – Comrade Che Oct 18 '19 at 5:06
1

RCS method (default) is fast, but poor result. Bayes method is better, but the price to pay is the processing time. The pansharpening application requires that the xs image is resampled on the same physical grid as pan. The BundleToPerfectSensor performs the resampling and the pansharpening in one pass.

1

Perhaps this is a bug because execution BundleToPerfectSensor with OTB's mapla.bat took only 359 seconds.

Here is my issue for this bug: https://gitlab.orfeo-toolbox.org/orfeotoolbox/qgis-otb-plugin/issues/35

4
  • When you run through command line, do you set any -ram parameter ?. – rkm Oct 22 '19 at 10:07
  • @rkm No. But when I run with OTB - Yes, I set memory to 1024. – Comrade Che Oct 22 '19 at 10:54
  • IIUC, if using mapla.bat, you don' set any RAM parameter but using QGIS you set it. Is that correct ?. If so please try to unset RAM parameter in Settings -> Processing -> Providers -> OTB. You can unset either by clear the value of field or setting it to a value < 256. – rkm Oct 22 '19 at 12:53
  • @rkm I did what you asked, and I confirm that it still takes more than 20 minutes to process one Landsat 8 scene. (I stop the process because can't wait anymore). – Comrade Che Oct 23 '19 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.