Raspberry Pi 5: Compiled libcamera with GStreamer for OpenCV on Raspbian 12 (bookworm)

Поділитися
Вставка
  • Опубліковано 8 січ 2025
  • Compiled libcamera with GStreamer plugin for OpenCV on Raspbian 12 (bookworm) with 4GB RAM, 128GB micro-SD card, and running 64-bit Raspbian 11 (bookwork) OS on 64-bit Linux kernel 6.6.62+rpt-rpi-2712 for aarch64.
    Raspberry Pi libcamera Git Repository:
    github.com/ras...
    ####################################################################
    libcamera build notes
    ####################################################################
    $ uname -a
    Linux rpi8 6.6.62+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.62-1+rpt1 (2024-11-25) aarch64 GNU/Linux
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Debian
    Description: Debian GNU/Linux 12 (bookworm)
    Release: 12
    Codename: bookworm
    $ df -H
    Filesystem Size Used Avail Use% Mounted on
    udev 2.1G 0 2.1G 0% /dev
    tmpfs 425M 6.3M 418M 2% /run
    /dev/mmcblk0p2 126G 22G 98G 18% /
    tmpfs 2.2G 426k 2.2G 1% /dev/shm
    tmpfs 5.3M 50k 5.2M 1% /run/lock
    /dev/mmcblk0p1 535M 80M 456M 15% /boot/firmware
    tmpfs 425M 197k 424M 1% /run/user/1000
    $ free -h
    total used free shared buff/cache available
    Mem: 4.0Gi 598Mi 2.2Gi 65Mi 1.3Gi 3.4Gi
    Swap: 199Mi 0B 199Mi
    $ libcamera-hello --version
    rpicam-apps build: v1.5.3 50958df98d3c 13-11-2024 (14:29:29)
    rpicam-apps capabilites: egl:1 qt:1 drm:1 libav:1
    libcamera build: v0.3.2+99-1230f78d
    ####################################################################
    dependencies
    ####################################################################
    $ sudo apt install build-essential git cmake unzip pkg-config
    $ sudo apt install meson ninja-build
    $ sudo apt install python3-dev python3-pip python3-jinja2
    $ sudo apt install python3-gst-1.0 python3-yaml python3-ply python3-sphinx
    $ sudo apt install libpython3-dev pybind11-dev
    $ sudo apt install doxygen graphviz texlive-latex-extra
    $ sudo apt install libboost-dev
    $ sudo apt install libgnutls28-dev openssl libtiff5-dev
    $ sudo apt install qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5
    $ sudo apt install libglib2.0-dev libyaml-dev
    $ sudo apt install libdw-dev libunwind-dev libudev-dev
    $ sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
    $ sudo apt install libevent-dev libdrm-dev libjpeg-dev libsdl2-dev
    $ sudo apt install libtiff-dev qt6-base-dev qt6-tools-dev-tools
    $ sudo apt install liblttng-ust-dev lttng-tools
    $ sudo apt install libgtest-dev abi-compliance-checker
    ####################################################################
    build libcamera
    ####################################################################
    $ mkdir -p ~/src/github.com/raspberrypi
    $ cd ~/src/github.com/raspberrypi
    $ git clone github.com/ras...
    $ cd libcamera
    $ meson setup build --buildtype=release \
    -Dpipelines=rpi/vc4,rpi/pisp \
    -Dipas=rpi/vc4,rpi/pisp \
    -Dv4l2=true \
    -Dgstreamer=enabled \
    -Dtest=true \
    -Dlc-compliance=enabled \
    -Dcam=enabled \
    -Dqcam=enabled \
    -Ddocumentation=disabled \
    -Dpycamera=enabled
    $ ninja -C build
    $ ninja -C build install
    $ vi ~/.bashrc
    export GST_PLUGIN_PATH=/home/pi/src/github.com/raspberrypi/libcamera/build/src/gstreamer
    $ libcamera-hello --version
    rpicam-apps build: v1.5.3 50958df98d3c 13-11-2024 (14:29:29)
    rpicam-apps capabilites: egl:1 qt:1 drm:1 libav:1
    libcamera build: v0.3.2+99-1230f78d

КОМЕНТАРІ •

  • @bambamsworld_
    @bambamsworld_ 11 днів тому

    wonderful video very informative !