Пример #1
0
 private DepthMap CreateMap(Cluster cluster)
 {
     var map = new int[(int)cluster.Width + 1, (int)cluster.Height + 1];
     foreach (var point in cluster.AllPoints) {
         map[(int)(point.X - cluster.X), (int)(point.Y - cluster.Y)] = (int)point.Z;
     }
     return new DepthMap(map);
 }
Пример #2
0
 private void DrawClusterPoints(Cluster cluster, Brush brush, DrawingContext drawingContext)
 {
     foreach (var point in cluster.Points) {
         drawingContext.DrawRectangle(brush, null, new Rect(point.X, point.Y, clusterPointSize, clusterPointSize));
     }
 }
Пример #3
0
 private Contour CreateContour(DepthMap map, Cluster cluster)
 {
     return this.contourFactory.CreateContour(map, cluster.X, cluster.Y);
 }
Пример #4
0
 private void DrawCenter(Cluster cluster, DrawingContext drawingContext)
 {
     drawingContext.DrawEllipse(Brushes.Blue, null, new System.Windows.Point(cluster.Center.X, cluster.Center.Y), centerSize, centerSize);
 }