Connect Intel Realsense with Python and OpenCV

Поделиться
HTML-код
  • Опубликовано: 12 сен 2024

Комментарии • 38

  • @yusufsoyceken858
    @yusufsoyceken858 9 месяцев назад +2

    The video was a quick and clear. Thanks!

  • @tangchuankai8801
    @tangchuankai8801 6 месяцев назад

    aboslutely great tutorial!

  • @jazzysehgal7543
    @jazzysehgal7543 Год назад +1

    Hey Man, are you using this on Jetson nano? because this pip pyrealsense2 install don't work with my jetson nano running 18.04 OS image. It gives the following error:
    ERROR: Could not find a version that satisfies the requirement pyrealsense2 (from versions: none)
    ERROR: No matching distribution found for pyrealsense2

    • @EngineeringCorner
      @EngineeringCorner  Год назад +1

      I haven’t used the jetson nano. But it sounds like you are using a version of python that doesn’t have pyrealsense2 yet. I think pyrealsense2 only is supported from python3.6 to python 3.10 right now.

    • @jazzysehgal7543
      @jazzysehgal7543 Год назад

      ​@@EngineeringCorner Thanks, What linux version your using 18.04? would this camera work with
      ROS Noetic Ninjemys ?

    • @EngineeringCorner
      @EngineeringCorner  Год назад

      @@jazzysehgal7543 Ubuntu 22.04 and I use ros2 humble. I have a video up already on how to interface with ros2

  • @ericsiasiewwei5227
    @ericsiasiewwei5227 Год назад

    Hello Nick, nice video! I wish to ask if it is possible to use Intel Realsense camera to perform face authentification? If yes, could you recommend where will be the best source to refer?

    • @EngineeringCorner
      @EngineeringCorner  Год назад +1

      While I have never done something like that I believe you could use something like opencv face recognition. Maybe a haar cascade classifier or eigenfaces? Once you get the rgb image it is in a format you can use with open cv and manipulate it however you like.

  • @noobymcleon880
    @noobymcleon880 11 месяцев назад

    Great Video!
    Does the min depth decrease when you increase the resolution? Trying this code now, and its seems the min depth is about 40 cm

    • @EngineeringCorner
      @EngineeringCorner  11 месяцев назад +1

      I do think certain factors matter. But haven’t looked at it in a while. I would start here dev.intelrealsense.com/docs/tuning-depth-cameras-for-best-performance . 40 seems I bit high. I think my min depth was around 30cm. It is also going to be dependent on the actual depth sensor model you are using.

  • @joel612
    @joel612 Год назад

    Hi! Firstly, thank you so much for this video! If its not too much to ask, can you kindly make a tutorial on how to setup a region of interest with the depth camera? I use a D435i and I'm trying to figure out how to make the camera detect objects in the specified roi. I use masked-rcnn for object detection and depth estimation. I'd be grateful to you for this 😅

    • @EngineeringCorner
      @EngineeringCorner  Год назад

      While I have performed object detection with a neural network in project I have never done this exactly. If I have an OpenCV frame then I start by just taking a selection of that frame. My video Loading and Displaying Images with Matplotlib (ruclips.net/video/yvP6HFy6b8o/видео.html ) may(?) be a good starting point for how to reference areas of an image you have but ultimately you wants to extract the rows and columns of the image for your ROI

  • @savannahpear1235
    @savannahpear1235 5 месяцев назад

    Hi! Thanks for the vid. I keep getting the error: ImportError: failed to enable the udev monitor, which is weird because the Realsense viewer is working. When I run it again, I get ImportError: generic_type: type "notification_category" is already registered! Any idea how to fix these issues??

    • @EngineeringCorner
      @EngineeringCorner  4 месяца назад

      Hmm not sure I have come across that particular error. If I come across anything will pass it on

  • @laracuevas5433
    @laracuevas5433 6 месяцев назад

    hi! I am trying to install the pyrealsense2 on my VisualCode Studio with Python 3.12.0 but the following messages appear: ERROR: Could not find a version that satisfies the requirement pyrealsense2 (from versions: none)
    ERROR: No matching distribution found for pyrealsense2

    • @EngineeringCorner
      @EngineeringCorner  6 месяцев назад

      It means that pyrealsense is not available for your version of python. On Pypi it says the highest version of python supported is 3.11

    • @EngineeringCorner
      @EngineeringCorner  6 месяцев назад

      Also From reading their GitHub it seems like that release should be soon
      github.com/IntelRealSense/librealsense/issues/12601

  • @b-lifestyle7263
    @b-lifestyle7263 4 месяца назад

    Hi! Thanks a lot for ur tutorial. I wanna ask the question. When I try to split the code into piece like this: on bash, python3 => Import pyrealsense2 as rs => rs.pipline() and it gets an error "AttributeError: module 'pyrealsense2' has no attribute 'pipline'". But I have already succeed when running on a file. What is difference between these two ways to run this code?

    • @EngineeringCorner
      @EngineeringCorner  4 месяца назад +1

      From your comment spelling. Is it pipeline not pipline?

    • @b-lifestyle7263
      @b-lifestyle7263 4 месяца назад

      Thanks for ur help. However, I had a problem. Hope you can check!
      I checked the connected USB and this is the result
      Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
      Bus 001 Device 004: ID 0000:3825 USB OPTICAL MOUSE
      Bus 001 Device 003: ID 2a7a:938f CASUE USB KB
      Bus 001 Device 002: ID 0bda:8152 Realtek Semiconductor Corp. RTL8152 Fast Ethernet Adapter
      Bus 001 Device 006: ID 8086:0b64 Intel Corp. Intel(R) RealSense(TM) 515
      Bus 001 Device 005: ID 0bda:0161 Realtek Semiconductor Corp. Mass Storage Device
      Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
      But I tried to run this code above and got an error:
      ```
      pipe.start(cfg)
      ```
      RuntimeError: No device connected
      So may I need to set up something else for it to work?@@EngineeringCorner

    • @EngineeringCorner
      @EngineeringCorner  4 месяца назад

      @@b-lifestyle7263 Tough to say exactly what it is. Does pipe.start() work without using any of the config options work? Are you able to see the camera with the realsense viewer sdk (google for the link)? Are you using pip or conda to install? There are quite a few github issues that you can start to work through that seem to have similar problems but it probably depends on your exact setup

  • @biginchi140
    @biginchi140 5 месяцев назад

    Is there any method to save the stream as .bag file ive been searching for a solution I haven't found any ... would be great

    • @EngineeringCorner
      @EngineeringCorner  5 месяцев назад +1

      Have never tried to do that. Not sure if you have ever come across this github.com/IntelRealSense/librealsense/issues/3671 but might be a place to start

    • @biginchi140
      @biginchi140 5 месяцев назад

      thank you this is perfect @@EngineeringCorner

  • @miguelangelavila7247
    @miguelangelavila7247 Год назад

    Hello, I hope you are very well, I would like to know if you have a code that can calculate the sizes of 3d objects in boxes specifically through these cameras.

    • @EngineeringCorner
      @EngineeringCorner  Год назад +1

      I don’t have specific code to do that. Depending on your specific application it can e a tricky problem. If your application looks at a constant space you might be able to use solvepnp and create a calibrated volume around the area the object would be in

  • @Stebenbabu-e1x
    @Stebenbabu-e1x 7 месяцев назад

    hay nick i tried this method but its not working can you help me with it?

  • @Zane-pw8pw
    @Zane-pw8pw Год назад

    Wonder if I can do something similar with Unity

    • @EngineeringCorner
      @EngineeringCorner  Год назад +1

      I have not tried but it looks like real sense has a Unity wrapper

  • @worakanlasudee2078
    @worakanlasudee2078 9 месяцев назад

    frame = pipe.wait_for_frames()
    RuntimeError: Frame didn't arrive within 5000

    • @EngineeringCorner
      @EngineeringCorner  9 месяцев назад

      I have only got that error when I choose a resolution that the camera will not support. Download the Realsense SDK and see what resolutions are supported with your camera and cable

    • @ArshiyaShaheen
      @ArshiyaShaheen 4 месяца назад

      @@EngineeringCorner To fix this problem, how did you change the resolution?

    • @EngineeringCorner
      @EngineeringCorner  4 месяца назад

      @@ArshiyaShaheen The values in the cfg variable

    • @MuhammedKhalid--
      @MuhammedKhalid-- 3 месяца назад

      @@EngineeringCorner I have already used the values that my camera and cable support and still the same error. Any suggestions ?

    • @EngineeringCorner
      @EngineeringCorner  3 месяца назад

      @@MuhammedKhalid--are you using a usb 3.0 cable? Try downloading their viewer/sdk so you can eliminate the python variable and see exactly what is supported