4 ms·
These really de-focused images are interesting for the article but if you can take a slightly out of focus image and make is laser-sharp then it is extremely us
by jakejake 11y ago
These really de-focused images are interesting for the article but if you can take a slightly out of focus image and make is laser-sharp then it is extremely useful for all kinds of photo and video applications. It's really tough to fix a shot that was slightly off when you're going for professional quality where you can't tell it was sharpened.
- slimsag 11y agoHighly agreed! I would be really curious to see if someone could take a slightly defocused picture and run it through this to see what it would produce / if it would introduce a bunch of undesirable effects or not.
- dpwm 11y agoI have tried the referenced implementation (SmartDeblur) on a few (similar) slightly de-focused images. From memory, I had the artefacts without any noticeable improvement. I don't think I even saved the results. YMMV and I would almost certainly try it on photographs with a larger blur than mine (approximately a disc kernel with radius of 0.8px). Since then I've been working on other methods with mixed results. I've found a few things out: Firstly, many articles mention some form of Richardson Lucy with regularization as if de-convolution with a known Point Spread Function is a solved problem. The regularization can indeed produce better results, but usually introduces new parameters. I've found, with real photographs, I have had far better results using less statistically sound methods. This is especially true as I've found that RL, more often than not, begins to diverge quite early. The reality is that there are papers surrounding deconvolution and blind deconvolution that get apparently good results and work poorly in practice. It is only once implemented that the flaws of the algorithms proposed are exposed. This is compounded by the fact that we have a wonderful error metric with this inverse problem: the euclidean distance between 1. the solution convolved with the point-spread function used for deconvolution; and 2. the original (blurred) image. With many algorithms, lowering the euclidean distance decreases the perceived quality by introducing more artefacts. Nonetheless, I have only seen a handful of papers that include this metric when considering a proposed regularisation scheme, and this is one of the only times when this particular metric makes any sense in computer vision -- if your deconvolution is working, and your PSF is correct (which it is in many cases as the blur is synthetic) then the euclidean distance is the measure you want. I have since switched to least squares using L-BFGS-B for fitting which has lowered again the Euclidean distance and produced the best, most natural-looking results by far on real photographic images. Unfortunately, estimating the PSF is difficult for small out-of-focus blurs. Optics applied to an ideal lens would suggest a disc kernel, but at this scale other factors are playing a part. I'll probably do a writeup of this when I'm done -- though I don't know when that will be. I'll also be putting any code on Github in due course. In the meantime if anybody has any pointers or is interested in further details or source code please grab my email address from my profile.