The new vbAccelerator Site - more VB and .NET Code and Controls
Source Code
4 vbMedia &nbsp
 Rank Filters
 A summing filter which gives softening or impressionistic effects to images


 NOTE: this code has been superceded by the version at the new site.



&nbsp

vbAccelerator Maisons GardenMinimum RankMaximum Rank

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 surrounding pixels.

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).



TopBack to top
BackBack to Image Processing Using DIB Sections
Source Code - What We're About!Back to Source Code Overview

&nbsp
 

About  Contribute  Send Feedback  Privacy

Copyright © 1998-1999, Steve McMahon ( steve@vbaccelerator.com). All Rights Reserved.
Last updated: 25 August 1999