Thanks again for the answers,

I agree: OTB is darn quick when compared to other calculators, even getting
close to/or exceeding ENVI/IDL speeds in cases.

It would be nice to call the expression directly (e.g., "std(im1b*)" or
script it through bash "std($image$band)". Yes, I was looking for per-pixel
calculations, but like in ENVI/IDL, it would be nice to be able to specify
either per-band or per-pixel calculations.

I'm learning C, but you guys will be at OTB 6 or 7 by the time I can
contribute :) So, in the meantime, thanks again for the answers and for OTB!


On Tue, Mar 11, 2014 at 7:54 AM, Julien Michel <[email protected]>wrote:

>  Hi dcd,
>
> To complete Jordi's answer :
>
> 1) Being able to output multiple bands corresponding to multiple formulas
> at once, or one formula applied to many bands, is not a limitation of the
> muparser library, it is a matter of implementation on the OTB side. It
> would require some additional code that we ought to write someday,
> considering the many feature requests we have. Until then, the solution
> proposed by Jordi is just as fine (only requires a little scripting).
>
> 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).
>
> Anyway, these are great ideas and OTB BandMath, simple as it is, beats a
> lot of other raster bands calculators I have tried (we will never thank
> enough muParser for that). This is a simple yet very discriminative feature
> of OTB, so we may want to enhance it further.
>
> Thanks for your remarks,
>
> Julien
>
> Le 11/03/2014 04:40, dcd a écrit :
>
> Just out of curiousity, is this a "limitation" to using muparser for Band
> Math? If so, how difficult would it be to implement a different library,
> one that supports statistical operators?
>
> I'll look into scripting through Bash, although I'm not sure (initially)
> how I might derive statistical measures that I'm interested in (e.g., cv,
> std.dev), without creating a large amount of temp layers to hold
> intermediary results. Oh well, perhaps I should go back to R for this task.
>
> Thanks for the responses.
>
> On Monday, March 10, 2014 8:53:16 AM UTC, Jordi Inglada wrote:
>>
>> dcd
>> >
>> > Merci,
>> >
>> > Two follow up questions:
>> >
>> > 1) Is it possible to specify all bands within a multi-layered image?
>> e.g., sum(imb*)? I ask because there are times that I wish to run a raster
>> calculation involving a multi-layered image with 10s or 100s of layers
>> (e.g., an image
>> > stack representing a time-series of temperature for every week, month,
>> etc.).
>> >
>> > 2) Is it possible to calculate standard deviation, coefficient of
>> variation, etc. using Band Math?
>> >
>>
>> Hi,
>>
>> I think that the answer to both your questions is "no". At least not in
>> a single command. You can however use either a shell scripts (i.e. bash)
>> or a the application python bindings to write the necessary loops to do
>> what you want.
>>
>> Jordi
>>
>> > Cheers!
>> >
>> > On Saturday, March 8, 2014 8:30:54 PM UTC, Jonathan Guinet wrote:
>> >
>> >     Hello,
>> >
>> >     Band Math handle multiple image and bands using imXbY  where X
>> refers to image number and Y refers to band numbers.
>> >
>> >     for example if you want to calculate mean over bands of a three
>> band image you can use : (im1b1+im1b2+im1b3)/3
>> >
>> >     2014-03-08 15:01 GMT+01:00 dcd <[email protected]>:
>> >
>> >         Hi OTB'ers,
>> >
>> >         I understand how to use Band Math to accomplish calculations
>> specifying single images/bands, but is there a way to do Band Math through
>> a raster stack (e.g., 12 layer raster?). Also, is it possible to calculate
>> the std dev,
>> >         cv, etc for each pixel through the stack?
>> >
>> >         Cheers
>> >
>> >         --
>> >         --
>> >         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-...-/
>> [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.
>> >
>> > --
>> > --
>> > 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-users-/JYPxA39Uh5TLH3MbocF
>> [email protected]
>> > To unsubscribe from this group, send email to
>> > otb-users+unsubscribe-/[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 otb-users+unsubscribe-/[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.
>
>
>
> --
> 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 a topic in the
> Google Groups "otb-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/otb-users/3wG9Ss1N36E/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 

My public PGP key: 0xF5E746B3
--

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