OTB error message in QGIS

Hi everyone,

I am using LargeScaleMeanShift tool in QGIS to perform object-based image segmentation on Worldview-2 imagery. I tried this tool several times but got the following error message. Could anyone please help me out with doing segmentation? Thank you in advance.

QGIS version: 3.8.0-Zanzibar

QGIS code revision: 11aff65f10

Qt version: 5.11.2

GDAL version: 2.4.1

GEOS version: 3.7.2-CAPI-1.11.0 b55d2125

PROJ version: Rel. 5.2.0, September 15th, 2018

Processing algorithm…

Algorithm ‘LargeScaleMeanShift’ starting…

Input parameters:

{ ‘in’ : ‘F:/SJRWM/Buck_Lake_Small_Imagery/Buck_Lake.tif’, ‘spatialr’ : 50, ‘ranger’ : 50, ‘minsize’ : 100, ‘tilesizex’ : 500, ‘tilesizey’ : 500, ‘mode’ : ‘vector’, ‘mode.vector.imfield’ : None, ‘mode.vector.out’ : ‘F:/SJRWM/Test/test_1.shp’, ‘cleanup’ : True, ‘outputpixeltype’ : 2 }

ERROR 4: Attempt to create new tiff file `test_1_0_0_SEG.tif’ failed: Permission denied
2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: Default RAM limit for OTB is 256 MB

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: GDAL maximum cache size is 1631 MB

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: OTB will use at most 8 threads

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: Smoothing step…

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: Margin of 5001 pixels applied to each tile to stabilized mean shift filtering.

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: Mode Search is disabled.

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: Number of tiles: 17 x 14

2021-03-05 13:28:25 (INFO) LargeScaleMeanShift: Tile shifting …

2021-03-05 13:31:33 (INFO): File test_1_0_0_SEG.tif will be written in 1 blocks of 501x501 pixels

2021-03-05 13:31:33 (FATAL) LargeScaleMeanShift: itk::ERROR: GDALImageIO(00000203FB90EB50): Attempt to create new tiff file `test_1_0_0_SEG.tif’ failed: Permission denied

Execution completed in 188.14 seconds


{‘mode.vector.out’: ‘F:/SJRWM/Test/test_1.shp’}

Loading resulting layers

Algorithm ‘LargeScaleMeanShift’ finished


I have had something similar to this before. If I remember correctly I changed my target directory and the image saved. Have you tried this already?

Good luck!

Hi Path.

I just tried with a different target directory but didn’t work. Please note that I am using QGIS Desktop 3.8.0 with OTB version 7.2.0. I found that there is a compatibility issue between QGIS Desktop 3.8.0 with OTB version 7.2.0. Do you suggest me to install an updated version of QGIS? Thank you very much for your reply.

As you said, OTB 7.2.0 is not compatible with QGIS 3.8. It would be better to update to the latest LTR (3.16).

Refer here for the QGIS-OTB compatibility matrix

My problem has been solved by reinstalling QGIS 3.16. However, I got some temp files on my desktop. Do anyone knows why do these temporary files are located on the desktop. thank you. .