Filter is done over each color image.
These are repeated for each channel and then are combined for the final image.
Hybrid images are the result of combining the low frequencies of one image with the high frequencies of another. The low frequency image is obtained by filtering the image with a guassian filter. The high frequency image is the result of filtering the image with (unit impulse - guassian filter), where the unit impulse is a filter with the same dimension of the guassian with 1 in the center and 0's elsewhere. Two guassian filters were used, allowing one to specify the cutoffs for high and low frequencies independently.
for (i=1:num_channels)
fR = double(int8(size(filter, 1))/2);
fC = double(int8(size(filter, 2))/2);
%Init filtered image
padded = padarray(image(:,:,i), [fR-1, fC-1], 'symmetric');
%obtain the blocks, as columns
blocks = im2col(padded, (size(filter)), 'sliding');
%Reshape filter to a row vector
filter_row= filter(:);
%Perform filtering
processed = filter_row * blocks;
%Reshape resulting pixels back to correct dimensions
result(:,:,i) = col2im(processed, size(filter), size(padded), 'sliding');
end
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
![]() ![]() ![]() ![]() |
Column 1: Low Frequencies of Image 1
Column 2: High Frequencies of Image 2
Column 3: Sum of the images produces a hybrid image
Column 4: Visualization of hybrid images
![]() ![]() ![]() ![]() |
Blur, laplacian, high frequencies, sobel