This project creates hybrid images by taking the low-pass filtered version from one image and the high-pass filtered version of another image, and combining them to form a hybrid. The high-pass filtered image is apparent when the image is rather large, and the low-pass filtered image is more visible when the image is sized down.
To figure out the value of each picture in the resulting image, you need to apply the filter on top of the image, with the pixel we are concerned with positioned in the middle of the filter. I accomplished this by creating a buffer matrix that would contain the pixel information of the pixels underneath the filter at a given point of the algorithm. I then proceeded to find the dot product of this buffer matrix with the filter. This is equivalent to multiplying each pixel in the image to the corresponding value in the filter, and then taking the summation of all of these values.
To deal with when the pixels underneath the filter do not exist (outside the boundaries of the image), we just put a value of zero for that pixel.
![]() ![]() ![]() |