Пример #1
0
    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();
                }
    }
Пример #2
0
 private void OnFrameSet(FrameSet frames)
 {
     using (var aligned = aligner.Process(frames))
     {
         using (var f = aligned[sourceStreamType])
         {
             using (VideoFrame vPost = f as VideoFrame)
             {
                 using (VideoFrame v1 = decimationFilter.ApplyFilter(vPost))
                 {
                     using (VideoFrame v2 = spatialFilter.ApplyFilter(v1))
                     {
                         using (VideoFrame vOut = temporalFilter.ApplyFilter(v2))
                         {
                             OnFrame(vOut);
                         }
                     }
                 }
             }
         }
     }
 }
Пример #3
0
 public override Frame Process(Frame frame, FrameSource frameSource, FramesReleaser releaser)
 {
     return(_enabled ? _pb.ApplyFilter(frame as VideoFrame) : frame);
 }