bht = BottomHatTransform[i, 2]
b = Dilation[Binarize[bht], 1]
m = ImageMultiply[b, bht]
Row[{i, ImageAdd[m, i]}]