Merci! I will try, although would prefer a shell or python solution. I'm also looking at simplecv, although it seems that reading images > 3 bands is not easy.
Have a nice Xmas season! Agus On Fri, Dec 20, 2013 at 10:11 AM, Julien Malik <[email protected]> wrote: > Hi Agus, > > I don't see a straight forward way to do this with otb_cli or otb-python > (there might be one), but this is a very easy one if you are not afraid > of writing a bit a C++. > I would do it like this : > - build up a VRT concatenating all the images with GDAL. > - write a very simple pipeline Reader->MatrixImageFilter->Writer. > - building up your transformation accordingly. N being you number of > images, this would be a 6N x N matrix filled with (1/N) at the right places. > > Actually the code you need is already written in a test : > http://hg.orfeo-toolbox.org/OTB/file/6211d0ccba0f/Testing/Code/BasicFilters/otbMatrixImageFilterTest.cxx#l40 > You just have to adapt the matrix size and filling. > > It would be multithreaded and streamed. > This would give you very decent performances I think. > > You can follow this : > http://www.orfeo-toolbox.org/SoftwareGuide/SoftwareGuidech2.html#x14-330002.3 > for instructions on how to build the CMakeLists that will compile your > project. > > Cheers, > Julien > > > On 12/19/2013 01:14 PM, Agustin Lobo wrote: >> I have to calculate the average multi-spectral image (6 bands) >> over a set of ~100 images (6x1024x1280). That is, having 3 multiespectal >> images A,B and C, I need M in which band1 is the average band1 of A, B and C >> and so on. Also, I first subtract the mean for each band. >> >> I currently do this in R, but takes a very long time. I essentially >> make an stack (which is like a vrt file) with all bands and then >> calculate the average of bands 1,7,13... >> 2,8, 14... etc >> Is there a way of making this >> calculation using either otb_cli or python-otb ? >> >> Thanks >> >> Agus >> > > -- > -- > 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/groups/opt_out. -- -- 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/groups/opt_out.
