its probably because the example is using too many buffers.
find the method
cam.configureStill(width, height, formats::BGR888, 1, 0);
the third parameter, 1 in my case is number of buffers, yours is probably 4, set it to 1
no actually in your case its the variable buffer_count=4 on row 699 in method create_preview_configuration
Some folks over on picamera2 helped me not get errors and it indeed was about changing the type of buffer to YUV
so i can do this
capture_config = picam2.create_still_configuration(main={“size”: (9152, 6944), “format”: “YUV420”}, buffer_count=1)
and it works but i have to convert that YUV file to something
though it led to an inconsistency between @Edward 's example of the full res data speed
in their example they have that you can capture full res images to memory once every 2 seconds or so
but when i tried this, it would take8-9 seconds
it turned out i could just add a really long timer (25 seconds) after start, and then i could take the photo in just 3 seconds!
I know the image isn’t actually exposing for 3 seconds, so it would be nice to find a way to turn on my lights just for the time the pixels are actually being exposed to save electricity in the field
if u look edwards c++ example its constantly polling frameData from the sensor. u only need to turn on lights when capture starts and turn them off once frameData has been read to memory. Also if u still want to capture RGB i think its possible to capture 2 images at smaller res and pass crop rectangle to libcamera and then combine the left and right image into one afterwards.
anyways whats the lightson() function in python? u have a camera that has flash integrated into it or using additional lightsource?
yeah i implemented edward’s example, but with the capture_array but it still took 3-4 seconds
the reason for the 25 second wait is because after the camera starts it needs to sit and set up all its stuff, or else when you go to capture_array for the first image it will take like 10 seconds
the power supply was not the issue. tested with official RPI power supply and undervoltage errors disappeared. the lines appeared due to fluorescent tube light in the ceiling. kinda similar how when shutter speed is in sync with helicopter blade the appear not moving but if they are off the blade seem moving in weird way on video. turning off the light fixed the problem.
I tried this in a RP5 4GB and is not working in the following version of OS
Linux raspberrypi 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 (the default from bookworm lite available online)
Linux raspberrypi 6.1.0-rpi8-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 (the version available today 2024-01-31)
That tell me that something that change during this time is breaking the camera, additionally to the fact that /boot/config.txt was moved to /boot/firmware/config.txt
Blockquote
Prior to Bookworm , Raspberry Pi OS stored the boot partition at /boot/ . Since Bookworm , the boot partition is located at /boot/firmware/ .
#For more options and information see
# http://rptl.io/configtxt
# Some settings may impact device functionality. See link above for details
# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2s=on
dtparam=spi=on
dtparam=i2c1=on
dtparam=i2c4=on
# Enable audio (loads snd_bcm2835)
dtparam=audio=on
# Additional overlays and parameters are documented
# /boot/firmware/overlays/README
# Automatically load overlays for detected cameras
camera_auto_detect=1
# Automatically load overlays for detected DSI displays
display_auto_detect=1
# Automatically load initramfs files, if found
auto_initramfs=1
# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1
# Run in 64-bit mode
arm_64bit=1
# Disable compensation for displays with overscan
disable_overscan=1
# Run as fast as firmware / board allows
arm_boost=1
[cm4]
# Enable host mode on the 2711 built-in XHCI USB controller.
# This line should be removed if the legacy DWC2 controller is required
# (e.g. for USB device mode) or if USB support is not required.
otg_mode=1
[all]
dtoverlay=vc4-kms-v3d,cma-512
dtoverlay=arducam-64mp
FYI, the output of i2detect . From this post should be only the motor who is recognized? but if Im unplug the camera is still there…
i dont know then, only thing i can reccommend is to try everything from scratch, reflash and reinstall drivers/tools with the python scripts…
maybe try desktop instead of lite os this time and see what happens. if still not work u need to get help from arducam people