View my account

D435i Camera UDP Streaming to Remote PC

Comments

14 comments

  • MartyG

    Hi Fikrat Gasimov RealSense 400 Series cameras can be configured as network cameras in order to stream depth, infrared and RGB from a single-board computer using the Ubuntu OS (such as Raspberry Pi and Jetson) to a full PC.  The data can then be accessed on the full PC with tools such as the RealSense Viewer as though the camera is attached directly to the PC.  Intel have a white-paper guide for networking at the link below.

    https://dev.intelrealsense.com/docs/open-source-ethernet-networking-for-intel-realsense-depth-cameras

     

    Whilst the guide focuses on a wired ethernet networking connection, it states that it can be used with wi-fi too.

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Hi MartyG. 

    Thanks for your support. Let me provide more clear information:

    my target is NOT to attach camera to PC. Infact, target is to embed camera on jetson, and make remote streaming from jetson to pc based on Wifi Or Ethernet. And I dont want to use Realsense Viewer GUI. But I want to use RTSP protocol or Socket in order to visualize on PC Remote.

    0
    Comment actions Permalink
  • MartyG

    The camera is not attached to the main PC in the Intel networking system.  It is attached to the single-board computer (such as Jetson) and the streams are sent to the PC over the network connection and viewed on the PC.  

    If you do not wish to use the Viewer then the networked streams can be accessed with your own program scripting instead.  Examples of this can be found at the links below.

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

     

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

     

    A simpler approach that could be considered is to use a remote access tool such as Chrome Remote Desktop which enables direct control of another computer over an internet connection from a PC or tablet.  So a main PC could use Chrome Remote Desktop to control a Jetson board with a camera attached and view what is running on the Jetson on the PC's display.

    https://remotedesktop.google.com/

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Thanks $MartyG for your support. I clearly studied your requests. I would like to note that I DONT want to use any webbrowser, or gui but i want to stream video  with my code, based on protocol of Ethernet  like TCP,  in order to elaborate further. Is it possible ?

    0
    Comment actions Permalink
  • MartyG

    There is an earlier RealSense networking system called EtherSense for Python that uses a TCP connection.

    https://github.com/krejov100/EtherSense

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Hi $Marty.

    I would like to use C++ APi di Realsense in way that I can start pipeline, to extract depth and color, then align them. Meanwhile, i have to  extract distance based X, Y, Z coordinates of detected object. Accordingly, I would like to write color frame to VideoWriter of OpenCv. 

    Can you advice me ?

    0
    Comment actions Permalink
  • MartyG

    There is not a single complete script that does everything that you asked for, but you may be able to combine the code of the separate C++ OpenCV references in the links below.

     

    Depth-color alignment - 'rs-grabcuts' example

    https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv/grabcuts

     

    Write color to video file with VideoWriter - use CV_FOURCC('M', 'J', 'P', 'G')

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

     

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

     

    Get distance in meters

    https://github.com/IntelRealSense/librealsense/issues/6101#issuecomment-602161932

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Thanks $MartyG for your support.

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Hi MartyG.

    Could you please tell me how to get 3D (X,Y,Z) World Coordinates with realsense d435i (C++) between camera and object once I calculated distance from depth of video frame? 

    0
    Comment actions Permalink
  • MartyG

    I hope that the C++ information at the link below will be helpful to you in retrieving the XYZ world coordinates.

    https://github.com/IntelRealSense/librealsense/issues/10621#issuecomment-1164386826

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Thanks MartyG. When I want to calculate 3D center Point Coordinates of Object,

    rs2_deproject_pixel_to_point(Point,&depth_intrin,depth_pixel,udist);

    depth_pixel is intended to be which pixel??
    for my case, is (width/2, height/2)?? width and height is retrieved from depth frame.
    Please let me know about your point of view.

     

    0
    Comment actions Permalink
  • MartyG

    width/2 and height/2 is the center pixel of the image for the currently set resolution. 

    0
    Comment actions Permalink
  • Fikrat Gasimov

    Dear MartyG,

    but When I do this :

    1.distance is float number achieved from depth.

    2. Width and Height are achieved from depth

     

     rs2_deproject_pixel_to_point(Point, &intrinsic,  ((width / 2),(height / 2)), distance);

    it shows an error: what is the problem here? I can not still resolve it

    cannot convert ‘float’ to ‘const float*’ for argument ‘3’ to ‘void rs2_deproject_pixel_to_point(float*, const rs2_intrinsics*, const float*, float)’
           rs2_deproject_pixel_to_point(Point, &intrinsic,  ((width / 2),(height / 2)), distance);

    Please let me know

    0
    Comment actions Permalink
  • MartyG

    Does the error still occur if you use static void instead of void?  For example:

     

     static void rs2_deproject_pixel_to_point(float point[3], const struct rs2_intrinsics * intrin, const float pixel[2], float depth)

    0
    Comment actions Permalink

Please sign in to leave a comment.