File Exchange

image thumbnail

Image Quality - Index Analysis GUI

version (1020 KB) by Aristidis Vaiopoulos
This GUI measures the image quality/error between 2 or more images (original,test1/test2/.../testn).


Updated 11 Sep 2013

View Version History

View License

GUI that enables the user to calculate 8 image indices:

1) Bias,
2) CC (Correlation Coefficient),
3) DIV (Difference in Variance)
4) ED (Entropy Difference),
6) UIQI,
7) RASE and
8) RMSE.

The scope of this GUI is to measure the image quality/error between 2
(original/reference image, processed/distorted image) or more images.

The image quality is estimated and quantified by the respective 8 image
indices which are calculated locally (in a neighborhood). User can
specify the size of the neighborhood, by setting the FOCAL SIZE parameter

User can opt to calculate any number of the 8 indices for 2 or more
images (batch mode). So it can be characterized as a batch image index
analysis tool. The index analysis results are written in an Excel file,
named "Focal image analysis.xls" in the same folder. Every index result
is written in its homonymous spreadsheet. If there is no Microsoft Excel
installed in the current computer, the index analysis results are written
in a *.CSV file.

If the user wishes to study and visualize how each index has performed
locally, he can check the button "Export index maps", which results in
outputting every index map for every TEST (processed) image.

Despite the fact that this program has been initially designed in order
to evaluate satellite imagery, all of the 8 above indices can be used for
digital images of any origin (although some of them are specialized for
quality assessment in satellite datasets). Basically, this program is an
enhanced version of this submission:

There are 2 major improvements compared to the above submission:
1) The ability to calculate and evaluate every index locally in the image
2) The form of this program: GUI vs. script (previous)

0) Add to path the folder that includes imanalysis_gui function. Also add
all subfolders which are in the same folder with imanalysis_gui.m + fig.
This can be done quickly (and temporarily) by running install_temp.m.
1) Run the GUI by typing imanalysis_gui in Matlab's command window.
2) Load your original (reference) image by clicking the ORIGINAL button.
3) Load your test(s) (processed) image(s) by clicking the TEST(s) button.
4) You can set the output folder, by clicking the 'Set' pushbutton.
However, you may find it useful that by default the program outputs to
the folder containing the original image.
5) Choose which indices you want the program to calculate. You can select
all indices at once, by pushing the 'All' button, under 'Select:' text.
6) You may want to change the FOCAL_SIZE parameter, which as mentioned,
specifies the size of the neighborhood or "window" (filter) in which each
index will be calculated. The larger the focal size, the more the
computations, the more the required time. Usually, we use a neighborhood
of 7 or 9. It is best to input an odd value in this parameter.
7) Optionally, you can check the export index maps button, if you want
the program to output the "index maps" for each index and test image. If
you work with georeferenced imagery, you will probably want to check the
export georeference button as well.
8) Press the 'Analyze!' button.
9) The program performs index analysis with your options. Messages should
appear in the command window, which state its current task. When all
calculations have finished, an Excel (or CSV - read above) file is
created with the results. If you wanted to export the index maps, you can
find them in the newly created folder 'Index maps' (which will be in the
same folder with the GUI).

Important Facts:
1) You can use 2D (grayscale) or 3D (color with 3 or more bands) imagery.
2) Every TEST image must have the exact same resolution and dimensions
with the ORIGINAL image.
3) The ED index is always calculated after conversion to 8bits.

Oldest version known to have full compatibility: R2011a.
Older versions than R2011a should work if the export index maps option is
off. If you have an older version of Matlab, but want to export the index
maps, then you can download the geotiffwrite function from FEX, and
modify this code accordingly, so it works for you.

Image processing toolbox
Mapping toolbox (geotiffwrite)

A. D. Vaiopoulos, "Developing Matlab scripts for image analysis and
quality assessment", Proc. SPIE 8181, 81810B (2011);
Link of the above paper:

Cite As

Aristidis Vaiopoulos (2021). Image Quality - Index Analysis GUI (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (14)

Aristidis Vaiopoulos

I found out where the link was.
Thank you for bringing it to my attention.

Aristidis Vaiopoulos

Dear Mohd Shafiq,
Can you please remind me where you found this link?

Mohd Shafiq

Shaojuan Xu

Dear Aristidis,

thank you very much for the helpful program.

I got a problem with the Index maps options. If the program run with this option, it appears an error saying ''Reference to non-existent field 'GeoTIFFTags'.
Error in ==> geotiffclone at 20
GTT_GKDT = gti.GeoTIFFTags.GeoKeyDirectoryTag;'' .

Do you have any idea what could cause the problem?

Looking forward to hearing from you,

Aristidis Vaiopoulos

Dear Riad,

In order to use all the functionality of the program, you have to add ALL folders and subfolders in Matlab path.
This can be done easily by typing:


which is in the parent folder.
Alternatively, you can right click the folder where you have extracted the files > Add to path > Selected folders and subfolders.

Have a nice day!

Riad Arefin

Here said :
0) Add to path the folder that includes imanalysis_gui function. Also add
all subfolders which are in the same folder with imanalysis_gui.m + fig.
This can be done quickly (and temporarily) by running install_temp.m.


imanalysis_gui function contains::::"""focal:""""" folder this folder contains 2D and 3D folder... in add to path folder which folder I show? In sub folder which folder I show?

Please inform me immediately.

Thank you

Riad Arefin

Hello I want to carry fused image quality ineix therefore i download """Image Quality - Index Analysis GUI"". I install Matlab 2017a 64 bit software. Now I want to install """Image Quality - Index Analysis GUI"" but can not do it.

0) Add to path the folder that includes imanalysis_gui function. Also add
all subfolders which are in the same folder with imanalysis_gui.m + fig.
This can be done quickly (and temporarily) by running install_temp.m.

in this step i may doing wrong. please give me instruction guide for this """Image Quality - Index Analysis GUI"" extention installation to matlab.. i am doing wrong therefore i can not open the Image Quality - Index Analysis GUI box.

Thank you!

rayyar marram


Rahman Momeni

Aristides, thanks for your quick and detailed respond. Also some questions are coming to my mind I would be grateful to have your thought on them.

Does your code measure ERGAS based on spectral or spatial properties or average of both?
How does ERGAS ratio work? And how user can allocate right value for it?

As you said your developed method, averaging the result of those two common strategies (you mentioned) used for assessing the quality of fused images, how about “other validation protocols which include the panchromatic band”, Could you please elaborate on what are these validation protocols?

I was wondering if you could kindly send me your master thesis and its relevant paper which I would be able to understand better your approach.

My email address is

Many Thanks,

Dear Rahman,

Thank you for your kind words and your interest in this software.
You made a really good question.
Traditionally, there were two main groups of pansharpening researchers.
The first group fused the original images and evaluated the fused imagery using as "original" (reference) image an "upscaled" resampled multispectral image (nearest neighbor or bicubic resampling) which had the exact same resolution with the panchromatic.
The second group, took the original datasets and downsampled both of them, according to the resolution ratio of the size of multi/pan pixel. For example, for WorldView-2 imagery where the multispectral image has 4 times larger pixel size than the panchromatic (2m/0.5m), both datasets will be downsampled 4 times. This means that if the original pan had dimensions of 4000x4000 and the original multi dimensions of 1000x1000x8, the new downsampled datasets will have dims of 1000x1000 and 250x250x8. At this point, all fusion methods are performed to the downsampled datasets. Using such a methodology, the fused imagery will now have the exact same resolution with the original multispectral image before the downsampling (1000x1000x8), which is now used as the reference image for pansharpening evaluation.
One can see that these methods have advantages and drawbacks. The most important disadvantage is that the high spatial information contained in the original panchromatic image is neglected in both situations. This is why in my master thesis I proposed a methodology where both of the above methods are applied and averaged with other validation protocols which include the panchromatic band.
In short, most of the papers featuring pansharpening evaluation through image quality indexes, rather fall on the first or the second group (unless they explicitly mention something else).
I hope I answered your question.. or at least clarified things a bit?
Also, just in case, I would like to inform you that a standalone version of this program is available here:

Best wishes,

Rahman Momeni

Thanks a lot for providing this very useful Matlab code.

My question is what type of imagery we should used here for "original" image, is it initial multi-spectral (with larger pixel size) or panchromatic image (with smaller resolution)? Because the enhanced image has the spatial resolution of panchromatic and has different pixel size and size with initial multi-spectral(with larger pixel size)?
Many Thanks,

Aristidis Vaiopoulos

you 're welcome :)



MATLAB Release Compatibility
Created with R2012b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: progressbar, dlmcell

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!