Пример #1
0
        private double MatchRidgeCounts(JYMtiaDescriptor target)
        {
            double diff0 = Math.Abs(target.ridgeCount0 - ridgeCount0);
            double diff1 = Math.Abs(target.ridgeCount1 - ridgeCount1);

            return(3 * (Math.Pow(diff0, 2) + Math.Pow(diff1, 2)));
        }
Пример #2
0
        private double MatchBetaAngles(JYMtiaDescriptor target)
        {
            double diff0 = Angle.DifferencePi(target.beta0, beta0);
            double diff1 = Angle.DifferencePi(target.beta1, beta1);

            return(54 * (Math.Pow(diff0, 2) + Math.Pow(diff1, 2)) / Math.PI);
        }
Пример #3
0
        private double MatchDistances(JYMtiaDescriptor target)
        {
            double diff0 = Math.Abs(target.dist0 - dist0);
            double diff1 = Math.Abs(target.dist1 - dist1);

            return(diff0 + diff1);
        }
Пример #4
0
        private double MatchByType(JYMtiaDescriptor target)
        {
            int diff0 = target.MainMinutia.MinutiaType == MainMinutia.MinutiaType ? 0 : 1;
            int diff1 = target.NearestMtia.MinutiaType == NearestMtia.MinutiaType ? 0 : 1;
            int diff2 = target.FarthestMtia.MinutiaType == FarthestMtia.MinutiaType ? 0 : 1;

            return(3 * (diff0 + diff1 + diff2));
        }
Пример #5
0
        internal double RotationInvariantMatch(JYMtiaDescriptor target)
        {
            double distDiff       = MatchDistances(target);
            double alphaDiff      = MatchAlphaAngles(target);
            double betaDiff       = MatchBetaAngles(target);
            double ridgeCountDiff = MatchRidgeCounts(target);
            double mtiaTypeDiff   = MatchByType(target);

            double dist = Math.Sqrt(distDiff + alphaDiff + betaDiff + ridgeCountDiff + mtiaTypeDiff);

            return(dist < 66 ? (66 - dist) / 66 : 0);
        }
Пример #6
0
        internal double NoRotateMatch(JYMtiaDescriptor target)
        {
            if (!MatchMtiaDirections(target))
            {
                return(0);
            }
            double distDiff       = MatchDistances(target);
            double alphaDiff      = MatchAlphaAngles(target);
            double betaDiff       = MatchBetaAngles(target);
            double ridgeCountDiff = MatchRidgeCounts(target);
            double mtiaTypeDiff   = MatchByType(target);

            double dist = Math.Sqrt(distDiff + alphaDiff + betaDiff + ridgeCountDiff + mtiaTypeDiff);

            return(dist < 66 ? (66 - dist) / 66 : 0);
        }
Пример #7
0
        private bool MatchMtiaDirections(JYMtiaDescriptor target)
        {
            double diff = Angle.DifferencePi(target.MainMinutia.Angle, MainMinutia.Angle);

            if (diff >= Math.PI / 4)
            {
                return(false);
            }
            diff = Angle.DifferencePi(target.NearestMtia.Angle, NearestMtia.Angle);
            if (diff >= Math.PI / 4)
            {
                return(false);
            }
            diff = Angle.DifferencePi(target.FarthestMtia.Angle, FarthestMtia.Angle);
            if (diff >= Math.PI / 4)
            {
                return(false);
            }

            return(true);
        }
 private double MatchByType(JYMtiaDescriptor target)
 {
     int diff0 = target.MainMinutia.MinutiaType == MainMinutia.MinutiaType ? 0 : 1;
     int diff1 = target.NearestMtia.MinutiaType == NearestMtia.MinutiaType ? 0 : 1;
     int diff2 = target.FarthestMtia.MinutiaType == FarthestMtia.MinutiaType ? 0 : 1;
     return 3 * (diff0 + diff1 + diff2);
 }
        internal double RotationInvariantMatch(JYMtiaDescriptor target)
        {
            double distDiff = MatchDistances(target);
            double alphaDiff = MatchAlphaAngles(target);
            double betaDiff = MatchBetaAngles(target);
            double ridgeCountDiff = MatchRidgeCounts(target);
            double mtiaTypeDiff = MatchByType(target);

            double dist = Math.Sqrt(distDiff + alphaDiff + betaDiff + ridgeCountDiff + mtiaTypeDiff);

            return dist < 66 ? (66 - dist)/66 : 0;
        }
        private double MatchBetaAngles(JYMtiaDescriptor target)
        {
            double diff0 = Angle.DifferencePi(target.beta0, beta0);
            double diff1 = Angle.DifferencePi(target.beta1, beta1);

            return 54 * (Math.Pow(diff0, 2) + Math.Pow(diff1, 2)) / Math.PI;
        }
        private double MatchRidgeCounts(JYMtiaDescriptor target)
        {
            double diff0 = Math.Abs(target.ridgeCount0 - ridgeCount0);
            double diff1 = Math.Abs(target.ridgeCount1 - ridgeCount1);

            return 3 * (Math.Pow(diff0, 2) + Math.Pow(diff1, 2));
        }
        private bool MatchMtiaDirections(JYMtiaDescriptor target)
        {
            double diff = Angle.DifferencePi(target.MainMinutia.Angle, MainMinutia.Angle);
            if (diff >= Math.PI / 4)
                return false;
            diff = Angle.DifferencePi(target.NearestMtia.Angle, NearestMtia.Angle);
            if (diff >= Math.PI / 4)
                return false;
            diff = Angle.DifferencePi(target.FarthestMtia.Angle, FarthestMtia.Angle);
            if (diff >= Math.PI / 4)
                return false;

            return true;
        }
        private double MatchDistances(JYMtiaDescriptor target)
        {
            double diff0 = Math.Abs(target.dist0 - dist0);
            double diff1 = Math.Abs(target.dist1 - dist1);

            return diff0 + diff1;
        }
        internal double NoRotateMatch(JYMtiaDescriptor target)
        {
            if (!MatchMtiaDirections(target))
                return 0;
            double distDiff = MatchDistances(target);
            double alphaDiff = MatchAlphaAngles(target);
            double betaDiff = MatchBetaAngles(target);
            double ridgeCountDiff = MatchRidgeCounts(target);
            double mtiaTypeDiff = MatchByType(target);

            double dist = Math.Sqrt(distDiff + alphaDiff + betaDiff + ridgeCountDiff + mtiaTypeDiff);

            return dist < 66 ? (66 - dist) / 66 : 0;
        }