예제 #1
0
        public bool Match(List <Vector2> positions, float threshold, float minimalScore, float minSize)
        {
            if (positions.Count < samplesCount)
            {
                return(false);
            }

            if (!positions.IsLargeEnough(minSize))
            {
                return(false);
            }

            List <Vector2> locals = GoldenSection.Pack(positions, samplesCount);

            float score = GoldenSection.Search(locals, points, -MathHelper.PiOver4, MathHelper.PiOver4, threshold);

            return(score > minimalScore);
        }
예제 #2
0
 public void CloseAndPrepare()
 {
     points = GoldenSection.Pack(points, samplesCount);
 }