In this part, 2D convolutions and filtering are explored.
In this part, finite difference filters Dx and Dy are applied.
$$ \mathbf{D_x} = \begin{bmatrix} 1 & -1 \end{bmatrix}, \quad \mathbf{D_y} = \begin{bmatrix} 1 \\ -1 \end{bmatrix} $$
Here, the noise issue observed in Part1.1 was addressed using the Gaussian filter as a smoothing operator. The 2D Gaussian kernel was obstained by generating a 1D Gaussian filter using cv2.getGaussianKernel() and then computing the outer product of this filter with its transpose. Compared the outputs, this process helps reduce the noise and provide a smoother version.
Next, a Derivative of Gaussian (DoG) filter is applied on the original image by convolving the Gaussian filter with the difference operators Dx and Dy. The outputs from this approach is the same with the two-step process before.
For image Sharpening, I first apply a Gaussian blur (low-pass filter) to the image to get a smooth version. I then substract this blurred image from the original image to get the high frequency details. These high frequency details are amplified by a factor α and added back to the original image, enhancing the clarity of the edges and finer details.
The mathematical expession is shown below:
$$ f + \alpha \left( f - f * g \right) = (1 + \alpha) f - \alpha f * g = f * \left( \left(1 + \alpha \right) e - \alpha g \right) $$
The goal of this part of the assignment is to create hybrid images using the approach described in the SIGGRAPH 2006 paper by Oliva, Torralba, and Schyns. Hybrid images are static images that change in interpretation as a function of the viewing distance. The basic idea is that high frequency tends to dominate perception when it is available, but, at a distance, only the low frequency (smooth) part of the signal can be seen. By blending the high frequency portion of one image with the low-frequency portion of another, a hybrid image is created that leads to different interpretations at different distances.
The goal of this part of the assignment is to blend two images seamlessly using a multi resolution blending as described in the 1983 paper by Burt and Adelson. An image spline is a smooth seam joining two image together by gently distorting them. Multiresolution blending computes a gentle seam between the two images seperately at each band of image frequencies, resulting in a much smoother seam.
A Guussian and a Laplacian stacks are implementated and applied to recreate the figure from the paper mentioned above.