using dilated mask