7.3.9. Greyscale Images of floats
(lsh/libimage/fimage.lsh)


basic image processing on greyscale images where each pixel is a float.

7.3.9.0. (fim-subsample in nlin ncol)
(lsh/libimage/fimage.lsh)


subsample image in by integer ratios nlin vertically and ncol horizontally (with averaging).

7.3.9.1. (fim-interpolate-bilin background pin indimi indimj inmodi inmodj ppi ppj)
(lsh/libimage/fimage.lsh)


(-gptr- pin):
(-int-  background indimi indimj inmodi inmodj ppi ppj):
RETURNS: (-float-)
SIDE EFFECTS: None
AUTHOR: Y. LeCun
COMPILABLE: Yes
DESCRIPTION:
returns a bilinearly interpolated pixel value for coordinate
<ppi> <ppj>. The image data is pointed to by <pin>, with 
<indimi> <indimj> <inmodi> <inmodj> being the dimensions and modulos.
This function clips automatically if <ppi> <ppj> are outside of the
bounds by assuming the outside values are equal to <background>.
pixel values are floats, while coordinates are 32 bit fixed point
with 16 bit integer part and 16 bit fractional part.
The function does not use floating point arithmetics.


7.3.9.2. (fim-warp in out background pi pj)
(lsh/libimage/fimage.lsh)


((-float-) background):
((-idx2- (-float-)) in out):
((-idx2- (-int-)) pi pj):
RETURNS: Null
SIDE EFFECTS: <out> 
AUTHOR: Y. LeCun
COMPILABLE: Yes
DESCRIPTION:
Warps an image using <pi> and <pj> as tabulated coordinate transforms.
<in> and <out> are idx2 of floats. <background> is the value assumed outside
of the input image. <pi> and <pj> are tabulated coordinates which can
be filled up using compute-bilin-transform or similar functions.
Pixel values are antialiased using bilinear interpolation.


7.3.9.3. (fim-warp-fast in out background pi pj)
(lsh/libimage/fimage.lsh)


((-int-) background):
((-idx2- (-float-)) in out):
((-idx2- (-int-)) pi pj):
RETURNS: Null
SIDE EFFECTS: <out>
AUTHOR: Y. LeCun
COMPILABLE: Yes
DESCRIPTION:
Warps an image using <pi> and <pj> as tabulated coordinate transforms.
<in> and <out> are idx2 of floats. <background> is the value assumed outside
of the input image. <pi> and <pj> are tabulated coordinates which can
be filled up using compute-bilin-transform or similar functions.
This is essentially identical to warp-fimage, except no antialiasing
is performed (it goes a lot faster, but is not nearly as nice).


7.3.9.4. (fim-warp-quad in out background mode x1 y1 x2 y2 x3 y3 x4 y4 p1 q1 p3 q3)
(lsh/libimage/fimage.lsh)


((-flt-) x1 y1 x2 y2 x3 y3 x4 y4 p1 q1 p3 q3):
((-float-) background)
((-int-) mode):
((-idx2- (-float-)) in out):
RETURNS: Null
SIDE EFFECTS: <out>
AUTHOR: Y. LeCun
COMPILABLE: Yes
DESCRIPTION:
transforms fimage <in> (idx2 of float) mapping quadrilateral <x1> <y1> <x2>
<y2> <x3> <y3> <x4> (points are numbered clockwise starting from upper left)
to rectangle whose upper left and lower right points are <p1><q1>, <p3><q3>.
result is put in <out> (idx2 of float).  Clipping is automatically performed.
pixels outside of the bounds of <in> are assumed to have the value
<background>.  <mode>=0: no antialiasing, <mode>=1: antialiasing with
bilinear interpolation (2 times slower).  execution time on sparc 10 is about
5 ms in mode 0 and 10 ms in mode 1 for a 32x32 target image.