Particle size measurement of TEM images using Matlab

I post here a program called CSD useful for the measurement of particle size distributions of BF TEM and DF STEM images. I wrote it using Matlab and can be downloaded for free.

26 february 2016:  I updated the latest version and corrected it for a bug: Now CSD  2016 is available, and the histogram is correctly updated when particles are deleted.

 For download please send info of your institution using the Contact form.Matlab

  • The software works only in Windows. And for its execution Matlab 2102b or the MCR of Matlab 2012b  must be installed in the computer. 21 March 2016:  Version 2014b of Matlab has introduced major changes in the way of displaying GUIs, so programs that work correctly in previous versions of Matlab are not displayed correctly in Matlab 2014b. CSD  has been corrected to include the changes of visualisation of Matlab 2014b.
  • The user’s manual of the program: small PDF icon  
  • You can check also the next video:


  • Citation and Reference: Gontard, LC; Ozkaya, D; Dunin-Borkowski,RE. A simple algorithm for measuring particle size distributions on an uneven background from TEM images. Ultramicroscopy 111 (2011) 101-106. small PDF icon

Institutions that have used this software:

Brookhaven National Laboratory (USA)/ University College London, Electronic & Electrical Engineering (UK)/ Atatürk University (Turkey)/ ER-C Forschungszentrum Juelich (Germany)/ Razi University, Kermanshah (Iran)/ Johnson Matthey Technology Centre (UK)/ University of Mohaghegh Ardabili (Iran) /Instituto de Ciencia de Materiales de Sevilla (Spain)/University of Windsor (Canada)/ College of Engineering & Technology ( BPUT ) Techno campus, Ghatikia, Bhubaneswa (India)/ Institute of Materials Science, University of Connecticut, (USA)/Pennathur Lab University of California, Santa Barbara(USA)…

49 thoughts on “Particle size measurement of TEM images using Matlab

    1. I’m interested in your works and want to try this program to determine the particle size, can you please send the program to me? Thank you!
      China Agriculture University

        1. Hi,
          I have downloaded the software on my computer,and also downloaded MATLAB Compiler Runtime(R2012b, 8.0 version) from the website you given in the manual, but when I open CSD3_1.exe, it turned out that an four line Error:

          Could not find version 8.0 of the MCR.
          Attempting to load mclmcrrt8_0.dll.
          Please install the correct version of the MCR.
          Contact your vendor if you do not have an installer for the MCR.

          Please help me with the problem, thanks!

    2. Hi,

      I am interested in using the image analyse technique to quantify the coherence length in dark-field TEM image. Could you let me know where I can fill the contact form?

      University of Leeds

  1. Would you provide CSD software? I would like to measure TEM image grain size distribution, but I just started. Thank you

    1. Hi Eric, I have sent you now the link for downloading the software and some exmaple files. Let me know if you find any problem. Thanks

  2. can you please give me the input parameters which you had adopted in your work such as
    Number of divisions
    Minimum size (nm)
    Magnification (x)

    1. Dera Fatma, I do not understand well your questions about number of divisions, minimum size…etc.
      Those parameters depend on your image.

      If you want you can send me one of your images to check if they are suitable for measuring the particles sizes.

      I have sent you an email with a link to download the software and a manual where it is explained how to chose those parameters.

      1. Thank you for replying
        Could you please send me the original image with the parameters used in your paper ?

        1. Hi Fatma, did you check the email that I sent you? The email contains a link with software and test images. One of the images that is provided is exactly one of the same catalyst used in the paper. Check the manual: Please, download the software and follow the user manual where you can vary the parameters

          Also, if you read the paper the main parameters used for that particular image (see figure 2 and figure 3c).

          Please, can you tell me which is your affiliation? And on what type of images are you interested in?

          1. I can not download the software from the link !
            I am interested in SOFC fuel cell microstructure analysis which consist of a composite material with different particle size distribution. So, my objective is to study the different particle size distribution from the SEM images.

          2. Hi Fatma, I resent you the email. I also attached I attached also the image shown in the Figure 2 of my paper.
            It was binned by two, and the parameters used were: Number of divisions=30 and Minimum size=5

  3. Thank you for your help!
    I need also to know the Magnification of your image in order to determine the real particle size.

    1. Dear Fatma, in the figure 2 of the paper you can see the scale bar, if you know the width of the image and the number of pixels (e.g., in the horizontal dimension) you can work out the pixel size in nanometers. That is the information that you need to calibrate your image and to quantify the size of the nanoparticles. For the image that I sent you (the one in the Figure 2 of the paper L. Cervera Gontard et al. / Ultramicroscopy 111 (2011) 101–106), the width is approximately 1000 nm or 1 micrometer, and the size of the image is 2048 x 2048 pixels. Therefore, the pixel size is 1000/2048=0.4883 nm.

    1. Hi. You can send me an email using the contact form of this webpage with your affiliation and I will send you a link to download the software.


    1. Hi Yasim, waht is you affiliation and what type of samples do you want to examine?

      I will send you an email with a link to download the sample

      1. Dear Admin,
        I am working as a Lecturer in the Department of Physics, University of Agriculture Faisalabad, Pakistan.
        I wanna measure the particle size from TEM and high speed imaging.

        Dr. Yasin

  4. Hi, I would like to download this software and 3D models using an SEM too.
    can you send them for me?
    can you help me, I have this code of them for matlab?

  5. Hi ,
    I’d like to download the software. Could you please send me the link?
    Thanks a lot,

  6. Hi,
    Now I am working with some microparticles but I have not been able to determine the size of the particles since they have an irregular size. I have seen your post on researchgate where You suggest your software, so I’d like to try it out.
    Jorge Molina

  7. Hi,
    I would like to distinguish powder particles and determine PSD from a SEM image. Kindly send me the link to your software.

  8. Hi,

    I am interested in the software to measure nanoparticles, may I request a download link from you, please?

    Thank you,

    Best Regards,

    1. I’m very interested in your works and want to try this program to determine the particle size. Can you please send the program to me? Thank you!
      China Agriculture University

  9. Hi,

    This software looks awesome and I would like to test it out. Could you please send me the program. Thanks!

  10. Hi Lionel,
    could you please send the program. I’ve a small query related to particles shape. Would it be able to recognize cubical particles?

Leave a Reply

Your email address will not be published.