Last night I was working on creating some image processing routines with Processing. My focus was on using convolution matrices to implement a number of effects. With respect to image processing, a convolution matrix is useful for a variety of effects, like edge detection, blurring, sharpening, and embossing.
I had also written some methods/routines/functions (take your pick) that added or subtracted fixed color values from every pixel in an image. I had also written image AND and OR routines so that I could perform either a logical AND or a logical OR between every pixel in the source photograph and every pixel in the image created by one of the other filter effects I had written.
This got me to thinking. I thought it might be cute to see what happened if I were to ‘add’ two images together. I thought adding two faces together would be nice so I went to Google Image Search and searched on the keyword ‘portrait’. The first photo that showed up in my search was a White House portrait of Barack Obama. It instantly occurred to me that there was only one suitable matching photograph to use for the addition operation: an official White House portrait of George Bush.
I had to use Photoshop to insure that the two faces lined up reasonably well and that the images were of the same dimensions (I didn’t feel like writing a scaling function right then). I then ran the two portraits through my program and obtained the results shown above. Note that this is a slightly scaled down version of the original as the original was too large to display in this space.
Question: realistically – will I ever use this image addition routine to do ‘real’ work? I seriously doubt it. Call me a geek but I just happen to enjoy writing code. Anyway it’s time to put the keyboard aside and head out to the Schaumburg Prairie Arts Festival. Hopefully the rain will stay away.
Ad Astra, Jim