NHacker Next
  • new
  • past
  • show
  • ask
  • show
  • jobs
  • submit
Removing blur from images – deconvolution and using simple image filters (bartwronski.com)
nomel 654 days ago [-]
At one time I wanted to see if I could pre-deconvolve what's shown on a computer screen so that a person with a slight vision problem could use it without having to wear glasses, using their blurry eyes to convolve the images back to the original image. I found a paper/website that did this (can't find it anymore), with some example images of text, and it worked fairly well, but spatial resolution was very limited.

One interesting limitation is that negative brightness is needed to make it work without distortion. Limiting the brightness range of the image, so that black can act as a sort of "darker than possible" level helps.

bartwr 654 days ago [-]
That's a super interesting idea and I think should work very well. If it was combined with the use of camera (for tracking the distance away from the monitor / screen) I think it could work very well; especially that noise / quantization / compression is not a problem in such a case.
anon_123g987 654 days ago [-]
The paper:

O. Keleş, E. Anarım: Adjustment of Digital Screens to Compensate the Eye Refractive Errors via Deconvolution.

Link to PDF:

https://www.researchgate.net/profile/Emin-Anarim/publication...

loxias 654 days ago [-]
Dude. I have... multiple books on my shelf about Deconvolution (though more 1 dimensional than 2 dimensional)... never even heard of this and am tickled pink :D Thanks! (and thanks grandparent for remembering it)

Will 100% post to HN ~should~ when I try implementing it.

credit_guy 653 days ago [-]
I find it very unlikely to work.

Convolution smooths out functions. If you convolve any function with a Gaussian kernel, you get a C^infinity function (a function that has continuous derivatives of arbitrary order).

This anti-blurring effect would attempt to find for a given function f another function g so that g convolved with a Gaussian kernel is f. But if f is discontinuous no such function exists.

This is not just academic. Letters on a screen are discontinuous functions.

You could say that a certain amount of smoothness is tolerated. Or that all signals are discretized anyway, so the whole concept of continuity is mathematical non-sense.

So, what I provided is just heuristics, is not a solid proof. It's still in principle possible to produce such a anti-blurring algorithm, I just find it highly unlikely, I would not invest much time in it.

ardourdev 653 days ago [-]
Look up computer generated holography! It is certainly possible to calculate a hologram of a letter which focuses at some different depth than the screen.

There are issues which arise from restricting the hologram to a real valued grid, like limited FoV and noise, but these are not impossible problems to solve and existing technology is already quite good in terms of image quality.

654 days ago [-]
t8y 654 days ago [-]
Maybe it could be used to make VR and AR headsets that have no lenses.
Beldin 654 days ago [-]
Despite not having read the article, I feel compelled to plug my students' port of a deblur algorithm to Gimp.

https://www.open.ou.nl/hjo/stud-finished.htm#elseenton

Thesis (unfortunately) in Dutch, but a writeup in English (on SoylentNews) is linked. Moreover, its pictures speak volumes. And the plugin worked back then - if it doesn't, let me know and I'll see what I can do (ie. reach out to the authors)

gus_massa 654 days ago [-]
I think combining a version of your post in SoylentNews and adding a few examples would make an interesting post. Are you still working on this?

In the page 51 of your tesis is a form with a lot of parameters to tweak. Is that a manual process or there is some automatic adjustment?

I just noticed that you have some examples in the "Appendix b" of your thesis (page 72 of the pdf). The first time I stopped reading once I reached the bibliography.

wazoox 654 days ago [-]
See this page for examples: https://sites.google.com/site/jspanhomepage/l0rigdeblur

impressive!

rasz 653 days ago [-]
sadly no, this is it https://www.open.ou.nl/hjo/software/text-deblur.htm

and the results https://www.open.ou.nl/hjo/supervision/2016-deblur-bsc-thesi... dont look as mindblowing as google ones

gus_massa 654 days ago [-]
Nice work, but IIUC it's made by a different research group.
bee_rider 654 days ago [-]
Note that this is their students' thesis, not theirs.
Beldin 654 days ago [-]
I really appreciate the interest!

I'll try to find some time for a reply going into some details, but I need to suit down at a computer undisturbed for an hour or so (also to refresh some things), which is hard to fit in the next few days. So don't hold your breath; I'll do my best.

dimatura 654 days ago [-]
Deblurring is a classical ill-posed inverse problem where no matter how much math you throw at it (and there's lots of very interesting work in that vein) at the end of the day, data-driven solutions (i.e., ML) will work best for most cases. The only caveat is that ML solutions can be somewhat riskier in that you increase the chances of hallucinating false details, but given the quality of current SOTA it's often an acceptable trade-off (application-dependent, of course).

Another caveat: for ML-based solutions, data is key, and a lot of early work on ML-based deblurring suffered from the fact that the "blurry" image data was synthetically created by blurring sharp images. Thankfully, the community has come to realize this and has taken steps to fix it, by collecting "real" blurry datasets and creating more realistic synthetic blurry datasets.

SilverBirch 654 days ago [-]
Well this depends on the application right, if I zoom in on an image in twitter and see some detail that wasn't really there... who cares?

If I then go on to present that detail in a court of law as evidence of image manipulation, or some characteristic that doesn't exist, or to persuade people the evidence is fallible even though it originally wasn't. Well that's a problem, and it's a difficult problem because it comes down to difficult problems around what you're adveritising you're doing and what people trust you to do. Maybe it doesn't come down to a point of law. Maybe it comes down to trolls on twitter repeating those arguments, but without the burden of proof.

dimatura 654 days ago [-]
Absolutely! Hence my caveat. Other scenarios where I'd be worried about hallucinations are in algorithms that control self-driving vehicles, or in medical-image analysis. I think accurately quantifying uncertainty for these problems (so that an algorithm, rather than just hallucinate, might say "I don't know") is an important and currently active research topic.
Scene_Cast2 654 days ago [-]
This is an ongoing area of study. Here's a list of research (ML-focused) on the topic - https://github.com/subeeshvasu/Awesome-Deblurring

I personally used a technique (based on a paper from that list) that learns a kernel based on the idea that it's easier to learn a latent source image and a blur compared to learning a blurred image.

dymk 654 days ago [-]
Getting rate limit exceeded for most of the images that try to load
dark-star 654 days ago [-]
Wouldn't it be great if instead of stopping to deliver the images, Google would just massively scale them down and still serve them? That way they could be scaled up and deconvoluted to give back (almost) the original images...

;-)

HPsquared 654 days ago [-]
This kind of thing doesn't work so well if the blurred image has been compressed (e.g. jpeg). A lot of information is hidden in the blurred image which gets removed by the compression algorithm.
EricAAJohnson 654 days ago [-]
Some great questions and answers on deconvolution at Signal Processing Stack Exchange: https://dsp.stackexchange.com/questions/tagged/deconvolution....
omarhaneef 654 days ago [-]
Now I have to file this link for when someone makes fun of "computer, enhance" in sci fi (Blade Runner comes to mind)
thanatos519 654 days ago [-]
Speaking of Blade Runner, back when I had an 800x600 projector, I was having a hard time not noticing the DLP squares. I had a 1080p copy of Blade Runner. I downscaled it with a strong Lanczos filter, so the video looked too sharp. Then I put the projector slightly out of focus. The DLP squares disappeared, but the blur also compensated for the sharpening and the video looked amazingly non-digital.
Sharlin 654 days ago [-]
Basically what the low-pass filter in digital cameras does.
anon_123g987 654 days ago [-]
I think the most famous example of using this technique, that's maybe easier to remember and refer later, is the correction of the flawed mirror of the Hubble Space Telescope.

https://www.nasa.gov/content/hubbles-mirror-flaw

https://en.wikipedia.org/wiki/Hubble_Space_Telescope#Flawed_...

IAmEveryone 654 days ago [-]
That was always stupid and there were always demonstrations of said stupidity. It’s one of those snarky contrarian takes people repeat ad nauseam. See also: correlation and causation.
balaji1 654 days ago [-]
is there a simple way to detect blur? I want the iPhone to show an alert that the previous photo was blurred - I ended up with a blurred photo of text on a poster as I walked past it.
loxias 654 days ago [-]
Look at the frequency spectrum. If you consider focus, or "blurness" a parameter that varies, the value where the picture is "least blurry" or "most in focus" tends to be a local maxima of the power of the higher frequency components.

When the picture is crisper edges will be more pronounced, which is high(er) frequency information. So the high frequency power would be at a local maxima.

(If that doesn't make sense yet, try imagining the opposite :D When a picture is the "most blurred" or "most out of focus" it looks like a soft colorfield. low frequency :D)

anon_123g987 654 days ago [-]
There's no simple and easy way as far as I know, but there are many approaches both for blur detection and automatic correction (kernel estimation). It's called blind deconvolution.

https://en.wikipedia.org/wiki/Blind_deconvolution

melony 654 days ago [-]
The next step is belief propagation and Ising models
iphoneeveryone 651 days ago [-]
Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact
Rendered at 18:32:26 GMT+0000 (Coordinated Universal Time) with Vercel.