ImageMagick.ChannelPerceptualHash.SumSquaredDistance C# (CSharp) Метод

SumSquaredDistance() публичный Метод

Returns the sum squared difference between this hash and the other hash.
public SumSquaredDistance ( ChannelPerceptualHash other ) : double
other ChannelPerceptualHash The to get the distance of.
Результат double
    public double SumSquaredDistance(ChannelPerceptualHash other)
    {
      Throw.IfNull(nameof(other), other);

      double ssd = 0.0;

      for (int i = 0; i < 7; i++)
      {
        ssd += (_SrgbHuPhash[i] - other._SrgbHuPhash[i]) * (_SrgbHuPhash[i] - other._SrgbHuPhash[i]);
        ssd += (_HclpHuPhash[i] - other._HclpHuPhash[i]) * (_HclpHuPhash[i] - other._HclpHuPhash[i]);
      }

      return ssd;
    }