Changed morphological image processing demo to run with different flags