lvspeckle(3)

LIBRARY ROUTINE
lvspeckle - Reduce speckle noise from an image by using the Crimmins algorithm.

LIBRARY CALL
#include "vinclude.h"
int
lvspeckle(image, n)
struct xvimage *image;
int n;

INPUT

image
    VIFF image structure, must be a byte image.

n   the number of times the user wishes to send the image through the speckle removal filter. Integer. Limited to 20.

OUTPUT

img2
    VIFFF image structure, image with speckle removal filter applied the proper number of times.

MODIFICATIONS

DESCRIPTION
vspeckle reduces the speckle index of an image by sending the image through a geometric filter. The function takes one argument: n which determines how many times the image is to be sent through the speckle reducing filter. This filter uses the complementary hulling technique to reduce the speckle index of an image.

Each pixel in the image is compared with all eight of its surrounding pixels. The pixels above and below the pixel are the N-S pair, the pixels on either side are the E-W pair, those on the diagonals are the NW-SE and NE-SW pair. The image and a pair of pixels are sent to the symmetric hull function which in turn sends the image to the positive hull function and to the negative hull function. The positive and negative hull functions are called twice; the first time the neighboring pair of pixels is sent and the second time the complement of the pixels is sent. The positive hull function replaces each "middle pixel" with the result of a several comparisons. These comparison are a combination of maximums and minimums. The final comparison is a maximum for the postive hull algorithm. The image is then sent to the negative hull function where the middle pixel is replaced with the result of more comparisons. The final comparison for the negative hull algorithm is a minimum. The result of all these replacements has the effect of reducing the undesired speckle noise while preserving the edges of the original image.

SEE ALSO
vspeckle(1), intro(3), vipl(3), verror(3), vutils(3)

RESTRICTIONS
vspeckle accepts only BYTE images. The number of iterations is limited to 20.

AUTHOR
Caryl Peterson R. J. Fogler

COPYRIGHT
Copyright 1991, University of New Mexico. All rights reserved.