Go to the source code of this file.
Data Structures |
| struct | iqa_ssim_args |
| struct | iqa_ms_ssim_args |
Functions |
| float | iqa_mse (const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride) |
| float | iqa_psnr (const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride) |
| float | iqa_ssim (const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride, int gaussian, const struct iqa_ssim_args *args) |
| float | iqa_ms_ssim (const unsigned char *ref, const unsigned char *cmp, int w, int h, int stride, const struct iqa_ms_ssim_args *args) |
Function Documentation
| float iqa_ms_ssim |
( |
const unsigned char * |
ref, |
|
|
const unsigned char * |
cmp, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
stride, |
|
|
const struct iqa_ms_ssim_args * |
args |
|
) |
| |
Calculates the Multi-Scale Structural SIMilarity between 2 equal-sized 8-bit images. The default algorithm is MS-SSIM* proposed by Rouse/Hemami 2008.
See https://ece.uwaterloo.ca/~z70wang/publications/msssim.pdf and http://foulard.ece.cornell.edu/publications/dmr_hvei2008_paper.pdf
- Note:
- 1. The images must have the same width, height, and stride.
-
2. The minimum image width or height is 2^(scales-1) * filter, where 'filter' is 11 if a Gaussian window is being used, or 9 otherwise.
- Parameters:
-
| ref | Original reference image |
| cmp | Distorted image |
| w | Width of the images. |
| h | Height of the images. |
| stride | The length (in bytes) of each horizontal line in the image. This may be different from the image width. |
| args | Optional MS-SSIM arguments for fine control of the algorithm. 0 for defaults. Defaults are wang=0, scales=5, gaussian=1. |
- Returns:
- The mean MS-SSIM over the entire image, or INFINITY if error.
Definition at line 129 of file ms_ssim.c.
| float iqa_mse |
( |
const unsigned char * |
ref, |
|
|
const unsigned char * |
cmp, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
stride |
|
) |
| |
Calculates the Mean Squared Error between 2 equal-sized 8-bit images.
- Note:
- The images must have the same width, height, and stride.
- Parameters:
-
| ref | Original reference image |
| cmp | Distorted image |
| w | Width of the images |
| h | Height of the images |
| stride | The length (in bytes) of each horizontal line in the image. This may be different from the image width. |
- Returns:
- The MSE.
Definition at line 37 of file mse.c.
| float iqa_psnr |
( |
const unsigned char * |
ref, |
|
|
const unsigned char * |
cmp, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
stride |
|
) |
| |
Calculates the Peak Signal-to-Noise-Ratio between 2 equal-sized 8-bit images.
- Note:
- The images must have the same width, height, and stride.
- Parameters:
-
| ref | Original reference image |
| cmp | Distorted image |
| w | Width of the images |
| h | Height of the images |
| stride | The length (in bytes) of each horizontal line in the image. This may be different from the image width. |
- Returns:
- The PSNR.
Definition at line 38 of file psnr.c.
| float iqa_ssim |
( |
const unsigned char * |
ref, |
|
|
const unsigned char * |
cmp, |
|
|
int |
w, |
|
|
int |
h, |
|
|
int |
stride, |
|
|
int |
gaussian, |
|
|
const struct iqa_ssim_args * |
args |
|
) |
| |
Calculates the Structural SIMilarity between 2 equal-sized 8-bit images.
See https://ece.uwaterloo.ca/~z70wang/publications/ssim.html
- Note:
- The images must have the same width, height, and stride.
- Parameters:
-
| ref | Original reference image |
| cmp | Distorted image |
| w | Width of the images |
| h | Height of the images |
| stride | The length (in bytes) of each horizontal line in the image. This may be different from the image width. |
| gaussian | 0 = 8x8 square window, 1 = 11x11 circular-symmetric Gaussian weighting. |
| args | Optional SSIM arguments for fine control of the algorithm. 0 for defaults. Defaults are a=b=g=1.0, L=255, K1=0.01, K2=0.03 |
- Returns:
- The mean SSIM over the entire image (MSSIM), or INFINITY if error.
Definition at line 59 of file ssim.c.