1. A method for processing an image comprising (i) receiving a user input identifying at least two objects within the image (ii) generating at least one input mask; (iii) applying a geodesic filter to the mask wherein the geodesic filter comprises an erosion operation with an erosion structuring element, a dilation operation with a dilation structuring element, and an image gradient factor; (iv) generating an output mask.