예제 #1
0
        public void AddLine(LineSegment2D segment)
        {
            var parent    = FindParent(segment);
            var cacheLine = new LineHistory(segment, parent);

            levels_[0].Add(cacheLine);
        }
예제 #2
0
파일: LineHistory.cs 프로젝트: zyh329/adas
 public LineHistory(LineHistory parent)
 {
     Parent = parent;
     if (parent != null)
     {
         Parent.Child = this;
     }
 }
예제 #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);
        }
예제 #4
0
파일: LineCache.cs 프로젝트: zyh329/adas
 public void AddLine(LineSegment2D segment)
 {
     var parent = FindParent(segment);
     var cacheLine = new LineHistory(segment, parent);
     levels_[0].Add(cacheLine);
 }
예제 #5
0
파일: LineHistory.cs 프로젝트: zyh329/adas
 public LineHistory(LineSegment2D segment, LineHistory parent)
     : this(parent)
 {
     Segment = segment;
 }
예제 #6
0
파일: LineHistory.cs 프로젝트: zyh329/adas
 public LineHistory(LineSegment2D segment, LineHistory parent)
     : this(parent)
 {
     Segment = segment;
 }
예제 #7
0
파일: LineHistory.cs 프로젝트: zyh329/adas
 public LineHistory(LineHistory parent)
 {
     Parent = parent;
     if (parent != null)
         Parent.Child = this;
 }