- Remember that OpenCV works with BGR, so when you convert, use the CV_BGR2GRAY
- Be careful with the threshold in Canny, they should be different and with a ratio of 2 or 3( recommended). Might try 100-200...
- Try to avoid printing in every loop, that slows down a little bit your code
- For filters, try not to use a big window. A size 3 0r 5 at most is usually fine (Depending on your application). A size 11 is probably not required.
- consider using cv::Mat. It is far more flexible than IplImage and in fact ( no more Release Image...)