# Using softisp on Ubuntu ## What is Hard/Soft ISP (Image Signal Processor) - Hardisp - Hardware Image Signal Processor - A specialised silicon or firmware block - usually both - Softisp - Raw Bayer data delivered to userspace and handled in pure software ## What image signal processor will do - Debayers - Camera sensors using [Bayer filter](https://en.wikipedia.org/wiki/Bayer_filter) to capture data - Bayer Matrix ![Bayer_matrix](https://hackmd.io/_uploads/S18F-WLCyl.png) - Each pixel contains only one colour, need use debayer method to get full pixels - Autofocus (AF) - Auto White Balance (AWB) - Auto Exposure / Gain (AG) ## softisp with libcamera ![Screenshot from 2025-06-16 10-03-01](https://hackmd.io/_uploads/r1scogaQxe.png) ### Supported device - Intel Ipu6 - TI J721e - Qualcomm CAMSS ### Setup #### Ubuntu 24.04 LTS - use 6.11.0-21-generic and later - check if ipu6 and sensor been probed ``` $ cat /sys/class/video4linux/*/name Intel IPU6 CSI2 0 Intel IPU6 CSI2 1 Intel IPU6 CSI2 2 Intel IPU6 CSI2 3 Intel IPU6 CSI2 4 Intel IPU6 CSI2 5 hm2172 4-0025 Intel IPU6 ISYS Capture 0 Intel IPU6 ISYS Capture 10 Intel IPU6 ISYS Capture 11 Intel IPU6 ISYS Capture 12 Intel IPU6 ISYS Capture 13 Intel IPU6 ISYS Capture 14 Intel IPU6 ISYS Capture 15 Intel IPU6 ISYS Capture 16 Intel IPU6 ISYS Capture 17 Intel IPU6 ISYS Capture 18 Intel IPU6 ISYS Capture 19 Intel IPU6 ISYS Capture 1 Intel IPU6 ISYS Capture 20 Intel IPU6 ISYS Capture 21 Intel IPU6 ISYS Capture 22 Intel IPU6 ISYS Capture 23 Intel IPU6 ISYS Capture 24 Intel IPU6 ISYS Capture 25 Intel IPU6 ISYS Capture 26 Intel IPU6 ISYS Capture 27 Intel IPU6 ISYS Capture 28 Intel IPU6 ISYS Capture 29 Intel IPU6 ISYS Capture 2 Intel IPU6 ISYS Capture 30 Intel IPU6 ISYS Capture 31 Intel IPU6 ISYS Capture 32 Intel IPU6 ISYS Capture 33 Intel IPU6 ISYS Capture 34 Intel IPU6 ISYS Capture 35 Intel IPU6 ISYS Capture 36 Intel IPU6 ISYS Capture 37 Intel IPU6 ISYS Capture 38 Intel IPU6 ISYS Capture 39 Intel IPU6 ISYS Capture 3 Intel IPU6 ISYS Capture 40 Intel IPU6 ISYS Capture 41 Intel IPU6 ISYS Capture 42 Intel IPU6 ISYS Capture 43 Intel IPU6 ISYS Capture 44 Intel IPU6 ISYS Capture 45 Intel IPU6 ISYS Capture 46 Intel IPU6 ISYS Capture 47 Intel IPU6 ISYS Capture 4 Intel IPU6 ISYS Capture 5 Intel IPU6 ISYS Capture 6 Intel IPU6 ISYS Capture 7 Intel IPU6 ISYS Capture 8 Intel IPU6 ISYS Capture 9 ``` - install libcamera and pipewire from [PPA](https://launchpad.net/~dirksu/+archive/ubuntu/libcamera) ``` $ sudo apt install libcamera0.4 libcamera-tools gstreamer1.0-libcamera pipewire ``` - add udev rule ``` $ cat /etc/udev/rules.d/71-libcamera.rules SUBSYSTEM=="dma_heap", GROUP="video", MODE="0660" ``` - check if libcamera device appear in pipewire ``` wpctl status | grep libcamera ``` - set default video device to libcamera in pipewire ``` wpctl set-default <id> ``` - install firefox in deb format - allow pipewire in firefox, in search bar type "about:config" then search pipewire #### some debug commands - libcamera ``` LIBCAMERA_LOG_LEVELS=*:DEBUG cam -l ``` - libcamera gstreamer plugin ``` gst-launch-1.0 libcamerasrc ! glimagesink ``` - pipewire gstreamer plugin ``` gst-launch-1.0 pipewiresrc ! glimagesink ``` ## reference - https://archive.fosdem.org/2024/schedule/event/fosdem-2024-3013-a-fully-open-source-stack-for-mipi-cameras/ - https://archive.fosdem.org/2024/events/attachments/fosdem-2024-3013-a-fully-open-source-stack-for-mipi-cameras/slides/22223/A_fully_open_source_stack_for_MIPI_cameras_-_FO_dhMg1oP.pdf - https://en.wikipedia.org/wiki/Bayer_filter - https://en.wikipedia.org/wiki/Bryce_Bayer