Parameters in LargeScaleMeanshift vs. those in the chain

Considering that otbcli_LargeScaleMeanShift “chains together the 4 steps of the MeanShift framework, that is the MeanShiftSmoothing, the LSMSSegmentation, the LSMSSmallRegionsMerging and the LSMSVectorization”, but only 1 spatialr parameter and 1 ranger parameter are
required, are “these good values” enforced?

In the example:
otbcli_LargeScaleMeanShift -in QB_1_ortho.tif -spatialr 4 -ranger 80 -minsize 16 -mode.vector.out regions.shp

do the parameters correspond to those in the MeanShiftSmoothing step or in the LSMSSegmentation step?

That is:
MeanShiftSmoothing step: spatialr=4 and ranger=80
LSMSSegmentation step : spatialr=2 and ranger=40
or
MeanShiftSmoothing step: spatialr=8 and ranger=160
LSMSSegmentation step : spatialr=4 and ranger=80

?

Theses are the parameters for the smoothing step. During the process, they are divided by 2 and transmitted to the segmentation step.

Thanks, perhaps this should be clarified in the text, eg:

Spatial radius -spatialr int Default value: 5
Radius of the spatial neighborhood for averaging in the Mean shift smoothing step and divided by 2 in the segmentation step. Higher values will result in more smoothing and higher processing time.

I observe I had an error in my message, I have edited it.
I understand
otbcli_LargeScaleMeanShift -in QB_1_ortho.tif -spatialr 4 -ranger 80 -minsize 16 -mode.vector.out regions.shp

corresponds to:
MeanShiftSmoothing step: spatialr=4 and ranger=80
LSMSSegmentation step : spatialr=2 and ranger=40

The otbcli_LargeScaleMeanShift command combines multiple steps of the MeanShift framework, including MeanShiftSmoothing, LSMSSegmentation, LSMSSmallRegionsMerging, and LSMSVectorization. When using this command, you only need to provide values for the spatialr and ranger parameters, and these values are used throughout the entire process.

In your provided example:

bashCopy code

otbcli_LargeScaleMeanShift -in QB_1_ortho.tif -spatialr 4 -ranger 80 -minsize 16 -mode.vector.out regions.shp

The spatialr parameter corresponds to the smoothing scale (spatial radius) used in both the MeanShiftSmoothing step and the LSMSSegmentation step. Similarly, the ranger parameter corresponds to the range (color radius) used in both steps.

So, in your example:

  • MeanShiftSmoothing step: spatialr=4 and ranger=80
  • LSMSSegmentation step: spatialr=4 and ranger=80

The values you provide for spatialr and ranger are used consistently across the MeanShift framework steps in otbcli_LargeScaleMeanShift.