Ejemplo n.º 1
0
        public void ProcessSigns(Rectangle[] original, Rectangle[] detected)
        {
            allOriginalCount_ += original.Length;
            allDetectedCount_ += detected.Length;

            originalDetectedCount_ += original.Count(o => detected.Any(d => d.IntersectsWith(o)));
            falseAlarmCount_ += detected.Count(d => !original.Any(o => o.IntersectsWith(d)));
        }
Ejemplo n.º 2
0
 static Rectangle FindPosition(Size size, Rectangle[] regions)
 {
     var result = new Rectangle {Size = size};
     var increment = (int) (size.Height * 1.5);
     while(regions.Any(r => r.IntersectsWith(result)))
         result.Y += increment;
     return result;
 }