32 const QVector3D lhsYuv = RGBToYUV(lhs);
33 const QVector3D rhsYuv = RGBToYUV(rhs);
34 const float relativeLumaDiff =
35 0.5f *
std::abs((lhsYuv[0] - rhsYuv[0]) / (lhsYuv[0] + rhsYuv[0]));
36 const float colorDiff = QVector3D::crossProduct(lhsYuv, rhsYuv).length();
37 return colorDiff < tol && relativeLumaDiff < tol;