コード例 #1
0
 public static extern k4a_result_t k4a_calibration_3d_to_2d(
     [In] ref Calibration calibration,
     ref Vector3 source_point3d,
     Calibration.DeviceType source_camera,
     Calibration.DeviceType target_camera,
     out Vector2 target_point2d,
     out bool valid);
コード例 #2
0
        public ArrayImage <Short3> DepthImageToPointCloud(Image depth, Calibration.DeviceType camera = Calibration.DeviceType.Depth)
        {
            ArrayImage <Short3> pointCloud = new ArrayImage <Short3>(ImageFormat.Custom,
                                                                     depth.WidthPixels, depth.HeightPixels);

            DepthImageToPointCloud(depth, pointCloud, camera);

            return(pointCloud);
        }
コード例 #3
0
        public void DepthImageToPointCloud(Image depth, Image pointCloud, Calibration.DeviceType camera = Calibration.DeviceType.Depth)
        {
            lock (this)
            {
                if (disposedValue)
                {
                    throw new ObjectDisposedException(nameof(Transformation));
                }

                // Create a new reference to the Image objects so that they cannot be disposed while
                // we are performing the transformation
                using (Image depthReference = depth.Reference())
                    using (Image pointCloudReference = pointCloud.Reference())
                    {
                        AzureKinectException.ThrowIfNotSuccess(NativeMethods.k4a_transformation_depth_image_to_point_cloud(
                                                                   handle,
                                                                   depthReference.DangerousGetHandle(),
                                                                   camera,
                                                                   pointCloudReference.DangerousGetHandle()));
                    }
            }
        }
コード例 #4
0
 public static extern k4a_result_t k4a_transformation_depth_image_to_point_cloud(
     k4a_transformation_t transformation_handle,
     k4a_image_t depth_image,
     Calibration.DeviceType camera,
     k4a_image_t xyz_image);