On Tuesday, June 2, 2015 at 11:37:09 PM UTC+8, loïc DUTRIEUX wrote:
Hi all,
I´d like to ask two clarifications about the mean shift
segmentation implemented in OTB. I was not able to find these in
the doc.
1 - What distance metric does the range radius parameter uses when
working with multiple bands? Is it euclidean distance by default?
So to further clarify how this works, if I have the following
three pixels with associated values.
| band | Pixel 1 | Pixel 2 | Pixel 3 |
| band1 | 50 | 55 | 100 |
| band2 | 34 | 30 | 35 |
| band3 | 60 | 56 | 60 |
The euclidean distance between the pairs is the following.
| Pair | Distance |
| 1-2 | 7.5 |
| 1-3 | 50 |
| 2-3 | 45 |
If I set a range radius of let's say 15, which is <<45 and >>7.5,
does that mean that Pixels 1 and 2 will be made the same value and
Pixel 3 will be another value (assuming they are all within the
same spatial radius).
The distance is euclidean, but the outcome is not that simple. MeanShift
will perform smooting of your input image, with the following steps
applied for each pixel :
- Look for neighboring pixels whose spatial location (in pixel) falls
with the spatial radius AND whose euclidean distance between spectras
falls within the range radius
- Average those pixels positions to form a new spatial position for the
current pixel, and average those pixels spectra to form a new spectrum
for the current pixel
- Iterates the process with the new position and spectrum until
convergence conditions are met (max number of iterations or move bellow
defined threshold).
So in the end, for each pixel in the image, you end up with a new
spectrum and a proposed spatial position for this spectrum (those two
things together are called a mode, this is actually an extrema of the
image pdf). If you look at the image of new spectrum for each pixel, it
will look smoother than the initial image, while preserving sharp edges.
This is why mean-shift can be used for denoising. The image of new
spatial position has no meaning by itself, but it is useful for
segmentation.
In this case, you will want to group in the same segment pixels who
converged to similar modes (i.e. new spectrum and spatial position).
This can be done by connected components or strong connected components
analysis.
Long story short, if two pixels fall within range and spatial radius of
each other, it does not necessarily mean they will end up in the same
segment. It is likely, but it depends on the distribution of the other
pixels around them.
Hope that helps,
Regards,
Julien
2 - My second question. What is the unit of the spatial radius?
I'm assuming pixels, but I'd appreciate confirmation.
The reason I am using the segmentation is that I'm trying to
delineate areas of similar land use history using time-series of
Landsat vegetation indices as input.
Thanks in advance for your help,
Cheers,
---
Loïc Dutrieux
Wageningen University
The Netherlands
--
--
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.