Giter Site home page Giter Site logo

Comments (8)

apnogueira avatar apnogueira commented on May 31, 2024 1

Hi @Myzhar
I finally managed to get my hands on the original cable. With it, I no longer have the resolution issue. I was able to run the examples for HD720 resolution. Thank you!

Closing...

from zed-open-capture.

Myzhar avatar Myzhar commented on May 31, 2024

Hi @apnogueira
Did you install the udev rules?

from zed-open-capture.

apnogueira avatar apnogueira commented on May 31, 2024

Hi @Myzhar
Yes, I did. When I tried to run the command bash install_udev_rule.sh I got a bunch of Permission denied.
I then changed the command to sudo bash install_udev_rule.sh and it didn't show the Permission denied (As a matter of fact it had no response to the command). I assumed it installed the udev rules

from zed-open-capture.

Myzhar avatar Myzhar commented on May 31, 2024

I guess your first issue is caused by a resolution that is too high.

Did you connect the camera to a USB3 or USB2 port?

Try to change the resolution to VGA to see if you can open the camera (please use sudo).

Please also copy and paste the output of the commands lsusb and lsusb -d 2b03: -v -t

from zed-open-capture.

apnogueira avatar apnogueira commented on May 31, 2024

Currently the camara is connected to USB3, but I previously tried all ports (both RPi4 USB3 ports and both USB2 ports).
I changed both examples (sync and video_example) to a VGA resolution. The error changed.
When running sudo zed_open_capture_video_example

Connected to camera sn: 39263373[/dev/video0]
No protocol specified
Unable to init server: Could not connect: Connection refused
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.5.1) ../modules/highgui/src/window_gtk.cpp:624: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

Aborted

When running sudo zed_open_capture_sync_example:

[sl_oc::video::VideoCapture] INFO: ZED Open Capture - Camera module - Version: 0.6.0
[sl_oc::video::VideoCapture] INFO: Camera resolution: 1344x376@30Hz
[sl_oc::video::VideoCapture] INFO: Trying to open the device '/dev/video0'
[sl_oc::video::VideoCapture] INFO: Opened camera with SN: 39263373
[sl_oc::video::VideoCapture] INFO: Device '/dev/video0' opened
Video Capture connected to camera sn: 39263373
[sl_oc::sensors::SensorCapture] INFO: ZED Open Capture - Sensors module - Version: 0.6.0
[sl_oc::sensors::SensorCapture] INFO: Device Found: 
  VID: 2b03 PID: f881
  Path: 0001:0005:00
  Serial_number:   39263373
  Manufacturer:   STEREOLABS
  Product:   ZED-2i HID INTERFACE
  Release number:   v3.9
***

[sl_oc::sensors::SensorCapture] INFO: Connected to device with sn 39263373
Sensors Capture connected to camera sn: 39263373
No protocol specified
Unable to init server: Could not connect: Connection refused
terminate called after throwing an instance of 'cv::Exception'
  what():  OpenCV(4.5.1) ../modules/highgui/src/window_gtk.cpp:624: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem'

Aborted

Output of lsusb

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 005: ID 2b03:f881 STEREOLABS ZED-2i HID INTERFACE
Bus 001 Device 004: ID 2b03:f880 STEREOLABS ZED 2i
Bus 001 Device 003: ID 0424:2512 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Output of lsusb -d 2b03: -v -t

/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 2109:3431 VIA Labs, Inc. Hub
        |__ Port 2: Dev 3, If 0, Class=Hub, Driver=hub/2p, 480M
            ID 0424:2512 Microchip Technology, Inc. (formerly SMSC) USB 2.0 Hub
            |__ Port 1: Dev 4, If 0, Class=Video, Driver=uvcvideo, 480M
                ID 2b03:f880 STEREOLABS 
            |__ Port 1: Dev 4, If 1, Class=Video, Driver=uvcvideo, 480M
                ID 2b03:f880 STEREOLABS 
            |__ Port 2: Dev 5, If 0, Class=Human Interface Device, Driver=, 12M
                ID 2b03:f881 STEREOLABS 

from zed-open-capture.

Myzhar avatar Myzhar commented on May 31, 2024

The camera is now correctly working, but you have problems with OpenCV displaying the images.

I suggest you search the internet for this error:
what(): OpenCV(4.5.1) ../modules/highgui/src/window_gtk.cpp:624: error: (-2:Unspecified error) Can't initialize GTK backend in function 'cvInitSystem

from zed-open-capture.

apnogueira avatar apnogueira commented on May 31, 2024

I figured the problem was related with using sudo. However, I had no permission to open the camera without sudo. I had to include my user in the video group in order to run the example without sudo. The command I used was:

sudo usermod -aG video USERNAME

So right now I am able to run all examples on the RPi4, but only with VGA resolution. Any suggestions on how to use HD720 resolution?

from zed-open-capture.

Myzhar avatar Myzhar commented on May 31, 2024

Hi @apnogueira
You are using a ZED 2i. Please check that the screws of the connector are strongly strengthened and that you are connecting the camera so a USB3 port.
The camera is detected in USB2 mode for compatibility when there is a connection issue.
If you want to be sure that the camera is working correctly you can try to connect it to a PC, open the video stream with a normal webcam application and try to change the resolution.
If the PC is CUDA-enabled you can install the ZED SDK and run the ZED Diagnostic tool to check that the camera is OK.

from zed-open-capture.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.