View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001370Orfeo Toolbox (OTB)Generalpublic2017-03-16 12:502017-04-05 10:08
Assigned Topoughov 
PlatformLinuxOSUbuntuOS Version16.04
Summary0001370: Segmentation algorithm doesn't segment the whole image
DescriptionWhen running the otbcli_segmentation shell script, the algorithm doesn't perform the segmentation across the whole image. Sometimes I receive the error:

2017 Mar 16 11:30:06 : Application.logger (INFO) Using watershed segmentation.

2017 Mar 16 11:30:06 : Application.logger (INFO) Large scale segmentation mode which output vector data

Computing watershed segmentation: 33% [**************** ]2017 Mar 16 11:30:27 : Application.logger (FATAL) The following error occurred during application execution : /home/mrashad/dashboard/otb/install-stable/include/ITK-4.10/itkWatershedSegmentTreeGenerator.hxx:437:
itk::ERROR: itk::watershed::SegmentTreeGenerator::MergeSegments:: An unexpected and fatal error has occurred. This is probably the result of overthresholding of the input image.

However, sometimes it reaches 100%, but still produces the same result.

I've tested this on the watershed and meanshift algorithms getting the same error both times.

I had this issue with Pleiades imagery on a much smaller scale, but it is a much larger issue when dealing with Worldview 3 imagery.

Is this a known issue, or is there a parameter I should be adding?
Steps To Reproducewv3_segimg = "/home/williamray/Documents/Building_Recognition/Worldview3/Mexico/image_clip.tif"
segments = "segments.shp"
wv3_segs = "wv3_segs.kea"
# segmentation

os.system("/home/williamray/OTB-5.8.0-Linux64/bin/otbcli_Segmentation -in %s -mode.vector.out %s -filter meanshift" %(wv3_segimg, segments))

    os.system("gdal_rasterize -a DN -tr 2 2 -ot UInt32 -of KEA %s %s" %(segments, wv3_segs))

    rastergis.populateStats(wv3_segs, True, True)
TagsNo tags attached.
Attached Filesjpg file icon Segmentation.JPG [^] (122,918 bytes) 2017-03-16 12:50

- Relationships

-  Notes
Ludovic (developer)
2017-03-20 10:36


I tried to reproduce your problem with WorldView2 and Pleiades images, but without success.

Could you give us your images where the problem is present (Pleiades or Worldview3) with a link to an host (since the limit on Mantis is of ~2MB) or even the steps to recreate your input data ?

wray_qurus (reporter)
2017-03-22 12:15

Unfortunately, due to licensing I can't share the imagery. I have played around with several parameters and am getting more stable results now. I believe it is a combination of the area of interest extent, the number of bands and the resolution of the imagery I'm using.
Ludovic (developer)
2017-03-23 11:09

It is unfortunate, but is it possible to reproduce this bug with images publicly available?

I know that its can take you some time to reproduce this bug with other data, but without that I am not able to fix the problem.

Nevertheless, I am glad that you have find a work around to perform full image segmentation.
poughov (administrator)
2017-04-05 10:08

Changing to "feedback". We can't investigate unless able to reproduce.

- Issue History
Date Modified Username Field Change
2017-03-16 12:50 wray_qurus New Issue
2017-03-16 12:50 wray_qurus File Added: Segmentation.JPG
2017-03-17 11:37 Ludovic Status new => acknowledged
2017-03-20 10:36 Ludovic Note Added: 0004072
2017-03-22 12:15 wray_qurus Note Added: 0004076
2017-03-23 11:09 Ludovic Note Added: 0004078
2017-04-05 10:08 poughov Note Added: 0004088
2017-04-05 10:08 poughov Assigned To => poughov
2017-04-05 10:08 poughov Status acknowledged => feedback

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker