This is a small suite of libcamera-based applications to drive the cameras on a Raspberry Pi platform.
Warning
These applications and libraries have been renamed from libcamera-*
to rpicam-*
. Symbolic links are installed to allow users to keep using the old application names, but these will be deprecated soon. Users are encouraged to adopt the new application and library names as soon as possible.
The standard used is the c++17 as it is the one used by the Raspberry Pi base apps. These instructions has been obtained from the official Raspberry Pi documentation pages here.
- Install the dependencies.
sudo apt install -y libcamera-dev libepoxy-dev libjpeg-dev libtiff5-dev libpng-dev
sudo apt install -y qtbase5-dev libqt5core5a libqt5gui5 libqt5widgets5
sudo apt install libavcodec-dev libavdevice-dev libavformat-dev libswresample-dev
sudo apt install -y cmake libboost-program-options-dev libdrm-dev libexif-dev
sudo apt install -y meson ninja-build
- Configure the build using the following meson command.
meson setup build -Denable_libav=enabled -Denable_drm=enabled -Denable_egl=enabled -Denable_qt=enabled -Denable_opencv=disabled -Denable_tflite=disabled
- Build the program.
meson compile -C build
This code has been tested in python 3.8 and 3.10.
- Install, if necessary, the Python virtual environment module.
sudo apt-get install python3-venv
- Create a virtual enviroment and install the required libraries.
cd python
python3 -m venv venv --prompt arducam
source venv/bin/activate
pip install -r requirements.txt
The source code is made available under the simplified BSD 2-Clause license.
- Save Images on a File
./build/apps/arducam-raw -t 2000 -o $HOME/outputs/residual_test/name%05d.raw --mode 2028:1080:10:U --shutter 1ms --gain 1 --awbgains 1,1 --resolution MEDIUM --nopreview --verbose 2 --segment 1
- Send Images to a TCP server
./build/apps/arducam-raw -t 2000 -o tcp://10.42.0.1:32233 --mode 2028:1080:10:U --shutter 1ms --gain 1 --awbgains 1,1 --resolution MEDIUM --nopreview --verbose 2
- Start a server in a local repository to visualize the images.
python3 arducam_tcp.py --ip 127.0.0.1 --resolution MEDIUM
- Save the images on files whithout showing them.
python3 arducam_tcp.py --ip 127.0.0.1 --resolution MEDIUM --output_folder outputs --no_show