A Robust Algorithm for Automated Analysis of DNA Molecules in AFM Images