Le 07/09/2016 à 09:12, Jiří Fejfar a écrit :
Dear Manuel, Agus, users
I have found very useful also to read Comaniciu and Meer paper Mean
Shift: A Robust Approach Toward Feature Space Analysis
<http://ieeexplore.ieee.org/document/1000236/?tp=&arnumber=1000236>
(possible to find here
<https://courses.csail.mit.edu/6.869/handouts/PAMIMeanshift.pdf>). It
is describing general mean-shift as well as *joint domain of spectral
and spatial features*. From both papers I can conclude now (please
correct me, where I am wrong):
there are 2 steps:
* *filtering* / filtering step -- 1st step of LSMS
* described in [1, section 4.1], [2, section IV.B p. 957 and section
IV.D p. 958], [2, section 5.B.1 p. 960]
* here spatial and range radius (*h_s* and *h_r* in [2]) control the
*bandwidth of a kernel* (eq. 35 of Comaniciu paped) -- it select
"close" pixels (spectrally and spatially) to compute mean shift vector
directing to mode in each iteration
* *segmentation* / grouping step -- 2nd step of LSMS
* described in [1, section 4.2], [2, section IV B p. 957 and section
IV D p. 958], [2, section 5.B.2 p. 960]
* here spatial and range radius (*h'_s* and *h'_r* in [2]) control
which *mode(s) selection* resp. which mode(s) will represent the
(unknown) pixel (in [1] mentioned as "Significant mode" on p. 612) (in
[2] mentioned as spatial modes closer than h_s and spectral modes
closer than h_r on p. 957 and denoted as h'_s and h'_r in step 2 on p.
958)
But I still do not fully understand 2 band raster "displacement map"
resulting from 1st step of LSMS.
The displacement map correspond to the 2D offset of the estimated mode
wrt the origin pixel position. So if you have a uniform regions, pixels
near the border will converge away from it. This should be clear in [2].
During the segmentation step, h_s will operate on this displacement map.
I have one more question... in [1] there is mentioned, that some
transformation (L*u*v or L*a*b) may be necessary to correctly
represent color data. Is such a transformation implemented in 4 step
LSMS? Resp. I am segmenting 3 bands raster composed from spring resp.
summer resp. autumn NDVI bands... Those values are from <-1; 1> not
<0; 255> like some RGB. Should I perform some transformation? Because
my ranger need to be typically very small (0.02) and pixel values in
"displacement map" has 0 very often.
You are right.The LSMS tools do not do anything regarding multi-band
normalisation. Why ? Because we do not know what we will receive as
input. Maybe it is raw DN, or maybe it is calibrated data, or maybe its
is radiometric indices. It is up to the user to ensure that input bands
ranges are of comparable importance. Luv or Lab does not make much sense
with 4 spectral bands or with radiometric indices, but a good thing to
do is to center-reduce each band (mean = 0 and stddev =1).
cited papers:
[1] Dorin Comaniciu and Peter Meer. 2002. Mean Shift: A Robust
Approach Toward Feature Space Analysis. /IEEE Trans. Pattern Anal.
Mach. Intell./ 24, 5 (May 2002), 603-619.
DOI=http://dx.doi.org/10.1109/34.1000236
[2] Michel J, Youssefi D, Grizonnet M. 2015. Stable mean-shift
algorithm and its application to the segmentation of arbitrarily large
remote sensing images /Ieee Transactions On Geoscience and Remote
Sensing/. 53: 952-964. DOI: 10.1109/TGRS.2014.2330857
<http://doi.org/10.1109/TGRS.2014.2330857>
Best regards, Jiří.
On Tuesday, 6 September 2016 15:50:58 UTC+2, Jiří Fejfar wrote:
Dear Manuel, Agus
I am trying to understand all those parameters in 4 step LSMS. I
am sending, what I have found, or what is not clear to me. I will
be glad for any comments:
I have found sections of linked paper
* "B. Overview of the Algorithm" on page 957 -- filtering step
* "D. Proposed Stable Version" on page 958 -- segmentation step
* (B. Algorithm for Large-Scale Segmentation" on page 959)
most corresponding to 4 steps LSMS procedure described on
following pages:
http://otbcb.readthedocs.io/en/latest/Applications/app_MeanShiftSmoothing.html
<http://otbcb.readthedocs.io/en/latest/Applications/app_MeanShiftSmoothing.html>
http://otbcb.readthedocs.io/en/latest/Applications/app_LSMSSegmentation.html
<http://otbcb.readthedocs.io/en/latest/Applications/app_LSMSSegmentation.html>
and implemented here
https://github.com/orfeotoolbox/OTB/blob/master/Modules/Filtering/Smoothing/include/otbMeanShiftSmoothingImageFilter.txx
<https://github.com/orfeotoolbox/OTB/blob/master/Modules/Filtering/Smoothing/include/otbMeanShiftSmoothingImageFilter.txx>
https://github.com/orfeotoolbox/OTB/blob/master/Modules/Segmentation/MeanShift/include/otbMeanShiftSegmentationFilter.txx
<https://github.com/orfeotoolbox/OTB/blob/master/Modules/Segmentation/MeanShift/include/otbMeanShiftSegmentationFilter.txx>
What is not clear to me, or some notes:
* step 1 -- Filtering step / smoothing (described in "B. Overview
of the Algorithm" on page 957)
* spatialr (int) -- h_s -- spatial range or spatial kernel
bandwidth? -- number of pixels considered during the equation?
(seems when set bigger number the computation is slower)
* ranger (float) -- h_r -- adjusting the level of smoothing?
(with very low value the effect of smoothing not visible)
-> resulting Spatial Image -- NOT CLEAR
* found
* Spatial image output is a displacement map (pixel position
after convergence). found here
<http://otbcb.readthedocs.io/en/latest/Applications/app_MeanShiftSmoothing.html>
* foutpos is actually an image of the spatial position to which
each pixel mode converges. found here
<https://groups.google.com/forum/#%21searchin/otb-users/spatialr%7Csort:relevance/otb-users/meulMchcxjw/h2LwxVyHgmkJ>
* it has 2 bands, it is X and Y distance?
* step 2 -- segmentation step
* ranger (float) -- h'_r -- seems that this parameter is
controlling the number of resulting segments
* spatialr (float) -- h'_s
Is it possible to somehow control maximum size of segments, or
something like spatial compactness?
Best regards, Jiří.
On Thursday, 3 March 2016 10:12:19 UTC+1, Grizonnet Manuel wrote:
Hi Augustin,
the methodology is based on the following publication:
J. Michel,
D. Youssefi and M. Grizonnet, "Stable Mean-Shift Algorithm and
Its
Application
to the Segmentation of Arbitrarily Large Remote Sensing
Images," in IEEE
Transactions on Geoscience and Remote Sensing, vol. 53, no. 2,
pp. 952-964,
Feb. 2015.
You'll find more detail information about the strategy. Note
that I've
updated the cookbook recipe sources to add a reference to this
publication which was missing.
Thanks for the report.
Manuel
Le 02/03/2016 10:44, Agustin Lobo a écrit :
> The doc
>
https://www.orfeo-toolbox.org/CookBook/CookBooksu35.html#x53-660003.3.4
<https://www.orfeo-toolbox.org/CookBook/CookBooksu35.html#x53-660003.3.4>
> states:
> "The segmentation will group together adjacent pixels whose
range
> distance is below the ranger parameter and (optionally) spatial
> distance is below the spatialr parameter"
>
> if the pixels are adjacent, then they always will be below the
> spatialr parameter. Is "adjacency" defined as "within the
spatialr
> distance"?
> or is it that the group is allowed to grow at a maximum of
spatialr from the
> considered pixel?
>
> Thanks
> Agus
>
--
Manuel GRIZONNET
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected]
<mailto:[email protected]>.
For more options, visit https://groups.google.com/d/optout.
--
Julien MICHEL
CNES - DCT/SI/AP - BPI 1219
18, avenue Edouard Belin
31401 Toulouse Cedex 09 - France
Tel: +33 561 282 894 - Fax: +33 561 283 109
--
--
Check the OTB FAQ at
http://www.orfeo-toolbox.org/FAQ.html
You received this message because you are subscribed to the Google
Groups "otb-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/otb-users?hl=en
---
You received this message because you are subscribed to the Google Groups "otb-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.