View my account

streaming RGBD data to a remote location

Comments

6 comments

  • MartyG

    Hi Irit Taragan  The only C# possibility that I can think of is to embed a web browser window into a C# application and stream the camera data to that embedded browser panel.

    https://github.com/IntelRealSense/librealsense/issues/7362#issuecomment-693462166

    0
    Comment actions Permalink
  • MartyG

    If the remote location is within 100 meters / 300 foot of the camera then you could also consider using a long fiber optic cable to transmit the data, like in the RealSense demonstration by the high-quality USB equipment supplier Newnex at the link below.

    https://www.youtube.com/watch?v=GLQgR1jT04M

    0
    Comment actions Permalink
  • Irit Taragan
    Thank you so much for the quick response
    I am trying to transfer the RGBD image via WebRTC. 
    in order to do so i need to enter the images of the RGB and depth as byte array.
    each time i copy or moving a frame, the camera is stuck.
    is there an example of working maybe with webRTC or of coping the FrameSet in C# without it effect the camera streaming?
    i am using Unity SDK 2.0 and tried to use the RSDevice.cs WaitForFrames'
      private void WaitForFrames()
      {
          while (!stopEvent.WaitOne(0))
          {
              //using (var frames = m_pipeline.WaitForFrames())
              var frames = m_pipeline.WaitForFrames();
                  RaiseSampleEvent(frames);
              if (frameQueue.Count < 10)
              {
                  frameQueue.Enqueue(frames.Clone());
              }
              frames.Dispose();
          }
      }
    the frame queue is my addition. should i use the RsProccessingPipe insted? (i tried it 2 but i am sure i am missing something)
    again, 
    thanks for your help
    0
    Comment actions Permalink
  • MartyG

    My research of your question did not find relevant resources about WebRTC and C#, unfortunately.  The alternative approach of copying frames showed some promise, though.  The answers from Intel RealSense team members that I saw suggested storing frames in the computer's memory with a RealSense SDK instruction called keep().

    https://github.com/IntelRealSense/librealsense/issues/5565

    https://github.com/IntelRealSense/librealsense/issues/6125

    https://github.com/IntelRealSense/librealsense/issues/1000

    0
    Comment actions Permalink
  • Irit Taragan

    Thank you very much! it works 
    using a concurrent FrameSet queue , my RSDEvice looks like this:

    private void WaitForFrames()
    {
        while (!stopEvent.WaitOne(0))
        {

            var frames = m_pipeline.WaitForFrames();
            RaiseSampleEvent(frames);
           
            frames.Keep();

            if (frameQueue.Count >= 5)
            {
                // Remove and dispose of the oldest frame in the queue
                if (frameQueue.TryDequeue(out var oldFrame))
                {
                    oldFrame.Dispose();  
                }
            }
            frameQueue.Enqueue(frames);
        }
    }

     

    0
    Comment actions Permalink
  • MartyG

    You are very welcome.  I'm pleased to hear that Keep() worked for you.  Thanks very much for the update and the sharing of your C# code!

    0
    Comment actions Permalink

Please sign in to leave a comment.