# Compute the function between two images

Take an image $$f$$ with some characters on it (below, hjFu3). Let's apply a filter $$h$$ on it to obtain a second image $$g$$ where the text is not visible.

Is there a way to compute what kind of filter $$h$$ we have applied ? The aim being that this filter should be applied to decode a new blurred image that was blurred with the same filter $$h$$.

Some remarks :

- Let $$\hat f=\text{fft}(f)$$. I computed $$\hat f$$ and $$\hat g$$. Then $$\hat h = \hat g / \hat f$$ (pointwise) and then we can compute the $$h$$ by inverse fft. - I noticed that $$g-f$$ gives a image which is readable and I think I should exploit this fact because I can't explain why I should obtain a readable image.

I know that I should use a deconvolution algorithm. The point is I don't know the PSF function, so a blind algorithm could the solution. However I don't have any success using typical blind deconvolution algorithm of matlab.

I would like to know if we can compute the psf function given that we have the orignal and final image.

Data for the problem :

$$f=$$

$$\qquad \quad \large \downarrow PSF ?$$

$$g=$$

• I don't that you can do it, in general. Let's consider a filter that averages all the values on the image, what would you do in that case? – nicoguaro Sep 20 at 19:01
• I tried some some blind deconvolution algorithms without success – Smilia Sep 21 at 16:25
• I agree with @nicoguaro that this seems unlikely to be solved without some assumptions or more data. If you had a lot of input-output image samples, you could perhaps find an operator to go from the output blurred image to the input one, but not sure if that's an option. – spektr Oct 4 at 5:31