Hello
im porting an app i made using kinect + openframeworks to c#,
so i took the kinect Shape Game wich comes with the developer toolkit ,
the app basically takes a line of pixels from the depthData and plot them into a X,Z representation
the problem is that its really slow , maybe im not drawing as i should ?
this is the code :
int pixelX = 0; int []planoPixels = new int[FrameDepthWidth]; for (int i = 0; i < FrameDepthWidth; i++) { pixelX = i; // obtener real world coordinates X,Y SkeletonPoint p = KinectSensorManager.KinectSensor.MapDepthToSkeletonPoint( DepthImageFormat.Resolution640x480Fps30, pixelX, pixelY, depthPixels[pixelX + pixelY * FrameDepthWidth ]); Ellipse ellipse = new Ellipse(); ellipse.Width = 2; ellipse.Height = 2; ellipse.Fill = Brushes.Red; Canvas.SetLeft(ellipse, p.X *80 ); Canvas.SetTop(ellipse, p.Z *80); planoXZ.Children.Add(ellipse); }
is this the way to draw dots in wpf apps ?
the code creates 640 ellipses at 10 fps