/// <summary> /// Compute the image digest for an image given the input image /// </summary> /// <param name="image">CImg object representing an input image</param> /// <param name="sigma">double value for the deviation for a gaussian filter function</param> /// <param name="gamma">double value for gamma correction on the input image</param> /// <param name="numberOfAngles">int value for the number of angles to consider.</param> /// <returns></returns> internal static Digest ComputeDigest(ByteImage image, double sigma, double gamma, int numberOfAngles = 180) { var blurred = image.Blur(sigma); blurred.DiviveInplace(blurred.Max()); blurred.ApplyGamma(gamma); var projs = FindRadonProjections(blurred, numberOfAngles); var features = ComputeFeatureVector(projs); return(ComputeDct(features)); }
/// <summary> /// Compute the image digest for an image given the input image /// </summary> /// <param name="image">CImg object representing an input image</param> /// <param name="sigma">double value for the deviation for a gaussian filter function</param> /// <param name="gamma">double value for gamma correction on the input image</param> /// <param name="numberOfAngles">int value for the number of angles to consider.</param> /// <returns></returns> protected static Digest ComputeDigest(ByteImage image, double sigma, double gamma, int numberOfAngles = DEFAULT_NUMBER_OF_ANGLES) { var blurred = image.Blur(sigma); blurred.DivideInplace(blurred.Max()); blurred.ApplyGamma(gamma); var projs = FindRadonProjections(blurred, numberOfAngles); var features = ComputeFeatureVector(projs); return(ComputeDct(features)); }