int lvspeckle(
xvimage *image,
int n)
none
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.
none
none
$RETRO/objects/library/vipl/src/lvspeckle.c