The following image is a mask derived from an imaged feature which extends to the top of the frame, but due to some lighting effects the top portion doesn't come in. Bear in mind that this is one example, and the feature moves around to some degree in each measurement.
I've been dealing with this by combining this mask with it's vertically reflected cousin:
mask = ImageAdd[mask,ImageReflect[FillingTransform@Erosion[mask, DiskMatrix], Top]]
But often this feature isn't quite so symmetric in the x-direction, and sometimes appears skewed from the vertical, so this solution isn't very robust.
Is there a good way to morphologically extend the mask to the top of the image?