Help to Configure and Display the Video Stream of a CSI Camera on BeagleBone AI-64

Hello everyone,

I’m currently working on a project involving the BeagleBone AI-64 and a CSI camera, but I’m having trouble configuring and displaying the video stream. I’ve followed the available documentation but I can’t find the specific information to load the necessary overlay and get the video stream from the camera.

Here’s what I’ve already tried:

  • Physically connect the camera to the BeagleBone AI-64.
  • Searching for specific overlays for my CSI camera in the BeagleBoard documentation.
  • Tried different commands in terminal with various utilities such as vlc or ffmeg and Python scripts with OpenCV, but without success.

Could anyone point me in the direction of :

  1. Where to find and how to load the appropriate overlay for a CSI camera on BeagleBone AI-64?
  2. Code examples or tutorials for displaying the camera’s video stream using Python and OpenCV?

Any help or guidance would be greatly appreciated, as I’m stuck at this stage of my project.

Thank you very much!

Hi. You can add the overlays by editing the /boot/firmware/extlinux/extlinux.conf fdtoverlays line with:

fdtoverlays /overlays/YOUR_OVERLAY_FILE_NAME_1.dtbo /overlays/YOUR_OVERLAY_FILE_NAME_2.dtbo

Overlays are located in /boot/firmware/overlays/
I have only tested the BBAI64-CSI0-imx219.dtbo BBAI64-CSI1-imx219.dtbo overlays for RPi v2 8mp camera based on IMX219 sensor. And it seems that these are the only ones that are available so far.
You can grab the picture from v4l2, but the problem is that imx219 sensor requires additional image signal processing to control the white balance, exposure, etc. And this is done by TI in their custom GStreamer plugins edgeai-gst-plugins, aside the v4l2 driver.
So the GStreamer is the only way to get proper picture from RPi camera.
You can test the RPi camera on CSI0 by adding (I assume that you are using the last image which has this overlay):

fdtoverlays /overlays/BBAI64-CSI0-imx219.dtbo

Also you need to have TI’s dcc isp files in /opt/imaging folder. Just do this:

sudo unzip -d /opt/

Than you can execute these lines to see your camera stream on the monitor (should be connected to BBAI64 mini display port):

sudo media-ctl -d 0 --set-v4l2 '"imx219 6-0010":0[fmt:SRGGB8_1X8/1920x1080]'
sudo gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-bayer, width=1920, height=1080, format=rggb ! tiovxisp sink_0::device=/dev/v4l-subdev2 sensor-name=SENSOR_SONY_IMX219_RPI dcc-isp-file=/opt/imaging/imx219/dcc_viss.bin sink_0::dcc-2a-file=/opt/imaging/imx219/dcc1/dcc_2a.bin format-msb=7 ! kmssink driver-name=tidss

I have an example of mjpeg http streaming of 2 RPi cameras with python: GStreamer can send its output to socket, so it is possible to grab raw data from it in this way.

And you can dive deep into TI’s edge_ai_apps mess by installing TI EDGEAI (Xfce) Desktop Snapshot image from ARM64 - Debian 11.x (Bullseye) - Monthly Snapshots - 2023-10-07 - FAQ - BeagleBoard

First of all, thank you very much for your reply.

I don’t have it with me, but you’re saying that the overlays files I need to install are already in the Beagle Bone files but not in the right directory. Thank you very much, back in the lab on Monday, I’ll try it all and let you know. For an IMX477 camera, it should be the same procedure, I think?

Thank you for your reply!

From the very first step, I have a problem. My /boot/firmware/overlays/ folder doesn’t contain BBAI64-CSI0-imx219 or BBAI64-CSI1-imx219.dtbo but only this one: robotics-cape.dtbo. Is this an OS update problem?

If anyone has any clues, thank you for your reply.

I suggest you to flash the latest image with xfce desktop with pre built overlays from here: Debian 11.x (Bullseye) - Monthly Snapshot - 2023-10-07