Table of Contents
QccIMGImageColorSNR - copy image
#include "libQccPack.h"
double QccIMGImageColorSNR(const QccIMGImage *image1, const QccIMGImage
*image2);
QccIMGImageColorSNR() calculates a color distortion
between two images. This color distortion is a signal-to-noise ratio (SNR)
based on the 1964 CIE formula for the distance between two colors as calculated
in the CIE Modified UCS color space. QccIMGImageModifiedUCSColorMetric(3)
is used to calculate these UCS color-space distances.
Both image1 and image2
must have the same size. Furthermore, all three YUV image components within
each image must be the same size as well.
If the pixels of image1
are (U1, V1, W1) in Modified UCS color space, and pixels of image2 are
(U2, V2, W2), the color SNR between the two images is SNR = 10 * log
(D1 / D2). D2 is the average squared distance (1964 CIE formula) between
the two images, D2 = mean((U1 - U2)^2 + (V1 - V2)^2 + (W1 - W2)^2). D1 is the
average squared distance between the pixels of image1 and the mean color,
(u1, v1, w1) = (mean(u1), mean(v1), mean(w1)), of image1; that is, D1
= mean((U1 - u1)^2 + (V1 - v1)^2 + (W1 - w1)^2).
This routine returns
the value of the calculated SNR, or 0.0 in case of an error.
QccIMGImageModifiedUCSColorMetric(3)
,
QccIMGImage(3)
, QccIMGImageComponent(3)
, imgdist(1)
, QccPackIMG(3)
, QccPack(3)
Copyright (C) 1997-2021 James E. Fowler
Table of Contents