CS 143 / Project 1 / Image Filtering and Hybrid Images

For this project, I didn't use many of the built in funcitons from matlab. Instead, I calculated the pixel values manually because the resulting code seemed much easier to understand. There might be some performance hit for doing it this way (as opposed to using the native dot product for example) but it seems fast enough and I would rather have clean code. My code has the same effect as imfilter() if the image was padded with zeros. While I don't use padarray() or anything similar, I ignore values outside the image, which is funtionally the same as setting them to zero since they would not add to the total anyways.

Examples

All of the examples below were created using proj1.m. You can drag to resize them. I did not include the image created by vis_hybrid_image() as I feel that drag-to-resize provides a better interface. I also removed the handle images from the resizing plugin so they would not cover up the image at small image sizes. Even though it may not appear that they images are resizeable, please be assured that they are if you drag from the bottom right corner. I have forced the aspect ratio to stay maintained. Images may have to resized to be very small for the effect to work.

Images