Hi Agus,

We are working on an improved band math which will address many of your 
comment, including stack processing, multiple outputs, neighborhood operations, 
access to global stats, and improved documentation. This new band math (called 
BandMathX) is already available and functional in trunk. More info will soon 
appear in our blog.

Regards,

Julien

De : [email protected] [mailto:[email protected]] De la part 
de Agustin Lobo
Envoyé : vendredi 5 décembre 2014 09:52
À : [email protected]
Objet : Re: [otb-users] Re: Band Math on image stack



On Wed, Sep 3, 2014 at 6:45 PM, Guillaume Pasero 
<[email protected]<mailto:[email protected]>> wrote:
Hi,

The formula to compute the mean would look like :
    "avg(im1b1,im1b2,im1b3,[...],im1b12)"

Once you have produced the image containing the mean values, you can use it 
back in the otbcli_BandMath.
Lets say you set the input image list parameter "il" to :
 - first image : the 12-band initial image
- second image : the mean image
The formula for std dev. would look like :
    "sqrt(avg( 
(im1b1-im2b1)*(im1b1-im2b1),(im1b2-im2b1)*(im1b2-im2b1),[...],(im1b12-im2b1)*(im1b12-im2b1)
 ))"

Regards,
Guillaume

Which is very inconvenient. If you have few bands, this is feasible. If you 
have 12, this is inconvenient (the proof being that you were not able to write 
the whole expression in your message. With an Hyperion image, it would be just 
ridiculous.

I think BandMath was designed to operate among few bands, essentially to 
calculate indices. Calculating stats across all bands
would need another otbcli_ application, sort of otbcli_BandStats. Is anything 
like that in the list of new features? It would be certainly most useful.
Agus



Le 03/09/2014 17:43, dcd a écrit :
Hi Julien,

I was just re-reading this post as it's referenced on 
gis.stackexchange.com<http://gis.stackexchange.com/questions/88996/per-pixel-statistical-calculations-on-a-raster-stack-using-gdal/111103#111103>.
 I noticed I missed something in your answer:

On Tuesday, 11 March 2014 03:54:21 UTC-4, Julien Michel wrote:

2) Regarding your second question, it depends on what you intent to calculate : 
the mean and std dev of one layer, or the mean and std dev of one pixel accross 
several layers ? The latter is already possible (you just need to write the 
mathematical expression), while the former again requires more code on OTB side 
(but it would be useful to be able to call std(im1b1) for instance in a 
formula).

The intent was to calculate the mean and std. dev. of a single pixel across 
several layers. Ideally, I'd like to calculate the cv of each pixel. The reply 
above appears to indicate that this is already possible within OTB. If so, how 
would you write the expression using otbcli_BandMath given a multilayer image 
(e.g., 12 bands?).

In other words, if I had a 12 band image of average monthly temperature, how 
would I calculate the mean (or std.dev., or cv) of each pixel across several 
layers using otbcli_BandMath?

Thanks!
--
--
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]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[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.

--
<http://www.c-s.fr>[cid:[email protected]]<http://www.c-s.fr/><http://www.c-s.fr>

Guillaume PASERO
Ingénieur d'études et développement
Business Unit E-SPACE & Geo 
Information<https://thor.si.c-s.fr/blogs/cs-blogs-business/> - Département 
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 - [email protected]<mailto:[email protected]>

--
--
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]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:otb-users%[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.

--
--
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]<mailto:[email protected]>
To unsubscribe from this group, send email to
[email protected]<mailto:[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.

-- 
-- 
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.

Reply via email to