Dear all,

I have some remarks and questions about resampling using OTB, in particular
using RigidTransformResample application scheme (which is based on a
StreamingResampleImage filter).

let's show you my problem : apply a resampling of an input with a factor 10
:

otbcli_RigidTransformResample -in
~/workspace/ORFEO-TOOLBOX/src/OTB-Data/Input/QB_Toulouse_Ortho_PAN_WGS84.tif
-out
/media/otbnas/jguinet/REECH_OTB/QB_Toulouse_Ortho_PAN_WGS84_scale_0.1.tif
-transform.type id -transform.type.id.scalex 0.1 -transform.type.id.scaley
0.1 -interpolator bco

then open input and output with gdal : we observe a shift between resampled
data and input one.

Resampling is done as follow : project each  pixel  (integer) of output c.s
to pixel position (fractional) in input c.s. interpolation is then used to
approximate data.

- use output information (origin,spacing,size) to compute output
information (the output grid)
- create the deformation field (the distance between physical position of
each point input grid and point in output space) using a trasnform set to
identity.
- interpolate value of input position from output one using deformation
field.

using this scheme and a WGS84 input for example, each geodetic position of
an output pixel is mapped with the same postion in input

for example origin of output is interpolated at origin of input. Using a
0.5 scaling and linear interpolator it gives the result depicted in the
illustration "Resampling.jpg" : (resampled image is depicted with dots
line, resampled data is interpolated using dashed input pixel (linear
interpolator use only dashed pixel, and is nearly the same as a NN
interpolator) ). Thus shift is observed.

Considering the (0,0) pixel the resampling strategy can be illustrated as
"Origin_Resampling.jpeg"

if we consider that a pixel is a point convolued by a PSF, i think that an
upsampling should be as illustrated in "New_Resampling.jpeg"

I wonder if the transform should be a mid spacing shift
(offset=(outputSpacing-inputSpacing)/2).

using this transform offset results in resampled data exactly superimposed
using gdal.

moreover using this scheme the new origin might be shifted with
outputSpacing/2 (with the drawback of footprint change between output and
input at origin).

What do you think about that ?

Thanks

Jonathan

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

<<attachment: Origin_Resampling.jpeg>>

<<attachment: Resampling.jpeg>>

<<attachment: New_Resampling.jpeg>>

Reply via email to