Thank you Wong.
I then followed your suggestion and commented dtoverlay=arducam and uncommented dtoverlay=imx519 gave it a reboot.
Picture attached of tail /boot/config and libcamera-jpeg.
From here, I can take pictures, with libcamera-jpeg -o img.jpg
Though, when I run dmesg | grep arducam, it’s an empty line… nothing maybe because arducam is not loaded
My end goal being, using the arducam through python and opencv, to capture frames with opencv.
As we are, I think this is a on the way to . success using python3.9 and libcamera whl plugin (version 1.0.2) and provided examples run flawlessly (decreasing the resolution to 1280 x 780)
Indeed… v4l2 works as well (Some days ago, I faced some errors trying to make Use of v4l2loopback on line cd ~/libcamera # Installation using deb does not need to be executed
.
Re-reading the page I understood today that the git libcamera needed to be done upfront.
What I just did :
Download kernel source code
sudo apt install git bc bison flex libssl-dev
sudo wget https://raw.githubusercontent.com/RPi-Distro/rpi-source/master/rpi-source -O /usr/local/bin/rpi-source && sudo chmod +x /usr/local/bin/rpi-source && /usr/local/bin/rpi-source -q --tag-update
rpi-source -d $(uname -r)
Compile driver
git clone https://github.com/umlaeute/v4l2loopback.git
cd v4l2loopback
make clean && make
make && sudo make install
sudo depmod -a
Use v4l2loopback
git clone git://linuxtv.org/libcamera.git
sudo modprobe v4l2loopback video_nr=3
cd libcamera # Installation using deb does not need to be executed
export GST_PLUGIN_PATH=$(pwd)/build/src/gstreamer # Installation using deb does not need to be executed
gst-launch-1.0 libcamerasrc ! 'video/x-raw,width=1920,height=1080' ! videoconvert ! tee ! v4l2sink device=/dev/video3
I was able to create the v4l2loopback in one thread and use the camera in another thread with opencv
import cv2
cap = cv2.VideoCapture(3)
while True:
ret, frame = cap.read()
cv2.imshow("Arducam", frame)
key = cv2.waitKey(1)
if key == ord('q'):
break
That leads me into a good direction for my project… as I reached one of the points, I then have probably simple questions…
1- With this setup, it seems that either python libcamera 1.0.2 or opencv have no autofocus enabled… is that correct ? Can it be fixed with somethign I missed ?
2- When to use or, what is the goal of enabling dtoverlay=arducam
(when disabling imx519 in /boot/config.txt) ?
3- Looks like I need to learn more about the v4l2 to use it better in my python camera app … this is another topic
Thanks