Discussion:
[otb-users] LargeScaleMeanShift still running
Michel Julien
2018-06-07 11:39:11 UTC
Permalink
Also, the minsize step is slow, and if you use a very high minsize it will be even slower. 30000 is a lot.

De : otb-***@googlegroups.com [mailto:otb-***@googlegroups.com] De la part de Guillaume Pasero
Envoyé : jeudi 7 juin 2018 13:20
À : otb-***@googlegroups.com
Objet : Re: [otb-users] LargeScaleMeanShift still running


Hi,

The application LargeScaleMeanShift has 4 steps, each one can be launched individually by an OTB application, check the recipe:

https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation

When you have a large data, what I advise is to start with a small extract, just to tune the parameters. If you over-segment your image, there will be too many polygons, and processing will be slow.

Regards,

Guillaume

On 06/06/2018 10:45 AM, Akila wrote:

Hi all,

When I launch the LargeScaleMeanShift application, the process doesn't finish. I work on Python 2 (with Ubuntu).

My input image.tif weights 1.7 Go and has 6 bands.

Here is what I type on Python 2 :

LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out", "NDVI_segmented_SR_8_RR_40_MS_30000.shp")

# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()

After 10 hours, the algorithms gives me an "NDVI_segmented_SR_8_RR_40_MS_30000.shp_labelmap.tif" image, and that's all.
The script was still running after 36 hours, so I stop it.

Is it normal to wait so long time ? Is there a code or an application to finish the job (I mean to go from shp_labelmap.tif to .tif) ?

Best regards,
Akila
--
--
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 otb-***@googlegroups.com<mailto:otb-***@googlegroups.com>
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com<mailto:otb-users+***@googlegroups.com>
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 otb-users+***@googlegroups.com<mailto:otb-users+***@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
<www.c-s.fr>[cid:***@01D3FE64.EAC0E090]<www.c-s.fr><www.c-s.fr>

Guillaume PASERO
Responsable technique
Business Unit ESPACE & GeoInformation - Département Payload Data & Applications

CS SystÚmes d'Information
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
+33 561 17 64 21 - ***@c-s.fr<mailto:***@c-s.fr>

--
--
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 otb-***@googlegroups.com<mailto:otb-***@googlegroups.com>
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com<mailto:otb-users+***@googlegroups.com>
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 otb-users+***@googlegroups.com<mailto:otb-users+***@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-07 13:23:46 UTC
Permalink
Hi ! Thanks a lot for your quick reply Guillaume and Julien !
I will try these 4 steps on small extracts.

Akila
Post by Michel Julien
Also, the minsize step is slow, and if you use a very high minsize it will
be even slower. 30000 is a lot.
*Envoyé :* jeudi 7 juin 2018 13:20
*Objet :* Re: [otb-users] LargeScaleMeanShift still running
Hi,
The application LargeScaleMeanShift has 4 steps, each one can be launched
https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation
When you have a large data, what I advise is to start with a small
extract, just to tune the parameters. If you over-segment your image, there
will be too many polygons, and processing will be slow.
Regards,
Guillaume
Hi all,
When I launch the LargeScaleMeanShift application, the process doesn't
finish. I work on Python 2 (with Ubuntu).
My input image.tif weights 1.7 Go and has 6 bands.
LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out",
"NDVI_segmented_SR_8_RR_40_MS_30000.shp")
# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()
After 10 hours, the algorithms gives me an "NDVI_segmented_
SR_8_RR_40_MS_30000.*shp_labelmap.tif*" image, and that's all.
The script was still running after 36 hours, so I stop it.
Is it normal to wait so long time ? Is there a code or an application to
finish the job (I mean to go from *shp_labelmap.tif *to *.tif*) ?
Best regards,
Akila
--
--
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.
<javascript:>
To unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> <http://www.c-s.fr> <http://www.c-s.fr>
*Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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.
<javascript:>
To unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-08 10:13:38 UTC
Permalink
Hi !

I have an other question on the LargeScaleMeanShift application.
During the first step (Mean Shift Smoothing), I wonder if having nan values
on images produce errors.

For example, I am smoothing Brazil, but my geotiff image (input image) is a
box around this region. So ,pixels around Brazil are nan values.
When I execute the Mean Shift Smoothing function, the output image (
smooth.tif) haven't got nan values all around the region. The nan pixels
(before smoothing) are now real values (range between 10^-41 - 10^+30).

Do I have to :
1) Before smoothing : replace nan values by 0 (but I have a lot of values
close to 0 on Brazil)
2) Before smoothing : replace nan values by an other value (pixels in
Brazil are between -1 and 1)
3) After smoothing : Find a way to put all value around Brazil to nan (but
is it ok for the segmentation and vectorization steps ?)

Or maybe having nan values is not a problem ?


Thanks,

Akila
Post by Akila
Hi ! Thanks a lot for your quick reply Guillaume and Julien !
I will try these 4 steps on small extracts.
Akila
Post by Michel Julien
Also, the minsize step is slow, and if you use a very high minsize it
will be even slower. 30000 is a lot.
part de* Guillaume Pasero
*Envoyé :* jeudi 7 juin 2018 13:20
*Objet :* Re: [otb-users] LargeScaleMeanShift still running
Hi,
The application LargeScaleMeanShift has 4 steps, each one can be launched
https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation
When you have a large data, what I advise is to start with a small
extract, just to tune the parameters. If you over-segment your image, there
will be too many polygons, and processing will be slow.
Regards,
Guillaume
Hi all,
When I launch the LargeScaleMeanShift application, the process doesn't
finish. I work on Python 2 (with Ubuntu).
My input image.tif weights 1.7 Go and has 6 bands.
LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out",
"NDVI_segmented_SR_8_RR_40_MS_30000.shp")
# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()
After 10 hours, the algorithms gives me an "NDVI_segmented_
SR_8_RR_40_MS_30000.*shp_labelmap.tif*" image, and that's all.
The script was still running after 36 hours, so I stop it.
Is it normal to wait so long time ? Is there a code or an application to
finish the job (I mean to go from *shp_labelmap.tif *to *.tif*) ?
Best regards,
Akila
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> <http://www.c-s.fr> <http://www.c-s.fr>
*Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-11 07:28:36 UTC
Permalink
Thank you Guillaume, I will try it !

Best regards,

Akila
What you can do is to choose a specific no-data value that doesn't
conflict with your region of interest, and before smoothing you replace any
NAN by this no-data value. Since you want a segmentation of your scene, all
these no-data pixels will belong to a polygon that you can filter
afterwards.
Regards,
Guillaume
Hi !
I have an other question on the LargeScaleMeanShift application.
During the first step (Mean Shift Smoothing), I wonder if having nan
values on images produce errors.
For example, I am smoothing Brazil, but my geotiff image (input image) is
a box around this region. So ,pixels around Brazil are nan values.
When I execute the Mean Shift Smoothing function, the output image (
smooth.tif) haven't got nan values all around the region. The nan pixels
(before smoothing) are now real values (range between 10^-41 - 10^+30).
1) Before smoothing : replace nan values by 0 (but I have a lot of values
close to 0 on Brazil)
2) Before smoothing : replace nan values by an other value (pixels in
Brazil are between -1 and 1)
3) After smoothing : Find a way to put all value around Brazil to nan
(but is it ok for the segmentation and vectorization steps ?)
Or maybe having nan values is not a problem ?
Thanks,
Akila
Post by Akila
Hi ! Thanks a lot for your quick reply Guillaume and Julien !
I will try these 4 steps on small extracts.
Akila
Post by Michel Julien
Also, the minsize step is slow, and if you use a very high minsize it
will be even slower. 30000 is a lot.
la part de* Guillaume Pasero
*Envoyé :* jeudi 7 juin 2018 13:20
*Objet :* Re: [otb-users] LargeScaleMeanShift still running
Hi,
The application LargeScaleMeanShift has 4 steps, each one can be
https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation
When you have a large data, what I advise is to start with a small
extract, just to tune the parameters. If you over-segment your image, there
will be too many polygons, and processing will be slow.
Regards,
Guillaume
Hi all,
When I launch the LargeScaleMeanShift application, the process doesn't
finish. I work on Python 2 (with Ubuntu).
My input image.tif weights 1.7 Go and has 6 bands.
LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out",
"NDVI_segmented_SR_8_RR_40_MS_30000.shp")
# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()
After 10 hours, the algorithms gives me an "NDVI_segmented_
SR_8_RR_40_MS_30000.*shp_labelmap.tif*" image, and that's all.
The script was still running after 36 hours, so I stop it.
Is it normal to wait so long time ? Is there a code or an application
to finish the job (I mean to go from *shp_labelmap.tif *to *.tif*) ?
Best regards,
Akila
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr>
*Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
--
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.
<javascript:>
To unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-25 09:24:08 UTC
Permalink
<Loading Image...>

Hi all !

Thank you , I got a good result : the LSMS application with its 4 steps
work good.

However, I wonder if the application take into consideration the ratio
between the boundary and the area of each polygon. Because i like to have
my regions more regrouped .


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Example :

Here is what I obtain : (boundary 1 in red)

<Loading Image...>

And what I want : (boundary2 in red, area 2 in green)

<https://lh3.googleusercontent.com/-1LbHdaE3sNY/WzCz2PHgbCI/AAAAAAAAABM/Dmsc36QmUxMLutG2KkuyR0PR83olnZRUgCLcBGAs/s1600/Capture2.png>


With boundary2 < boundary1 *but* area1 ~= area2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If not, is there on OTB Library a function wich can do it ?

Best regards,

Akila
Post by Akila
Thank you Guillaume, I will try it !
Best regards,
Akila
What you can do is to choose a specific no-data value that doesn't
conflict with your region of interest, and before smoothing you replace any
NAN by this no-data value. Since you want a segmentation of your scene, all
these no-data pixels will belong to a polygon that you can filter
afterwards.
Regards,
Guillaume
Hi !
I have an other question on the LargeScaleMeanShift application.
During the first step (Mean Shift Smoothing), I wonder if having nan
values on images produce errors.
For example, I am smoothing Brazil, but my geotiff image (input image) is
a box around this region. So ,pixels around Brazil are nan values.
When I execute the Mean Shift Smoothing function, the output image (
smooth.tif) haven't got nan values all around the region. The nan pixels
(before smoothing) are now real values (range between 10^-41 - 10^+30).
1) Before smoothing : replace nan values by 0 (but I have a lot of
values close to 0 on Brazil)
2) Before smoothing : replace nan values by an other value (pixels in
Brazil are between -1 and 1)
3) After smoothing : Find a way to put all value around Brazil to nan
(but is it ok for the segmentation and vectorization steps ?)
Or maybe having nan values is not a problem ?
Thanks,
Akila
Post by Akila
Hi ! Thanks a lot for your quick reply Guillaume and Julien !
I will try these 4 steps on small extracts.
Akila
Post by Michel Julien
Also, the minsize step is slow, and if you use a very high minsize it
will be even slower. 30000 is a lot.
la part de* Guillaume Pasero
*Envoyé :* jeudi 7 juin 2018 13:20
*Objet :* Re: [otb-users] LargeScaleMeanShift still running
Hi,
The application LargeScaleMeanShift has 4 steps, each one can be
https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation
When you have a large data, what I advise is to start with a small
extract, just to tune the parameters. If you over-segment your image, there
will be too many polygons, and processing will be slow.
Regards,
Guillaume
Hi all,
When I launch the LargeScaleMeanShift application, the process doesn't
finish. I work on Python 2 (with Ubuntu).
My input image.tif weights 1.7 Go and has 6 bands.
LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out",
"NDVI_segmented_SR_8_RR_40_MS_30000.shp")
# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()
After 10 hours, the algorithms gives me an "NDVI_segmented_
SR_8_RR_40_MS_30000.*shp_labelmap.tif*" image, and that's all.
The script was still running after 36 hours, so I stop it.
Is it normal to wait so long time ? Is there a code or an application
to finish the job (I mean to go from *shp_labelmap.tif *to *.tif*) ?
Best regards,
Akila
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr>
*Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-25 09:26:08 UTC
Permalink
Hi all !

Thank you , I got a good result : the LSMS application with its 4 steps
work good.

However, I wonder if the application take into consideration the ratio
between the boundary and the area of each polygon. Because i like to have
my regions more regrouped .


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Example :

Here is what I obtain : (boundary 1 in red)

<https://lh3.googleusercontent.com/-j5n2FBkseHI/WzCx63xQdWI/AAAAAAAAAA8/niNM64a5iT8BVcD1fyfK1CLXfwZ6fa8vQCLcBGAs/s1600/Capture.PNG>

And what I want : (boundary2 in red, area 2 in green)

<https://lh3.googleusercontent.com/-1LbHdaE3sNY/WzCz2PHgbCI/AAAAAAAAABM/Dmsc36QmUxMLutG2KkuyR0PR83olnZRUgCLcBGAs/s1600/Capture2.png>


With boundary2 < boundary1 *but* area1 ~= area2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If not, is there on OTB Library a function wich can do it ?

Best regards,

Akila
Post by Akila
Thank you Guillaume, I will try it !
Best regards,
Akila
What you can do is to choose a specific no-data value that doesn't
conflict with your region of interest, and before smoothing you replace any
NAN by this no-data value. Since you want a segmentation of your scene, all
these no-data pixels will belong to a polygon that you can filter
afterwards.
Regards,
Guillaume
Hi !
I have an other question on the LargeScaleMeanShift application.
During the first step (Mean Shift Smoothing), I wonder if having nan
values on images produce errors.
For example, I am smoothing Brazil, but my geotiff image (input image) is
a box around this region. So ,pixels around Brazil are nan values.
When I execute the Mean Shift Smoothing function, the output image (
smooth.tif) haven't got nan values all around the region. The nan pixels
(before smoothing) are now real values (range between 10^-41 - 10^+30).
1) Before smoothing : replace nan values by 0 (but I have a lot of
values close to 0 on Brazil)
2) Before smoothing : replace nan values by an other value (pixels in
Brazil are between -1 and 1)
3) After smoothing : Find a way to put all value around Brazil to nan
(but is it ok for the segmentation and vectorization steps ?)
Or maybe having nan values is not a problem ?
Thanks,
Akila
Post by Akila
Hi ! Thanks a lot for your quick reply Guillaume and Julien !
I will try these 4 steps on small extracts.
Akila
Post by Michel Julien
Also, the minsize step is slow, and if you use a very high minsize it
will be even slower. 30000 is a lot.
la part de* Guillaume Pasero
*Envoyé :* jeudi 7 juin 2018 13:20
*Objet :* Re: [otb-users] LargeScaleMeanShift still running
Hi,
The application LargeScaleMeanShift has 4 steps, each one can be
https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation
When you have a large data, what I advise is to start with a small
extract, just to tune the parameters. If you over-segment your image, there
will be too many polygons, and processing will be slow.
Regards,
Guillaume
Hi all,
When I launch the LargeScaleMeanShift application, the process doesn't
finish. I work on Python 2 (with Ubuntu).
My input image.tif weights 1.7 Go and has 6 bands.
LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out",
"NDVI_segmented_SR_8_RR_40_MS_30000.shp")
# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()
After 10 hours, the algorithms gives me an "NDVI_segmented_
SR_8_RR_40_MS_30000.*shp_labelmap.tif*" image, and that's all.
The script was still running after 36 hours, so I stop it.
Is it normal to wait so long time ? Is there a code or an application
to finish the job (I mean to go from *shp_labelmap.tif *to *.tif*) ?
Best regards,
Akila
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr>
*Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-25 09:27:33 UTC
Permalink
Hi all !

Thank you , I got a good result : the LSMS application with its 4 steps
work good.

However, I wonder if the application take into consideration the ratio
between the boundary and the area of each polygon. Because i like to have
my regions more regrouped .


---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Example :

Here is what I obtain : (boundary 1 in red)

<https://lh3.googleusercontent.com/-j5n2FBkseHI/WzCx63xQdWI/AAAAAAAAAA8/niNM64a5iT8BVcD1fyfK1CLXfwZ6fa8vQCLcBGAs/s1600/Capture.PNG>

And what I want : (boundary2 in red, area 2 in green)

<https://lh3.googleusercontent.com/-1LbHdaE3sNY/WzCz2PHgbCI/AAAAAAAAABM/Dmsc36QmUxMLutG2KkuyR0PR83olnZRUgCLcBGAs/s1600/Capture2.png>


With boundary2 < boundary1 *but* area1 ~= area2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If not, is there on OTB Library a function wich can do it ?

Best regards,

Akila
Post by Akila
Thank you Guillaume, I will try it !
Best regards,
Akila
What you can do is to choose a specific no-data value that doesn't
conflict with your region of interest, and before smoothing you replace any
NAN by this no-data value. Since you want a segmentation of your scene, all
these no-data pixels will belong to a polygon that you can filter
afterwards.
Regards,
Guillaume
Hi !
I have an other question on the LargeScaleMeanShift application.
During the first step (Mean Shift Smoothing), I wonder if having nan
values on images produce errors.
For example, I am smoothing Brazil, but my geotiff image (input image) is
a box around this region. So ,pixels around Brazil are nan values.
When I execute the Mean Shift Smoothing function, the output image (
smooth.tif) haven't got nan values all around the region. The nan pixels
(before smoothing) are now real values (range between 10^-41 - 10^+30).
1) Before smoothing : replace nan values by 0 (but I have a lot of
values close to 0 on Brazil)
2) Before smoothing : replace nan values by an other value (pixels in
Brazil are between -1 and 1)
3) After smoothing : Find a way to put all value around Brazil to nan
(but is it ok for the segmentation and vectorization steps ?)
Or maybe having nan values is not a problem ?
Thanks,
Akila
Post by Akila
Hi ! Thanks a lot for your quick reply Guillaume and Julien !
I will try these 4 steps on small extracts.
Akila
Post by Michel Julien
Also, the minsize step is slow, and if you use a very high minsize it
will be even slower. 30000 is a lot.
la part de* Guillaume Pasero
*Envoyé :* jeudi 7 juin 2018 13:20
*Objet :* Re: [otb-users] LargeScaleMeanShift still running
Hi,
The application LargeScaleMeanShift has 4 steps, each one can be
https://www.orfeo-toolbox.org/CookBook/recipes/improc.html#large-scale-mean-shift-lsms-segmentation
When you have a large data, what I advise is to start with a small
extract, just to tune the parameters. If you over-segment your image, there
will be too many polygons, and processing will be slow.
Regards,
Guillaume
Hi all,
When I launch the LargeScaleMeanShift application, the process doesn't
finish. I work on Python 2 (with Ubuntu).
My input image.tif weights 1.7 Go and has 6 bands.
LargeScaleMeanShift.SetParameterString("in", "NDVI_normalized.tif")
SR = 8
RR = 40
MS = 30000
LargeScaleMeanShift.SetParameterInt("spatialr", SR)
LargeScaleMeanShift.SetParameterFloat("ranger", RR)
LargeScaleMeanShift.SetParameterInt("minsize", MS)
LargeScaleMeanShift.SetParameterString("mode.vector.out",
"NDVI_segmented_SR_8_RR_40_MS_30000.shp")
# The following line execute the application
LargeScaleMeanShift.ExecuteAndWriteOutput()
After 10 hours, the algorithms gives me an "NDVI_segmented_
SR_8_RR_40_MS_30000.*shp_labelmap.tif*" image, and that's all.
The script was still running after 36 hours, so I stop it.
Is it normal to wait so long time ? Is there a code or an application
to finish the job (I mean to go from *shp_labelmap.tif *to *.tif*) ?
Best regards,
Akila
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr>
*Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Akila
2018-06-25 09:29:13 UTC
Permalink
(rest of the message:)

With boundary2 < boundary1 *but* area1 ~= area2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If not, is there on OTB Library a function wich can do it ?

Best regards,

Akila
Post by Akila
Hi all !
Thank you , I got a good result : the LSMS application with its 4 steps
work good.
However, I wonder if the application take into consideration the ratio
between the boundary and the area of each polygon. Because i like to have
my regions more regrouped .
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is what I obtain : (boundary 1 in red)
<https://lh3.googleusercontent.com/-j5n2FBkseHI/WzCx63xQdWI/AAAAAAAAAA8/niNM64a5iT8BVcD1fyfK1CLXfwZ6fa8vQCLcBGAs/s1600/Capture.PNG>
And what I want : (boundary2 in red, area 2 in green)
<https://lh3.googleusercontent.com/-1LbHdaE3sNY/WzCz2PHgbCI/AAAAAAAAABM/Dmsc36QmUxMLutG2KkuyR0PR83olnZRUgCLcBGAs/s1600/Capture2.png>
W<span style="background-color: transparent; border-bottom-color: rgb(34,
34, 34); border-bottom-style: none; border-bottom-width: 0px;
border-image-outset: 0; border-image-repeat: stretch; border-
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Pasero
2018-06-25 09:31:56 UTC
Permalink
Akila
2018-06-25 10:26:43 UTC
Permalink
Thank you for your quick reply Guillaume, I will try your first option.

Sorry for all my questions, but for the second option, there is a
resolution parameter for the Segmentation application
(https://www.orfeo-toolbox.org/CookBook/Applications/app_Segmentation.html)
but not for the LSMSSegmentation application (https://www.orfeo-toolbox.org/CookBook/Applications/app_LSMSSegmentation.html).
Which one are you talking about ?

Best regards,

Akila
Hi,
- Use *ogr2ogr* with the *-simplify* options
- or launch the segmentation pipeline at a coarser resolution.
Regards,
Guillaume
(rest of the message:)
With boundary2 < boundary1 *but* area1 ~= area2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If not, is there on OTB Library a function wich can do it ?
Best regards,
Akila
Post by Akila
Hi all !
Thank you , I got a good result : the LSMS application with its 4 steps
work good.
However, I wonder if the application take into consideration the ratio
between the boundary and the area of each polygon. Because i like to have
my regions more regrouped .
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is what I obtain : (boundary 1 in red)
<https://lh3.googleusercontent.com/-j5n2FBkseHI/WzCx63xQdWI/AAAAAAAAAA8/niNM64a5iT8BVcD1fyfK1CLXfwZ6fa8vQCLcBGAs/s1600/Capture.PNG>
And what I want : (boundary2 in red, area 2 in green)
<https://lh3.googleusercontent.com/-1LbHdaE3sNY/WzCz2PHgbCI/AAAAAAAAABM/Dmsc36QmUxMLutG2KkuyR0PR83olnZRUgCLcBGAs/s1600/Capture2.png>
W<span style="background-color: transparent; border-bottom-color: rgb(34,
34, 34); border-bottom-style: none; border-bottom-width: 0px;
border-image-outset: 0; border-image-repeat: stretch; border-
--
--
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.
<javascript:>
To unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Guillaume Pasero
2018-06-27 07:03:05 UTC
Permalink
Akila
2018-06-27 14:37:25 UTC
Permalink
Oh great thank you Guillaume !
I will think about it,

Akila
For second option, I wasn't referring to an option in an OTB Application.
I proposed to resample your input image at a larger pixel size.
Guillaume
Thank you for your quick reply Guillaume, I will try your first option.
Sorry for all my questions, but for the second option, there is a
resolution parameter for the Segmentation application (
https://www.orfeo-toolbox.org/CookBook/Applications/app_Segmentation.html)
but not for the LSMSSegmentation application (
https://www.orfeo-toolbox.org/CookBook/Applications/app_LSMSSegmentation.html).
Which one are you talking about ?
Best regards,
Akila
Hi,
- Use *ogr2ogr* with the *-simplify* options
- or launch the segmentation pipeline at a coarser resolution.
Regards,
Guillaume
(rest of the message:)
With boundary2 < boundary1 *but* area1 ~= area2
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
If not, is there on OTB Library a function wich can do it ?
Best regards,
Akila
Post by Akila
Hi all !
Thank you , I got a good result : the LSMS application with its 4 steps
work good.
However, I wonder if the application take into consideration the ratio
between the boundary and the area of each polygon. Because i like to have
my regions more regrouped .
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Here is what I obtain : (boundary 1 in red)
<https://lh3.googleusercontent.com/-j5n2FBkseHI/WzCx63xQdWI/AAAAAAAAAA8/niNM64a5iT8BVcD1fyfK1CLXfwZ6fa8vQCLcBGAs/s1600/Capture.PNG>
And what I want : (boundary2 in red, area 2 in green)
<https://lh3.googleusercontent.com/-1LbHdaE3sNY/WzCz2PHgbCI/AAAAAAAAABM/Dmsc36QmUxMLutG2KkuyR0PR83olnZRUgCLcBGAs/s1600/Capture2.png>
rgb(34, 34, 34); border-bottom-style: none; border-bottom-width: 0px;
border-image-outset: 0; border-image-repeat: stretch; border-
--
--
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 unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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.
<javascript:>
To unsubscribe from this group, send email to
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
For more options, visit https://groups.google.com/d/optout.
--
<http://www.c-s.fr> *Guillaume PASERO*
Responsable technique
*Business Unit ESPACE & GeoInformation - Département Payload Data &
Applications*
*CS SystÚmes d'Information*
Parc de la Grande Plaine - 5, Rue Brindejonc des Moulinais - BP 15872
31506 Toulouse Cedex 05 - FRANCE
--
--
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 otb-***@googlegroups.com
To unsubscribe from this group, send email to
otb-users+***@googlegroups.com
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 otb-users+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...