Live data from Hacker News

It's all a blur

lcamtuf.substack.com

61–70 of 70 posts

Re: It's all a blur

#61
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…

> Sorry but this post is the blind leading the blind, pun intended. Allow me to explain, I have a DSP degree. FWIW, this does not read as constructive.

It also makes no sense to me, and I also have a DSP degree. Of course moving averages (aka box blurs) filter out higher frequencies more than middle frequencies.

Re: It's all a blur

#62

Earlier quoted context omitted.

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.

Oof, I hope not. I wonder if the architecture for GPU filters migrated, and this feature didn't get enough usage to warrant being rewritten from scratch?

Re: It's all a blur

#63
post #18

Earlier quoted context omitted.

The ability to reverse is very dependent on the transformation being well known, in this case it is deterministic and known with certainty. Any algorithm to reverse motion blur will depend on the translation and rotation of the camera in physical space, and the best the algorithm could do will be limited by the uncertainty in estimating those values. If you apply a fake motion blur like in photoshop or after effects…

I recall a paper from many years ago (early 2010s) describing methods to estimate the camera motion and remove motion blur from blurry image contents only. I think they used a quality metric on the resulting “unblurred” image as a loss function for learning the effective motion estimate. This was before deep learning took off; certainly today’s image models could do much better at assessing the quality of the unblurr…

Probably not the exact paper you have in mind, but... https://jspan.github.io/projects/text-deblurring/index.html

Re: It's all a blur

#64
Beautiful walkthrough. The key insight people miss is that "looks unreadable to humans" and "is information-theoretically destroyed" are very different bars. The blur looks opaque because our visual system is bad at detecting small per-pixel differences, but the math does not care about our perception.

Same principle applies to other "looks safe" redactions — pixelation with small block sizes, partial masking of credentials, etc. If you can describe the transform as a linear operation, there is probably a pseudoinverse waiting to undo it.

Re: It's all a blur

#65

> This nets us another original pixel value, img(8). This makes it all seem really too pat. In fact, this probably doesn't get us the original pixel value, because of quantizing deleting information when the blur was applied, which can never be recovered afterwards. We can at best get an approximation of the original value, which is rather obvious given that we can vaguely make out figures in a blurred image already.…

> You would be far less able to recover individual strands of hair in an image that was gaussian blurred. Frequency-domain deconvolution is frequency-domain deconvolution, right? It doesn’t really matter what your kernel is.

As I explain, you can't perfectly reverse these filters because of quantizing. The more the signal is attenuated, the more information is lost when quantizing. So yes, it does matter what your kernel is.

Re: It's all a blur

#66
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…

If you have an endless pattern of ..., -1, 1, -1, 1, -1, 1, ... and run box blur with a window of 2 or 4, you get ..., 0, 0, 0, 0, 0, 0, ... too. Other than that, you're not wrong about theoretical Gaussian filters with infinite windows over infinite data, but this has little to do with the scenario in the article. That's about the information that leaks when you have a finite window with a discrete step and start at…

A binomial is exactly equal to a repeated 2 sample box blur yes. That's exactly how you construct pascal's triangle.

For filter sizes > 2, box blurs are ass.

Re: It's all a blur

#67
post #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…

Using a caesar cypher as an intro without explaining the pro tool and framing the educational context properly is just shit pedagogy bro.

Go look up what a z-transform is, and begone.

Re: It's all a blur

#68
post #61

Earlier quoted context omitted.

> Sorry but this post is the blind leading the blind, pun intended. Allow me to explain, I have a DSP degree. FWIW, this does not read as constructive.

It also makes no sense to me, and I also have a DSP degree. Of course moving averages (aka box blurs) filter out higher frequencies more than middle frequencies.

Homework assignment: make a bode plot of the convolution filters [1 1 1] vs [1 2 1].

Which one turns +1, -1, +1, -1, .. into all zeroes?

You ought to know this because the fourier transform of [1 0 1] is a cosine of amplitude 2 on the complex unit circle e^(i*omega), which means the DC quefrency needs to be 2 to get the zeroes to end up at nyquist.

The frequency response H(z) (= H(e^i*omega)) of [1 1 1] on the other hand will have its minimum somewhere in the middle.

Also here's a post that will teach you how to sight read the frequency response of symmetric FIR filters off the coefficients: https://acko.net/blog/stable-fiddusion/

Re: It's all a blur

#69
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…

> Sorry but this post is the blind leading the blind, pun intended. Allow me to explain, I have a DSP degree. FWIW, this does not read as constructive.

The degree to which people defend poor scholarship and writing on HN these days is frankly pathetic.

There is nothing about that intro that is offensive. Reading comprehension ought to tell you that "pun intended" is a joke to make the bitter pill that OP wrote garbage easier to swallow.

Re: It's all a blur

#70
post #67
post #50

Earlier quoted context omitted.

"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…

Using a caesar cypher as an intro without explaining the pro tool and framing the educational context properly is just shit pedagogy bro. Go look up what a z-transform is, and begone.

Oh, I see. You're just an asshole.

My apologies for extending you the benefit of the doubt and distressing you thereby.

Post reply on HN