LargeScaleMeanShift not working as I expect

I’m trying to use the LargeScaleMeanShift tool as this first step to carry out some benthic habitat mapping using WorldView 2 data.

This has worked successfully for me with previous analysis so I’m not sure what is happening now.

For some reason I’m getting a large polygon forming over the area of water so sub-surface features aren’t detected.

This is the image that I’m trying to classifiy

This is the result of the segmentation. You see the large polygon over the water area.

The data is fine. This is the result using a segmentation algorithm from GRASS.

I’m not sure why it’s not producing similar results with OTB.

As well as the LargeScaleMeanShift algorithm I’ve also tried with the LSMS workflow using MeanShiftSmoothing then LSMSSegmentation Then LSMSVectorization. This has given me the same results.

Here is a close up from Spatial Filtered Displacement.tif created using MeanShiftSmoothing. I should be able to detect the dredged channels that are clearly present here.

Dear @wkcmark,

Did you try to play with the parameters ?
It might be interesting to try with a smaller value for the range radius (-ranger), so the algorithm will try to differentiate pixels with close radiometry.


Thanks for responding.

Yes I’ve tried the following

Spatial Radius: 5
Range Radius: 15


Spatial Radius: 2
Range Radius: 5

What values would you try?

Well, I would have tried 5 and 5. I am surprised you don’t get better results with 2 ad 5…
You may also want to reduce the Minimum Segment Size (-minsize), but I doubt it will help you in your case…

Yes this is what I can’t understand.

It has worked fine doing similar work in the past.

I am very surprised by your results. On one hand, you have a huge polygon for the underwater area. But on the other hand, the land seems to be over-segmented. I think the low Range Radius was not a good idea.

Maybe you should use different parameters for both areas. You could use a higher value for Range Radius to segment the land. Then use the ExtractROI application to generate a new image containing only the underwater area (use the huge polygon you obtained previously as input with the parameter and try smaller parameters on that new image.

Thanks for your suggestions I will give that a go.

I think I will also extract a small area of water first and see how it works just segmenting that.

Thanks actually I gave your 5 and 5 a go and have got better results now. I’ll play around some more and see where i get.

1 Like