this homework is optional :) — but it will be nice if you want to try to do these things by hand.
try to implement convolution with a 3×3 kernel, ie, blurring the image with a kernel as we looked at in class (you can try in photoshop, under filter -> custom). some kernels can be found online, but a common one is:
1 2 1
2 4 2
1 2 1
(weight is 16)
Try doing a sharpen and blur filter. Don’t worry about the edge pixels for now, so you can write for loops like:
for (int i = 1; i < width - 1; i++)
instead of
for (int i = 0; i < width; i++)
try also implementing the “erosion” and “dilation” algorithms we talked about in class. Can you make a white region grow bigger or smaller ?
some links might help:
http://docs.gimp.org/en/plug-in-convmatrix.html
http://www.gamedev.net/reference/articles/article2007.asp
http://www.dspguide.com/ch25/4.htm
http://www.mathworks.com/access/helpdesk/help/toolbox/images/index.html?/access/helpdesk/help/toolbox/images/f18-12508.html&http://www.google.com/search?hl=en&q=erosion+dilation+example&btnG=Search
have fun !