In this recipe, we shall demonstrate yet another filter named the Constrained Least Squares (CLS) filter in the frequency-domain. As the name of the filter suggests, it's an inverse (least squares) filter with an additional smoothness constraint that does not allow arbitrary high-frequency fluctuation in the restored image by imposing a smoothness constraint. You shall now learn how to implement a CLS filter and how to restore a degraded image by applying the filter on the image. Also, you shall compare the qualities of the restored images using different frequency-domain filter implementations such as inverse, Wiener, and CLS.
Restoring an image with the constrained least squares filter
Getting ready
Let's first...