CNR & MPI tool is a user-friendly software developed for the evaluation of the image quality in both RGB and image stacks aquired using a confocal microscope.


Developed at the Research Center "E. Piaggio", University of Pisa, both the freeware and the source code can  be downloaded at this link.


The developed code provides a method to assess the quality of bioimages and image stacks, both RGB and grayscale.

With this quantitative based approach, two indices are calculated: MPI (Mean Pixel Intensity) and CNR (Contrast to Noise Ratio), for each channel (red/green/blue) or for each slice constituting the stack.

A GUI (Graphical User Interface) was purposely created, that allows users to display the loaded image, binarize it and calculate and plot both the MPI and the CNR. The results are automatically saved in a text file. 

The algorithm to quantify the two indices is accorded to the equations found in the following research:


The code was tested with the Matlab version R2016b.

For additional information contact Michele Corti at


References: Magliaro C., Callara A.L., Mattei G., Morcinelli M., Viaggi C., Vaglini F., Ahluwalia A. "Clarifying CLARITY: Quantitative Optimization of the Diffusion Based Delipidation Protocol for Genetically Labeled Tissue"

available at