The Sharpen filter enhances edges using a simple algorithm. This is very fast to compute but can produce artificially over-sharp or over-noisy images if not used carefully.

The Sharpen Filter uses a simple three square convolution to enhance edges. The value at the center is +2.0 and the value at the edges is -0.125.

Syntax

[C#]

static void Sharpen(Bitmap bitmap);

[Visual Basic]

Shared Sub Sharpen(bitmap As Bitmap)
Params
Name Description
bitmap The bitmap to process
Notes

None.

Example

[C#]using (Bitmap bm = (Bitmap)Bitmap.FromFile(Server.MapPath("rez/timon-studler-6GH_7bVIWsk-unsplash.jpg"))) {
  Effects.Sharpen(bm);
  bm.Save(Server.MapPath("IG8_Effects_Sharpen.jpg"));
}


Here we apply a Sharpen filter to an image. Ouput files are shown below.


timon-studler-6GH_7bVIWsk-unsplash.jpg


IG8_Effects_Sharpen.jpg