Matlab libraries for EM image processing