SHARPEN Name
Sharpen Purpose
This function sharpens an image using a Laplacian kernel.
The final result is color adjusted to match the histogram
of the input image.
Author
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
Category
Image Processing Calling Sequence
sharp_image = Sharpen(image)
Inputs
image - The input image to be sharpened. Assumed to be a 2D byte array.
Outputs
sharp_image - The sharpened image.
Input Keywords
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.
Output Keywords
None. Dependencies
None. Method
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.
Example
There is an example program at the end of this file.
Modification History
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.