Image sharpening methods
I'm doing a project where I'll be using genetic algorithms to optimize a set of filters and parameters that will be used to sharpen an image. I'm currently reading the book "Digital Image Processing" by Gonzalez, and researching anything I can about image processing, since I'm somewhat new to this field.
I was looking for a list 开发者_如何学Goof sharpening methods... i.e. unsharp masks, high-pass filter, laplacian sharpening, etc. If you're familiar with image processing, are there any filters you would recommend for sharpening images (containing parameters for "tuning")?
Thanks!
In general, sharpening increases the contrast between pixels. Naive implementations often introduce "halos" along edges, which can be perceptively unappealing. Techniques such as the bilateral filter attempt to address this problem. There have been a few interesting techniques in recent years, a good summary of the concepts up to modern algorithms is covered by Andrew Adams in: http://www.stanford.edu/class/cs448f/lectures/2.1/Sharpening.pdf
Look near the end for some approaches:
Bilateral & Trilateral Filter
Edge Preserving Decompositions for MultiScale Tone and Detail Manipulation
Blind deconvolution (convolution without a known kernel)
Of course, if you have more than one image, or any information about the image you are dealing with (such as other, sharp images of the subject) you can typically do much better using a variety of learning techniques based on image priors.
A good general framework for working with images and trying some of the sharpening techniques is OpenCV, which there exist python binding for.
An idea for a simple, very fast & usually effective algorithm (no idea if anyone else has already thought of this) is this:
- N will represent the sharpness increase. A value of 0 would leave the image unchanged, a value of 1 would probably about double the sharpness, and a value of -1 would make the image very fuzzy and weird.
- Now, for each color of each pixel in the image, do this
- Call the current value V, the current color C, the current column X, and the current row Y.
- Set X to the greatest difference between the adjacent pixels like so:
M = biggestAbsoluteValueBetween( X - (the Cth color of the Yth row of the (X - 1)th column), X - (the Cth color of the Yth row of the (X + 1)th column), X - (the Cth color of the (Y - 1)th row of the Xth column), X - (the Cth color of the (Y + 1)th row of the Xth column) )
- Finally, add that difference of M then times N to the value of the current color of the current pixel in the new sharper image like so:
Vnew = Vold + M * N
Addendum
I hope I succeeded in communicating in a way that anyone from any programming language can understand. If you have a suggestion, or a way to improve the legibility of this answer, then go right ahead
精彩评论