[Image-SIG] Unsharp Masking and Gaussian Blur for PIL

Kevin@Cazabon.com kevin@cazabon.com
Sat, 25 Jan 2003 20:51:18 -0700


Small update, version 0.2.0, sorry!  L mode images now work properly as
well.

  http://www.cazabon.com/pyCMS/downloads/PIL_usm_0.2.0.zip

Kevin.


> ##########
>
> import Image
> import PIL_usm
>
> a = Image.open("c:\\temp\\test.tif")
> b = PIL_usm.gblur(a, radius = 5)    # gaussian blur function
> c = PIL_usm.usm(a, radius = 5, percent = 150, threshold = 3)    # unsharp
> masking function
>
> b.save("c:\\temp\\test_blur.tif")
> c.save("c:\\temp\\test_sharpen.tif")
>
> ##########