2017-12-18 23:02 CET

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0001445OTB-QgisGeneralpublic2017-08-18 11:02
Reporterfecapes 
Assigned Togpasero 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusresolvedResolutionfixed 
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

-Relationships
+Relationships

-Notes

~0004256

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.

~0004257

gpasero (administrator)

Fixed in develop :
https://git.orfeo-toolbox.org/otb.git/commit/d2a6d12a6b141cb0a3a8c989cd74e8665582052a
+Notes

-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