2018-07-19 06:00 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001445OTB-QgisGeneralpublic2017-08-18 11:02
Assigned Togpasero 
PrioritynormalSeverityminorReproducibilityhave not tried
PlatformOSWindowsOS Version10
Summary0001445: Mean shift segmentation ignoring mask OTB QGIS
DescriptionI'm trying to segment a 3 band image using the meanshift segmentation tool of OTB in QGIS, activating the mask option. Nevertheless, the tool segments the whole image, apparently ignoring the mask. Does anyone knows why? Is there something wrong in the source files or the formats?

The details of the data are:

Base image: GeoTiff 3 band satellite image of Sentinel 2 program. Float32. 954x1337. WGS84 UTM Zone 30N. 14,60 MB. The original satellite image was downloaded and its bands separated using the OTB tool in QGIS "Split Image". The 3 bands of interest were concatenated with "Image concatenation" of the OTB tool in QGIS.

Mask raster: GeoTiff with 1 band. Float 32. 954x1337. WGS84 UTM Zone 30N. 4.87 MB. The mask has been created as follows: Using the segmentation of the whole image (the one that works fine), a vector layer was created, dissolving the polygons of interest in one big polygon (Until this point everything in QGIS). That vector layer was rasterized in ArcGIS, then reclassified to have only values of 10 and -99. Finally, that raster was transformed from the original int8 format to float32 using the Float tool in the 3D Analyst in ArcGIS.

Segmentation parameters: Meanshift segmentation of OTB in QGIS. All parameters set to default. Mask image loaded the previously described file. Tiles size: 2048 (I increased the memory in case that could be the problem but no).

I'm running QGIS 2.18.9. GDAL/OGR 2.2.0, on x64 Windows 10 Pro. Processor Intel Core i7-4790 K 4 GHz. 32 GB Ram.
TagsNo tags attached.
Attached Files




gpasero (administrator)

Reproduced on my laptop without QGIS. It is due to the mask having negative values. You can try with positive mask values, it should work.

I am preparing a patch.


gpasero (administrator)

Fixed in develop :

-Issue History
Date Modified Username Field Change
2017-08-01 12:29 fecapes New Issue
2017-08-17 17:58 gpasero Note Added: 0004256
2017-08-17 17:58 gpasero Assigned To => gpasero
2017-08-17 17:58 gpasero Status new => assigned
2017-08-18 11:01 gpasero Note Added: 0004257
2017-08-18 11:01 gpasero Status assigned => resolved
2017-08-18 11:01 gpasero Resolution open => fixed
+Issue History