Model-based morphology: the opening spectrum