Next: Morphology, Previous: Process, Up: Image Processing [Contents][Index]
The Guile-CV procedures and methods to transform images.
im-rgba->rgb
im-rgba->gray
im-rgb->gray
im-resize
im-resize-channel
im-rotate
im-rotate-channel
im-flip
im-flip-channel
im-invert
im-invert-channel
im-transpose
im-transpose-channel
im-complement
im-clip
im-clip-channel
im-crop
im-crop-channel
im-crop-size
im-padd
im-padd-channel
im-padd-size
im-local-minima
im-local-minima-channel
im-local-maxima
im-local-maxima-channel
im-fft
im-fft-channel
im-fft-inverse
im-fft-inverse-channel
im-fcc
im-fcc-channel
im-fncc
im-fncc-channel
Returns a new RGB or GRAY image.
In the RGBA case, image channels are first normalized. The new RGB channels are obtained by applying the following pseudo code algorithm:
R = (((1 - Source.A) * BG.R) + (Source.A * Source.R)) * 255.0 G = (((1 - Source.A) * BG.G) + (Source.A * Source.G)) * 255.0 B = (((1 - Source.A) * BG.B) + (Source.A * Source.B)) * 255.0
Returns a new image or chanbnel resized to new-width, new-height.
The interpolation mode #:i-mode, can be one of:
none
bilinear
biquadratic
bicubic
? (fixme)
Returns a new image or channel rotated by angle.
The angle is in degrees: +/-[0.0 360.0]
.
It is neccessary, for rotations other than multiples of 90°, to recalculate the target coordinates, since after the rotation, they might be floats. The ’next neighbor’ interpolation possible modes, #:i-mode, are:
bilinear
biquadratic
bicubic
? (fixme)
Returns a new image or channel flipped according to the selected plane.
Valid flipping plane values are:
hori horizontal
vert vertical
both
Returns a new inversed image or channel.
Calculating the inverse of an image or a channel consist of
applying the exponent function, expt
, to all pixel values,
raising them to the power of -1.
Returns a new tranposed image or channel.
Transposing an image or a channel consist of flipping it over its main diagonal. In the transposed result, switched in size, row values are the original column values and column values are the original row values.
Returns a new image.
This procedure computes the mathematical complement of image,
which for Guile-CV means that for each pixel of each channel, the new
value is (- 255.0 pixel-value)
.
Returns a new clipped image or channel.
Clipping an image or a channel consist of replacing all
pixel values below lower
by the lower
value and all pixel
values above upper
by the upper
value.
Returns a new image, resulting of the crop of image at left, top, right and bottom.
Returns a list, (new-width new-height)
.
Given the original image width and height, this procedure
checks that left, top, right and bottom are
valid and return a list, (new-width new-height)
, otherwise, it
raises an error.
Returns a new image or channel, respectively padding image or
channel by left, top, right and bottom
pixels initialized respectively to color or value. Note
that when im-padd
is called upon a GRAY
image,
color is reduced to its corresponding gray value:
(/ (reduce + 0 color) 3)
Returns a list, (new-width new-height)
.
Given the original image width and height, this procedure
checks that left, top, right and bottom are
>= 0
and return a list, (new-width new-height)
,
otherwise, it raises an error.
All local mnima and maxima related procedures also accept the following additional optional keyword arguments: [#:con 8] [#:marker 1.0] [#:borders? #f] [#:plateaus? #f] [#:epsilon 1.0e-4]
Returns a new image or channel.
Finds the local minima or maxima in image or channel. Local
minima or maxima are defined as ‘points’ that are not on the
borders (unless #:borders?
is #t
), and whose values are
lower or higher, respectively, then the values of all direct neighbors.
In the result image or channel, these points are marked using the
#:marker value (all other pixels values will be set to 0
).
By default, the algorithm uses 8-connectivity to define a neighborhood, which can be changed passing the optional keyword argument #:con, which can be either 4 or 8.
The #:threshold optional keyword argument can be used to discard
minima and maxima whose (original pixel) value is not below or above the
threshold, respectively. Both default values depend on
+float-max+
, which is defined (and so is +float-min+
)
using the corresponding limit value as given by the C float.h header.
The #:plateaus? optional keyword argument can be used to allow
regions of ‘constant’ (original pixel) value whose neighbors are
all higher (minima) or lower (maxima) than the value of the region. Tow
pixel values are considered part of the same region (representing the
same ‘constant’ value) if the absolute value of their difference is
<=
to #:epsilon.
Notes:
Returns two images or channels.
Computes and returns the Fast Fourier Transform21 of the image or channel. It returns two values, images or channels: the first contains the real part and the second the imaginary part of the transformation.
Returns two images or channels.
Computes and returns the inverse Fast Fourier Transform given its real and imaginary or real-channel and imaginary-channel parts. It returns two values, images or channels: the first contains the real part and the second the imaginary part of the inverse transformation.
Returns an image or a channel.
Computes and returns the Fast Cross Correlation or Fast Normalized Cross Correlation between image and a (usually smaller) mask22, using the Fast Fourier Transform23.
The FFT (Fast Fourier Transform) is simply a faster way to compute the Fourier transform. All FFT related procedures, and their inverse, are obtained by calling the FFTW library.
Also called a template, or a pattern.
Hence the names, FCC (Fast Cross Correlation) and FNCC (Fast Normalized Cross Correlation).
Next: Morphology, Previous: Process, Up: Image Processing [Contents][Index]