This is a supporting note describing the Rank filter provided in the
vbAccelerator Image Processor. Rank filters
can either be linear, yielding a softening effect, or non-linear, giving an impressionistic
effects to a images.
Performing a Rank Filter
A rank filter considers pixels surrounding the central pixel and then determines a new
value for the pixel from a combination of these values. To achieve a softening effect,
a rank filter averages the Red, Green and Blue contribution from each of the pixels.
To get impressionistic effects, the rank filter picks out the maximum or minimum values of the
In the Image Processing sample, the rank filter takes a 3x3 average of the surrounding
pixels to create the effect. You could modify the code for different effects by more pixels
into account (to get larger 'patches' in the end result) or by using a non-square selection
of surrounding pixels (to get a streaky kind of effect).
Back to top
Back to Image Processing Using DIB Sections
Back to Source Code Overview