luxonis / depthai-core

DepthAI C++ Library
MIT License
238 stars 127 forks source link

[BUG] {FFC-6P is not detecting the camera with correct name and not able to stream video} #667

Open gajena opened 1 year ago

gajena commented 1 year ago

Check if issue already exists

Describe the bug

  1. Recently bought FFC-6P flashed with LuxOS 1.2 here
  2. Attached Camera OAK-FFC 48mp and IMX477 on CAMA and CAMSB
  3. When following the setup document the cmd gst-inspect-1.0 kmbcamsrc output was showing two cameras with wrong names:- camera-id : (0): kmb-imx412-sensorkeembay_cam_a2 (1): kmb-imx412-sensorkeembay_camex_
  4. Also cmd ls /usr/bin/*.bin show only some of the camera bin files
    /usr/bin/calib_data_0.bin           /usr/bin/imx335_database.bin            /usr/bin/imx412_database_imesh.bin
    /usr/bin/imx219_database.bin        /usr/bin/imx412_database.bin            /usr/bin/kmb_dtp.bin
    /usr/bin/imx327_database.bin        /usr/bin/imx412_database_1920x1080.bin  /usr/bin/ov9282_database.bin
    /usr/bin/imx334_database.bin        /usr/bin/imx412_database_3200x1800.bin
    /usr/bin/imx334_database_imesh.bin  /usr/bin/imx412_database_3280x2464.bin
  5. I tried accessing it from host system using depthai-python with rvc3_support branch with only OAK-FFC 48mp on CAMA port
    $ python3 utilities/cam_test.py -cams rgb,c -cres 48mp
    Enabled cameras:
    rgb : color
    DepthAI version: 2.19.1.0.dev+e23b04d694ce1fcd52955b3bde265602eb1ce87a
    DepthAI path: /home/gn/src/luxonis/depthai/luxonis/lib/python3.8/site-packages/depthai.cpython-38-x86_64-linux-gnu.so
    Connected cameras:
    -socket RGB   : imx412   -1 x   -1 focus:fixed - 
    USB speed: UNKNOWN
    IR drivers: []
    Cam:      rgb      [host | capture timestamp]
    FPS:   0.00|  0.00(base) 

    tried with low res same result.

  6. tried color camera example code, got stuck at the frame get method.

Minimal Reproducible Example Append the MRE to the bug report, instructions here

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Pipeline Graph

Please also provide a screenshot of your pipeline using the DepthAI Pipeline Graph.

Attach system log

Additional context Add any other context about the problem here.

themarpe commented 1 year ago

Hi @gajena

RVC3 is still in development - WRT camera naming, you should look into rvc3_support or rvc3_develop branches and run the device.getConnectedCameraFeatures() function. Also, for 6P you should likely update the FIP as well, to get the new naming for the camera ports.

Otherwise, there are some WIP tmp_s3 examples & rvc3_develop can run quite a number of regular examples already as is.

cam_test.py utility is not yet tested to be RVC3 compatible. Use at your own discretion.

48MP sensor has a known issue with streaming from DepthAI at the moment, something which we are working forward to address.

gajena commented 1 year ago

Hi @themarpe, thank you for the reply. I am currently using the rvc3_develop branch and output of device.getConnectedCameraFeatures() is (IMX477 with motorized focus on CAME and 48mp OAK on CAMD):

[{socket: VERTICAL/CAM_D, sensorName: imx412, width: -1, height: -1, orientation: AUTO, supportedTypes: [], hasAutofocus: 0, name: keembay_cam_c1}, {socket: CAM_F, sensorName: imx412, width: -1, height: -1, orientation: AUTO, supportedTypes: [], hasAutofocus: 0, name: keembay_cam_b2}]

I did update FIP from here with the LuxOS1.2 if there is any updated version of FIP please let me know or can I build the same myself using the latest commit?

I am able to receive images from the IMX477 camera with rgb_video example but it has a weird stutter(or uneven frame pacing), I am using this arducam camera and with the FFC cable. Is there any modification required if I use the arducam directly with this FFC cable?

gajena commented 1 year ago

IMX477 works fine when I used other camera ports. Few queries: does the current rvc3_develop branch has support for

themarpe commented 1 year ago

I am able to receive images from the IMX477 camera with rgb_video example but it has a weird stutter(or uneven frame pacing)

The high resolution is likely the culprit. We are addressing this.

gajena commented 1 year ago

On some ports, the same camera performs worse and on some ports, it looks fine. Tested the following config:

So seems like three ports works okay and other do not. Probably related to this: image

will contact support soon. Thank you for your time.

nonathecoda commented 1 year ago

@gajena

Are you running python3 utilities/cam_test.py -cams rgb,c -cres 48mp on the oak device or on your host computer? I tried running it on the oak device, but keep getting an error:

cv2.error: OpenCV(4.5.5-kmb) ../opencv/modules/highgui/src/window.cpp:1334: error: (-2:Unspecified error) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Cocoa support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function 'cvWaitKey'.

However, libgtk2.0-dev isn't suitable for the device's distribution. Did you run into the same problem?

gajena commented 1 year ago

Hi @nonathecoda, No never seen this issue. Are you trying to run this command on the device itself or running it on the host machine?

nonathecoda commented 1 year ago

@gajena i'm running it on the device itself. It might have something to do with some x11 forwarding issues though, so i'll look into that.