raspberrypi / picamera2

New libcamera based python library
BSD 2-Clause "Simplified" License
890 stars 188 forks source link

[BUG] Warnings appear when the camera is activated #918

Open JGB-lab opened 10 months ago

JGB-lab commented 10 months ago

Bug (or misconfiguration) description: The hardware system I'm using (RPi4B, V2.1 camera and connection cable) has been working properly for a long time with Raspbian Buster OS and Python 3.7. A couple of weeks ago, I updated the system to Raspberry OS BookWorm and Python 3.11 (the latest system image downloaded from the official website). When starting to update the old applications, mainly replacing picamera with picamera2, the following warnings appear, which seem to indicate an incompatibility issue between the OS configuration and the picamera2 library. I found quite a bit of information about some of these warnings, but not the solution.

Inputs and outputs:

But image windows appears as expected

from picamera2 import Picamera2, Preview

input('Press ENTER to begin')

picam2 = Picamera2() picam2.start_preview(True) preview_config = picam2.create_preview_configuration() picam2.configure(preview_config) picam2.start()

input('Press ENTER to finish') picam2.stop_preview()

   Output:

%Run Prova.py Press ENTER to begin [24:00:32.592111269] [19268] INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e [24:00:32.695629281] [19363] WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise [24:00:32.702006641] [19363] WARN RPI vc4.cpp:390 Mismatch between Unicam and CamHelper for embedded data usage! [24:00:32.703922090] [19363] INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media4 and ISP device /dev/media0 [24:00:32.704036607] [19363] INFO RPI pipeline_base.cpp:1142 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml' [24:00:32.716635477] [19268] INFO Camera camera_manager.cpp:284 libcamera v0.1.0+118-563cd78e [24:00:32.771724495] [19366] WARN RPiSdn sdn.cpp:39 Using legacy SDN tuning - please consider moving SDN inside rpi.denoise [24:00:32.774247384] [19366] WARN RPI vc4.cpp:390 Mismatch between Unicam and CamHelper for embedded data usage! [24:00:32.775664522] [19366] INFO RPI vc4.cpp:444 Registered camera /base/soc/i2c0mux/i2c@1/imx219@10 to Unicam device /dev/media4 and ISP device /dev/media0 [24:00:32.775963557] [19366] INFO RPI pipeline_base.cpp:1142 Using configuration file '/usr/share/libcamera/pipeline/rpi/vc4/rpi_apps.yaml' [24:00:34.851178386] [19268] INFO Camera camera.cpp:1183 configuring streams: (0) 640x480-XBGR8888 (1) 640x480-SBGGR10_CSI2P [24:00:34.852573691] [19366] INFO RPI vc4.cpp:608 Sensor: /base/soc/i2c0mux/i2c@1/imx219@10 - Selected sensor format: 640x480-SBGGR10_1X10 - Selected unicam format: 640x480-pBAA Press ENTER to finish

Also, image windows is shown as expected

To Reproduce Run the command and application mentioned above in the same context

Expected behaviour There shouldn't be any information or warning because it should be properly preconfigured, especially regarding warnings.

Console Output, Screenshots N/A

Hardware : Raspberry Pi 4B, 4 GB Two Rasperry V2 cameras where tested, normal and NoIR. Connection cable test is OK. SSD Disk mounted, USB connetion. Additional SD card to backup system.

Additional context Newly installed OS from scratch. Last image (2024-01-015) download from official Raspberry Pi site. Debian BookWorm 64 bits and Python 3.11 The only action taken before the picamera2 test was an upgrade.

davidplowman commented 10 months ago

Hi, thanks for raising this. Really this is a libcamera issue, nothing that Picamera2 can do anything about. Maybe you could post it here https://github.com/raspberrypi/libcamera? Thanks!

JGB-lab commented 10 months ago

Thank you! I will post it on libcamera2 in a few days.