Example of a hybrid image. Step back from your computer screen to see the dog.
My first encounter with the hybrid image technique was a while back when I saw the Einstein/Monroe image by Aude Olivia published in Wired Magazine. Since then I was mesmerized by this great trick and yet again after learning how simple is the algorithm. Creating hybrid images consists of three parts:
The success of the algorithm consists mainly by the alignment of visual forms in the images and the manipulating filter thresholds.
Image 1 (low frequency) and Image 2 (high frequency)
![]() |
Hybrid image at various sample sizes. As the image shrinks high frequencies are removed revealing the low frequencies.
For image compositing piecewise addition is not recommended as provided by the stencil, instead using a blend function provided better results as seen below.
![]() |
%padding an image
padarray(image, [pad_row pad_col], padding_mode);
%piecewise multiplication
A .* B
%size
% returns a vector with size with each element representing the size of the dimension
size(A)
%sum
% caveat: won't return single value for mutliple dimensional array (wrap sum according to dimensions)
sum(A)
%functions to explore
gpuArray()
![]() ![]() ![]() ![]() |
![]() ![]() |
Identity, Small Blur, Large Blur, Sobel Filter, Laplacian, High Pass.