private void OnFrames(FrameSet frames) { using (var depthFrame = holeFilling.ApplyFilter( temporal.ApplyFilter( spatial.ApplyFilter( frames.DepthFrame)))) using (var points = pc.Calculate(depthFrame)) using (var f = frames.FirstOrDefault <VideoFrame>(stream)) { pc.MapTexture(f); memcpy(verticesPtr, points.VertexData, points.Count * 3 * sizeof(float)); e.Set(); } }
public override Frame Process(Frame frame, FrameSource frameSource, FramesReleaser releaser) { return(_enabled ? _pb.ApplyFilter(frame as VideoFrame) : frame); }