The answer using the maximum intensity approach
Using IMERODE

fine lines, but there is an improvement
with output of imerode
don't forget to change resolution for each image
THIS IS ALMOST DONE!
DONE

This code is correct. Adjusting the threshold should do the trick now.
Merge pull request #1 from eeshitv/THRESHOLD-with-max-intensity

Threshold with max intensity