- Joined
- Oct 11, 2006
- Messages
- 2,189
- Format
- Multi Format
If you want to pursue sharpening more deeply, I suggest learning how to create plug-ins for Gimp. Then you can sharpen any way you want. In the 1990s, HP printers had an internal feature which engineers called the "variable sharpener" designed to avoid halos by varying the sharpening-factor based on I forget what. It worked well, and you might find the algorithm in patents. Anyway, I encourage you to experiment with sharpening algorithms.
Mark
Thanks for the suggestion. I am not sure that my programming skills would be up to the task of writing plugins for Gimp.
To discuss things further, from a theoretical perspective the very best way to sharpen is to apply a deconvolution function tailored to the point spread function of the image.
If one has somehow obtained the point spread function that is responsible for loss of sharpness in the image, then the one can take the Fourier transform of the point spread function and use that to find out which spatial frequencies to tweek (enhance) to sharpen the image.
If one then takes the Fourier transform of the actual image and then tweeks the spatial frequency components of the transformed image function according to what was found in the previous paragraph, and then does an inverse Fourier transform back to image space the result will be a sharpened image.
One advantage of this approach is that it does not assume anything about the functional form of the point spread function or the blurring function used in an unsharp masking procedure. For example, it doesn't assume that those will be gaussian functions.
However, this is not necessarily an easy way to do it for a number of reason. The first is that the user probably doesn't actually know what the proper point spread function is, so in practice there will probably be a mismatch in the functions to use in the procedure.
A second reason is that 2D Fourier transforms involve fairly lengthy calculations, so the process using FTs will probably be slow. One way around this might be to do a direct deconvolution (which can be implemented in the form of a convolution) using a localized sharpening function. That method would only need to look at small parts of the image at a time. It might be faster, though I couldn't say for sure. However, this relies on the deconvolution function to be localized do it doesn't require too much computation to do the deconvolution.
A third reason is that the point spread function is probably not the same over the whole picture, so likely only part of the picture will become well-sharpened. The rest will be under-sharpened, or maybe even over-sharpened. This is actually a disadvantage using unsharp procedures as well.
One thing to keep in mind is that any sharpening method is going to increase noise in the image. For example, it will accentuate graininess and scanner noise. This is of course well known, though I am not sure it is always fully appreciated.
Another thing to keep in mind is that, for technical reasons and as a practical matter sharpening can only be taken so far. It is unlikely that one could take a really blurry image and produce a really sharp image that doesn't have a lot of artifacts introduced during the sharpening process, such as funky boundary regions around points and edges (Halos are one example) and huge noise issues.
Thanks for the suggestion. I am not sure that my programming skills would be up to the task of writing plugins for Gimp.
Programs such as Topaz AI do a great job with sharpening when used judiciously.
So I tried what you suggested on a real photo and it didn’t really work. I used a blur dimension that just produced obvious halos and then divided that by 8 and ran it 8 times.
I didn’t get any sharpening of the actual features of the image. Just the grain was sharpened until it became terrible noise.
So I thought maybe I should try it with simple black and white blobs like you so I produced a block of dimension 8x and blurred it by 16x then sharpened it with a blur dimension of 1x 8 times and it didn’t get any sharper but instead I saw a lot of banding
So I thought maybe I should try it with simple black and white blobs like you so I produced a block of dimension 8x and blurred it by 16x then sharpened it with a blur dimension of 1x 8 times and it didn’t get any sharper but instead I saw a lot of banding
All photographs are interpretations. I've seen a lot of analog black and white photographs of scenes that were probably originally in color.
Unsharp masking was an analog technique before it was used on digital images - it was a lot harder to do of course, because the practitioner had to make a physical unsharp mask as a slightly defocused duplicate of the original image. It can be used for local contrast enhancement (high spatial frequency) while reducing global contrast (at low spatial frequency).
Alan, I think it would be useful if in addition to calculating simple gaussian models, you tried the experiment by using the sharpening filter implemented in Gimp, Photoshop or similar. Take an image and try to sharpen it two ways: either with one moderate filter or N applications of a filter smaller in radius by some factor (eg smaller by sqrt(N)). On real images, repeated sharpening tends to amplify noise and the resulting image is not pleasing.
I think you just need to try it yourself on an actual photo because it doesn’t sharpen anything but the noise. There is no improvement in sharpness to the image and it pretty much just deep fries it
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?