Agustin Lobo
2018-11-05 17:40:53 UTC
In order to calculate reflectance from a multi-spectral radiance image
acquired with a linear scanner, I also have a 1-row array of white
reference values,
that is:
multi-spectral image A: x rows, y cols, z bands
multi-spectral white reference image B: 1 row, y cols, z bands
I would need to divide each row of A by B.
In a simple notation:
res <- a
for(i in 1:nrow(a)){
res[i,,] <- a[i,,]*b
}
I'd like to this for relatively large images (x=969, y=640, z=224),
avoiding any loop if possible.
The most obvious strategy would be to create a b2 image by repeating the
row of b x times and then use the otb raster arithmetic for a/b2. But is there
an otb way to create such a b2? or perhaps another approach (I.e using
the BandMath tool?)
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 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.
acquired with a linear scanner, I also have a 1-row array of white
reference values,
that is:
multi-spectral image A: x rows, y cols, z bands
multi-spectral white reference image B: 1 row, y cols, z bands
I would need to divide each row of A by B.
In a simple notation:
res <- a
for(i in 1:nrow(a)){
res[i,,] <- a[i,,]*b
}
I'd like to this for relatively large images (x=969, y=640, z=224),
avoiding any loop if possible.
The most obvious strategy would be to create a b2 image by repeating the
row of b x times and then use the otb raster arithmetic for a/b2. But is there
an otb way to create such a b2? or perhaps another approach (I.e using
the BandMath tool?)
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 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.