the image values at arbitrary positions
This is the fast path a regular grid buys: the query reduces to fractional row and column coordinates, so it is a griddedInterpolant rather than the scatteredInterpolant EBSD/interp has to use for grids that may be rotated or distorted.
Resampling onto another grid is this plus a target position set, and correcting a distortion is the same call with inv(T):
v = interp(mg, eval(inv(T),target.pos))Syntax
v = interp(mg,pos)
v = interp(mg,pos,'nearest')
v = interp(mg,pos,'extrapolationMethod','nearest')Input
| mg | mapImage |
| pos | vector3d, where to sample |
Output
| v | values, size(pos) by nChannel |
Options
| linear, nearest, cubic, spline | interpolation method, default linear |
| extrapolationMethod | default 'none', i.e. NaN outside |