Sharpen
This function sharpens an image using a Laplacian kernel. The final result is color adjusted to match the histogram of the input image.
FANNING SOFTWARE CONSULTING David Fanning, Ph.D. 1645 Sheely Drive Fort Collins, CO 80526 USA Phone: 970-221-0438 E-mail: david@idlcoyote.com Coyote's Guide to IDL Programming: http://www.idlcoyote.com
Image Processing
sharp_image = Sharpen(image)
image - The input image to be sharpened. Assumed to be a 2D byte array.
sharp_image - The sharpened image.
KERNEL -- By default the image is convolved with this 3-by-3 Laplacian kernel: [ [-1, -1, -1], [-1, +8, -1], [-1, -1, -1] ]. You can pass in any kernel of odd width. The filtered image is added back to the original image to provide the sharpening effect. DISPLAY -- If this keyword is set a window is opened and the details of the sharpening process are displayed.
None.
None.
This function is based on the Laplacian kernel sharpening method on pages 128-131 of Digital Image Processing, 2nd Edition, Rafael C. Gonzalez and Richard E. Woods, ISBN 0-20-118075-8.
There is an example program at the end of this file.
Written by David W. Fanning, January 2003. Updated slightly to use Coyote Library routines. 3 Dec. 2010. DWF. Modified the example to work with cgImage. 29 March 2011. DWF.