# Finding the Width of a Point Spread Function (PSF)

I have a binary image that has been convolved with the following PSF:

$$\mathrm{PSF}(x,y)=\cosh^{-2}\left(\frac{\sqrt{x^2+y^2}}{w}\right)$$ where $w$ is unknown.

The image binary image generally consists of contiguous black and white features that are larger than $w$. What is the most efficient way to estimate $w$? I typically don't have a problem to look at the image and provide an initial guess for $w$, and my goal is to get it accurately.

\begin{align} &= \end{align}

Let's look at the diagonal of your PSF, i.e. the points where $x=y$: \begin{align} \cosh^{-2}\left(\sqrt{x^2+y^2}/w\right)&\overset{x=y}= \exp\left(-2{\sqrt{2\frac{x^2}{w^2}}}\right) + \exp\left({2\sqrt{2\frac{x^2}{w^2}}}\right)\\ &=\exp\left(2\sqrt2 \frac xw\right)+ \exp\left(-2\sqrt2 \frac xw\right)\\ &=\cosh\left(\frac{2\sqrt2}w x\right)\\&=: d_P(x) \end{align}

Let us thus take the $x=y$ diagonal of your convolved image $d_g=g(x,x)$, and notice that it's the convolution of the diagonal of the original image $f(x,y)$ with $d_P(x)$.

\begin{align} d_g(x) &= d_f(x) * d_P(x)\end{align}

We have thus reduced your two-dimensional deconvolution problem to a one-dimensional one. Nice!

Next, let's get rid of actual image content. I'm from a digital communications background, so I'd actually try to convolve with different $\cosh$ scalings, and see which one of these scalings delivers me the highest "contrast".

One simple way is to identify zeros in the Frequency Domain.
This was one of the legitimate method for Blind Deconvolution few decades ago.

1. Draw the connection between the zeros in frequency domain of the Convolution Kernel to the parameter $w$.
2. Learn the zeros in frequency domain of the given image.
3. Find the $w$ which explains most of the zeros of the image.

It's pretty simple and for a parameterized family of PSF's can be quite efficient.