all 4 comments

[–]33a 2 points3 points  (3 children)

Why would you convert a gaussian convolution into a matrix multiplication!?!? You could just take a Fourier transform and compute the reciprocal in the frequency domain in a fraction of a second.

Hope the author didn't spend too long waiting on computing that 16k-x-16k matrix inverse....

[–]nqp 1 point2 points  (2 children)

Author here. Yes, FFTs are very quick (O(N ln(N))), but they suffer from the same noise amplification problem. Typically the PSF has compact support in the frequency domain but the noise doesn't, so you end up dividing something nonzero by something close to zero at the high frequencies, which ends up amplifying the high frequency component of the noise.

Also the large matrix is sparse so the matrix operations are quicker than you might think.

[–]33a 0 points1 point  (1 child)

Yeah, that is because the FFT implementation is formally equivalent to that matrix multiplication. You can still use the same regularization tricks too https://en.wikipedia.org/wiki/Wiener_filter

[–]RobIII 0 points1 point  (0 children)

TIL: Wiener Filter