Dynamic modelling for image analysis