Image Quality Assessment (IQA) 1.1.2
A fast, accurate, and reliable C library for measuring image quality.
All the IQA algorithm functions follow a similar prototype:
iqa_<algorithm>( <reference image>, <modified image>, <width>, <height>, <stride>, <other info>);
The only header file your code should need to include is "iqa.h". This file defines the main API for IQA.
IQA is compiled as a static library so it is linked directly into your application (there is no *.so or *.dll).
Here's a simple example showing how to calculate PSNR:
That's it (seriously).
Some algorithms support additional configuration parameters. Here's an example that calculates the SSIM index using different weighting factors (a=0.5, b=1.34, c=0.5):
#include "iqa.h" float ssim; struct iqa_ssim_args args; args.alpha = 0.5f; args.beta = 1.34f; args.gamma = 0.5f; args.L = 255; // default args.K1 = 0.01; // default args.K2 = 0.03; // default args.f = 0; // default // Load reference and modified images. ssim = iqa_ssim(img_ref, img_mod, width, height, stride, 1, &args); if (ssim == INFINITY) // Error