Live data from Hacker News

It's all a blur

lcamtuf.substack.com

41–50 of 70 posts

Re: It's all a blur

#41
post #7

Can this be applied to camera shutter/motion blur, at low speeds the slight shake of the camera produces this type of blur. This is usually resolved with IBIS to stabilize the sensor.

I believe Microsoft of all people solved this a while ago by using the gyroscope in a phone to produce a de-blur kernel that cleaned up the image.

Its somewhere here: https://www.microsoft.com/en-us/research/product/computation...

Re: It's all a blur

#42

Blur is perhaps surprisingly one of the degradations we know best how to undo. It's been studied extensively because there's just so many applications, for microscopes, telescopes, digital cameras. The usual tricks revolve around inverting blur kernels, and making educated guesses about what the blur kernel and underlying image might look like. My advisors and I were even able to train deep neural networks using only…

I didn't learn about this trick (deconvolution) until grad school and even then it seemed like spooky mystery to me.

Re: It's all a blur

#43
post #7

Can this be applied to camera shutter/motion blur, at low speeds the slight shake of the camera produces this type of blur. This is usually resolved with IBIS to stabilize the sensor.

I believe Microsoft of all people solved this a while ago by using the gyroscope in a phone to produce a de-blur kernel that cleaned up the image. Its somewhere here: https://www.microsoft.com/en-us/research/product/computation...

I wonder if the "night mode" on newer phone cameras is doing something similar. Take a long exposure, use the IMU to produce a kernel that tidies up the image post facto. The night mode on my S24 actually produces some fuzzy, noisy artifacts that aren't terribly different from the artifacts in the OP's deblurs.

Re: It's all a blur

#44
post #22

Sorry but this post is the blind leading the blind, pun intended. Allow me to explain, I have a DSP degree. The reason the filters used in the post are easily reversible is because none of them are binomial (i.e. the discrete equivalent of a gaussian blur). A binomial blur uses the coefficients of a row of Pascal's triangle, and thus is what you get when you repeatedly average each pixel with its neighbor (in 1D). Wh…

Interesting...I've used moving averages not thinking too hard about the underlying implications. Do you recommend any particular book or resource on DSP basics for the average programmer?

Re: It's all a blur

#45
post #26

Earlier quoted context omitted.

> just mask the sensitive data with a single color which is impossible to reverse (for rasterized images, this is not a good idea for PDFs Also not a good idea for masking already compressed images of text, like jpg, because some of the information might bleed out in uncovered areas.

Interesting - does a little extra coverage solve this or is it possible to use distant pixels to find the original?

yep, some padding fixes this

JPEG compression can only move information at most 16px away, because it works on 8x8 pixel blocks, on a 2x down-sampled version of the chroma channels of the image (at least the most common form of it does)

Re: It's all a blur

#46
post #26

Earlier quoted context omitted.

> just mask the sensitive data with a single color which is impossible to reverse (for rasterized images, this is not a good idea for PDFs Also not a good idea for masking already compressed images of text, like jpg, because some of the information might bleed out in uncovered areas.

Interesting - does a little extra coverage solve this or is it possible to use distant pixels to find the original?

I'm not super familiar with the jpeg format, but iirc h.264 uses 16x16 blocks, so if jpeg is the same then padding of 16px on all sides would presumably block all possible information leakage?

Except the size of the blocked section ofc. E.g If you know it's a person's name, from a fixed list of people, well "Huckleberry" and "Tom" are very different lengths.

Re: It's all a blur

#47
post #27

Captain Disillusion recently covered this subject in a more popular science format as well https://youtu.be/xDLxFGXuPEc

8 months ago, for those of us who got excited by the idea of a "recent" new video from CD.

In my defense, that is quite literally the most recent full video the Captain has uploaded!

Re: It's all a blur

#48

Blur is perhaps surprisingly one of the degradations we know best how to undo. It's been studied extensively because there's just so many applications, for microscopes, telescopes, digital cameras. The usual tricks revolve around inverting blur kernels, and making educated guesses about what the blur kernel and underlying image might look like. My advisors and I were even able to train deep neural networks using only…

Isn't that roughly (ok, very roughly) how generative diffusion AIs work when you ask them to make an image?

Re: It's all a blur

#49
post #7

Can this be applied to camera shutter/motion blur, at low speeds the slight shake of the camera produces this type of blur. This is usually resolved with IBIS to stabilize the sensor.

Absolutely, Photoshop has it: https://helpx.adobe.com/photoshop/using/reduce-camera-shake-... Or... from the note at the top, had it? Very strange, features are almost never removed . I really wonder what the architectural reason was here.

Just guessing, patent troll.

Re: It's all a blur

#50
post #22

Sorry but this post is the blind leading the blind, pun intended. Allow me to explain, I have a DSP degree. The reason the filters used in the post are easily reversible is because none of them are binomial (i.e. the discrete equivalent of a gaussian blur). A binomial blur uses the coefficients of a row of Pascal's triangle, and thus is what you get when you repeatedly average each pixel with its neighbor (in 1D). Wh…

"In today’s article, we’ll build a rudimentary blur algorithm and then pick it apart."

Emphasis mine. Quote from the beginning of the article.

This isn't meant to be a textbook about blurring algorithms. It was supposed to be a demonstration of how what may seem destroyed to a causal viewer is recoverable by a simple process, intended to give the viewer some intuition that maybe blurring isn't such a good information destroyer after all.

Your post kind of comes off like criticizing someone for showing how easy it is to crack a Caesar cipher for not using AES-256. But the whole point was to be accessible, and to introduce the idea that just because it looks unreadable doesn't mean it's not very easy to recover. No, it's not a mistake to be using the Caesar cipher for the initial introduction. Or a dead-simple one-dimensional blurring algorithm.

Post reply on HN