Example of a hybrid image.
The purpose of this project was to implement a filter application function in MATLAB, such that filters of arbitrary size could be applied to images of arbitrary size. This algorithm was then used to extract the high and low frequencies from hybrid-compatible images, such that the images could be combined in such a way that downsampling the final image results in an apparent change in image content. This project consisted of two main components.
The filter apllication algorithm I wound up using takes advantage of a couple built in functions of MATLAB, primarily the
padarray(args)
function and the im2col(img, [dims], type)
function, in order to quickly extract the appropriate column vectors from the input image and adjust the output image for losses along the borders (due to filter size.) My particular implementation utilizes the 'symmetric' flag for array padding and the 'sliding' flag for column vector extraction, in order to accurately apply a given filter. For color images, this process is repeated for each color channel, and the final image is created from the separate intensity matrices.
Below are the results of the filter application algorithm using the provided test suite of filters. The filters used are (from top left to bottom right) Identity, Blur (Gaussian), Large Blur (Gaussian), Sobel, Laplacian and High Pass.
![]() ![]() ![]() |
![]() ![]() ![]() |
The following are the results of combining the low freqnecies from one image with the high frequencies from annother to achieve a blending effect which becomes more apparent when the image is down sampled.