Member 12181090 Ответов: 0

Глубина преобразования данных облаков точек с помощью Kinect


I would like to transform the depth data from the entire scene of the view of the camera to point cloud.At this time i track and import only the human skeleton from the depth data.If someone could help me i would be grateful.

Here is the code:


// we got all frames
                if (multiSourceFrameProcessed && depthFrameProcessed && bodyIndexFrameProcessed)
                {
                    StringBuilder sb = new StringBuilder();
                    int len = 0;

                    //   this.coordinateMapper.MapDepthFrameToColorSpace(this.depthFrameData, this.colorPoints);
                    this.coordinateMapper.MapDepthFrameToCameraSpace(this.depthFrameData, this.cameraPoints);

                    // loop over each row and column of the depth
                    for (int y = 0; y < depthHeight; y += step)
                    {
                        for (int x = 0; x < depthWidth; x += step)
                        {

                            // calculate index into depth array
                            int depthIndex = (y * depthWidth) + x;

                            byte player = this.bodyIndexFrameData[depthIndex];

                            // if we're tracking a player for the current pixel, sets its color and alpha to full
                            if (player != 0xff)
                            {

                                //ty = ty + 1;
                                CameraSpacePoint p = this.cameraPoints[depthIndex];

                                // retrieve the depth to color mapping for the current depth pixel
                                //      ColorSpacePoint colorPoint = this.colorPoints[depthIndex];

                                // make sure the depth pixel maps to a valid point in color space


                                if (!(Double.IsInfinity(p.X)) && !(Double.IsInfinity(p.Y)) && !(Double.IsInfinity(p.Z)))
                                {
                                    sb.Append(String.Format(CultureInfo.InvariantCulture, "{0} {1} {2}  \n", p.X, p.Y, p.Z));


                                    if (this.NewPointEvent != null)
                                    {

                                        this.NewPointEvent(this, new NewPointEventArgs(p.X, p.Y, p.Z));
                                        len++;

                                    }
                                }




                            }
                        }


                    }
                }

/п.X,С. Г,стр. Z являются Х-Y-Z разместите человеческого скелета

Что я уже пробовал:

учебные пособия для облака точек и данных глубины

0 Ответов