• Video Window Does not render

jakaskerl

Here is the requested output:

pi@raspberrypi:~/depthai $ python3 depthai_demo.py

Using depthai module from: /home/pi/.local/lib/python3.9/site-packages/depthai.cpython-39-arm-linux-gnueabihf.so

Depthai version installed: 2.13.3.0

Setting up demo...

Available devices:

[0] 184430100149620E00 [X_LINK_UNBOOTED]

[184430100149620E00] [1182.272] [system] [warning] Device contains calibration data of version 1437204487 which is not supported in this version of depthai

USB Connection speed: UsbSpeed.SUPER

Warning: calibration data missing, using OAK-D defaults

erik

Hi Erik,

I just bought this camera this week, is it possible i still got an old model? Yes, I want to use all the features, that is why I bought the camera. I will try the recalibration. I am new to this device, hopefully I want make it worse.

Brian

Hi BrianHouse ,
In theory yes, but I am not sure if there are some processes (eg dewarping) which rely on the calibration part. An alternative would be to just use an old depthai version, which doesn't require the new calibration. Thoughts?

    erik

    Which version should I install of depthai? what is the best way to install that specific version making sure the newer version is 'removed'?

    • erik replied to this.

      Hi BrianHouse ,
      Yes, I think you should just use latest depthai (pip install depthai -U) and calibrate the device, the link you posted would be the best resource for that.
      Thanks, Erik

        erik

        Hi Erik,

        One last thing I decided to try before the calibration was to set this up on my MacBook Pro running Ventura 13.3.1 (a). So when I ran the depthai_demo.py script, the RGB camera still showed no video, just like the Raspberry PI, but I feel like I got more output that may help determine what is going on with the RGB camera. I am trying to rule out of this is a physical or configuration issue with the OAK-D Lite. See below:

        (base) Brians-MacBook-Pro:depthai brianhouse$ python3 depthai_demo.py

        Using depthai module from:  /Users/brianhouse/.local/lib/python3.9/site-packages/depthai.cpython-39-darwin.so

        Depthai version installed:  2.20.2.0

        Setting up demo...

        Available devices:

        [0] 184430100149620E00 [X_LINK_UNBOOTED]

        USB Connection speed: UsbSpeed.SUPER

        /Users/brianhouse/.local/lib/python3.9/site-packages/depthai_sdk/previews.py:186: RuntimeWarning: invalid value encountered in cast

          dispFrame = (dispFrame * 255. / dispIntegerLevels).astype(np.uint8)

        Stopping demo...

        === TOTAL FPS ===

          File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 656, in run

            self.instance.run_all(self.conf)

          File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 133, in run_all

            self.run()

          File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 317, in run

            self.loop()

          File "/Users/brianhouse/Luxonis/depthai/depthai_demo.py", line 373, in loop

            self._pv.prepareFrames(callback=self.onNewFrame)

          File "/Users/brianhouse/.local/lib/python3.9/site-packages/depthai_sdk/managers/preview_manager.py", line 148, in prepareFrames

            packet = queue.tryGet()

        RuntimeError: Communication exception - possible device error/misconfiguration. Original message 'Couldn't read data from stream: 'color' (X_LINK_ERROR)'

          jakaskerl

          Yes all scripts referencing the right and left mono cameras work perfect. Just the RGb does nothing.

          Specifically I have been trying to compare and contrast the rgbpreview.py (that does nothing, generates no errors but does not even render a black window) and mono_preview.py that does work. I am trying to debug these variables in pycharm:

          xoutLeft = pipeline.create(dai.node.XLinkOut)

          According to the hellow world example provided in the documentation, this is where the camera gets 'added' whether it be RGB or Monjo. I am trying to figure out what is different with the camera that works and the one that doesnt.

          Anything specific I could look at to determine where the issue may lie.

          I was looking at the connection attribute but is says 'None' for the value for both cameras so that is not a good indicator why one would work and one would not. Any variable specifically I could set a debug 'watch' to shed more light on this?

            Hi BrianHouse
            I feel like the XLink for color just isn't sending frames to a queue correctly. When reading from the rgb queue with .get() the script probably blocks, since there is no frame to be read and .get() is a blocking function.
            I believe since you are running all the latest versions of software, it might be a hardware fault.

            Could you:

            • try to run the pipeline graph tool to see where the stream stops
            • try the same script with the same camera and usb cable on a PC to confirm

            Thanks,
            Jaka

              jakaskerl

              Here is the output from first running mono_preview.py which does work:

              (base) Brians-MacBook-Pro:examples brianhouse$ pipeline_graph run "python3 MonoCamera/mono_preview.py"

              Pipeline schema retrieved

              Program exited.

              0. MonoCamera.out (10) -> XLinkOut.in (2)

              1. MonoCamera.out (6) -> XLinkOut.in (1)

              Here is the output from rgb_preview.py which does not work:

              (base) Brians-MacBook-Pro:examples brianhouse$ pipeline_graph run "python3 ColorCamera/rgb_preview.py"

              Pipeline schema retrieved

              Program exited.

              0. ColorCamera.preview (8) -> XLinkOut.in (1)

              • erik replied to this.

                Hi BrianHouse ,
                We apologize for taking this long to debug.. Could you just try the last thing, the cam_test.py, and copy the terminal output? My guess is that ColorCam is connected, but will stream 0 FPS, which means the cable isn't properly connected on the PCBA. In such case, we will replace the device asap.
                Sorry again!

                  erik

                  Are there other modules I am going to need"?

                  (base) Brians-MacBook-Pro:tests brianhouse$ python3 cam_test.py 

                  Traceback (most recent call last):

                    File "cam_test.py", line 45, in <module>

                      import cam_test_gui

                  ModuleNotFoundError: No module named 'cam_test_gui'

                  (base) Brians-MacBook-Pro:tests brianhouse$ 

                  also I noticed it has a lot of options which ones do you want me to run?