Change the .jpg and .bmp extensions to .png, I had the problem you had and this worked for me.
Also, you should uncomment these lines so you can see all the images proccessed:
Code:
//convexHullImage->Write("/ConvexHull.bmp");
//filteredImage->Write("Filtered.bmp");
__________________

2012 Head of Programming and Electrical
2013-14 Overall Team Captain and Programming Head
2012-14 Mentor of FLL Team Power Surge
2014 Dean's List Finalist
2014 CIR Xerox Creativity Award
Webpage