Automated AFM Processing

Project Description

Automated Flattening 


In 2012 we recognized a need for reliable, consistent, automated processing of the large data sets generated by high speed AFM.  To that end, we have developed an adaptive algorithm that imports AFM data, analyzes image content, and iteratively corrects for many common sources of geometric distortions in AFM data.

The algorithim is described in detail in a paper titled, “Large-scale analysis of high-speed atomic force microscopy data sets using adaptive image processing,” published in the Beilstein Journal of Nanotechnology in 2012.


Supported File Types

The program currently supports the latest releases of versions 5, 6, and 7 of the Nanoscope Software.  It also supports Versions 8.10 and 8.15 through Release 2.  The program can open later releases of 8.10 and 8.15 but does not support the Sneddon Model.

The program has limited support for Anfatec files as well as a generic image import feature. 


Planned Updates

The next planned update is to add support for the Sneddon Model in the latest release of the Nanoscope Software.


Additional Support

We recognize that the use of an automated tool such as this represents a significant change to the workflow of most end users, which may not be intuitive initially.  To that extent we would like to offer limited support to new users for initial parameter selection.  Send us a few representative images and we’ll let you know if they meet the basic requirements of the algorithm.  If the images do, we’ll send you back some starting parameters for the program as well as an explanation of why they were set that way.  If the images do not meet the basic requirements, well let you know why not.

For more details, please contact Blake.


Bugs and Comments

If you find any bugs, have any comments, or just have general questions, we’d love to hear from you.

Please contact Blake with bug reports or comments.

Compiled Binaries

The Matlab Compiler Runtime (MCR) is needed to run this program.  Please install this first before trying to run the compiled versions of the processing program.

The lastest versions of the MCR can be dowloaded here.


Release Version
Release Date
Notable Changes
Automated AFM Processing Windows March 27, 2012 Initial Release
Automated AFM Processing Mac OS X March 27, 2012 Initial Release
User Manual March 27, 2012 Initial Release


Source Code

   The automated flattening program was written in MATLAB.  It requires a recent version of MATLAB, the curve fitting tool box, statistics toolbox, and the image processing toolbox.  Please make sure that these are all installed before trying to run the software.


Development is currently done on MATLAB R2012B.  Support for previous versions cannot be guaranteed.


To start the program, run the script, “GUI_run_me.m”

Release Version
Release Date
Notable Changes
Automated AFM Processing March 27, 2013 Initial release


Creative Commons License
This work by EPFL STI IBI LBNI is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Based on a work at