Example #1
0
 public void AddResult(HoughResult result)
 {
     ShiftLevels();
     foreach (var solid in result.SolidLines)
     {
         AddLine(solid);
     }
     foreach (var dash in result.DashLines)
     {
         AddDashLine(dash);
     }
 }
Example #2
0
 public void AddResult(HoughResult result)
 {
     ShiftLevels();
     foreach (var solid in result.SolidLines)
     {
         AddLine(solid);
     }
     foreach (var dash in result.DashLines)
     {
         AddDashLine(dash);
     }
 }
Example #3
0
 public HoughResult GetCachedResult()
 {
     var result = new HoughResult();
     var realLines = new List<LineSegment2D>();
     foreach (var level in levels_)
     {
         var last = level.Value.Where(_ => !_.HasChild);
         foreach (var line in last)
         {
             var history = line.GetAllLineHistory();
             if (LineHistory.IsReal(history.Count))
             {
                 //realLines.Add(history.First().Segment);
                 realLines.Add(SegmentHelper.MergeSegments(history.Select(c => c.Segment).ToArray()));
             }
         }
     }
     result.SolidLines = realLines.ToArray();
     result.DashLines = new DashLineSegment2D[0];
     return result;
 }
Example #4
0
        public HoughResult GetCachedResult()
        {
            var result    = new HoughResult();
            var realLines = new List <LineSegment2D>();

            foreach (var level in levels_)
            {
                var last = level.Value.Where(_ => !_.HasChild);
                foreach (var line in last)
                {
                    var history = line.GetAllLineHistory();
                    if (LineHistory.IsReal(history.Count))
                    {
                        //realLines.Add(history.First().Segment);
                        realLines.Add(SegmentHelper.MergeSegments(history.Select(c => c.Segment).ToArray()));
                    }
                }
            }
            result.SolidLines = realLines.ToArray();
            result.DashLines  = new DashLineSegment2D[0];
            return(result);
        }