kbingham / libcamera

libcamera - Making complex cameras easy. This is a personal fork, please use the upstream repository at https://git.libcamera.org/libcamera/libcamera.git/
https://libcamera.org
Other
173 stars 69 forks source link

No image format found #64

Closed kurosh-z closed 1 year ago

kurosh-z commented 1 year ago

I'm getting the following error on an ov9281 monochrome sensor when running ./cam --list:

./cam --list

[3:16:07.769383485] [7935]  INFO IPAManager ipa_manager.cpp:143 libcamera is not installed. Adding '/home/drone/repos/libcamera/build/src/ipa' to the IPA search path
[3:16:07.779682547] [7935]  INFO Camera camera_manager.cpp:299 libcamera v0.0.0+4124-5df5b72c
[3:16:07.807202112] [7938] ERROR CameraSensor camera_sensor.cpp:124 'vc_mipi_ov9281 10-0060': No image format found
[3:16:07.808000269] [7938] ERROR RPI raspberrypi.cpp:1228 Failed to register camera vc_mipi_ov9281 10-0060: -22
Available cameras:

Any suggestion on how I could fix this?

Camera: https://www.inno-maker.com/product/cam-mipi9281raw-v2/ Driver: https://github.com/INNO-MAKER/CAM-OV9281RAW-V2 Documentation: https://github.com/INNO-MAKER/CAM-OV9281RAW-V2/blob/main/Documents/CAM-MIPIOV9281%20V2%20User%20Manual%20V1.2.pdf

Tested on: Raspberry pi 4: OS: "Raspbian GNU/Linux 11 (bullseye)" Kernel: 5.10.92-v7l+

Regards, Kurosh

kbingham commented 1 year ago

Can you rerun with 'LIBCAMERA_LOG_LEVELS=*:0' set before cam please? Does innomaker have a support channel?

kurosh-z commented 1 year ago

This is now the cam app with the full debug on:

cam-Debug

I contacted the innomaker and waiting for the answer.

kbingham commented 1 year ago

I would suspect there is an issue in the innomaker ov9281 driver. Ask them to upstream the driver to the Linux media subsystem of the kernel, and then errors can be identified during the review process.

But isn't there an ov9281 driver in the raspberry pi kernel you can use directly? Does that one work?

kurosh-z commented 1 year ago

I would suspect there is an issue in the innomaker ov9281 driver. Ask them to upstream the driver to the Linux media subsystem of the kernel, and then errors can be identified during the review process.

But isn't there an ov9281 driver in the raspberry pi kernel you can use directly? Does that one work?

I took another SD card with a Ubuntu Server 20.04 (Kernel Ver. 5.4.0-1078-raspi) installed. I activated the ov9281 overlay as you suggested. I'm now getting a new error:

ov9281_ubuntu

v412-ctl shows the following formats are supported:

Screenshot 2023-01-11 at 23 24 09

and I can capture an image with:

Screenshot 2023-01-11 at 23 26 36
kbingham commented 1 year ago

I have a feeling you might now be using the wrong device tree overlay, as the camera is listed as mov9281. But now you're certainly into Raspberry Pi support territory. Could you raise this issue at github.com/raspberrypi/libcamera please? They can help more. (Or innomaker directly).

kbingham commented 1 year ago

The upstreamed IPA tuning file in libcamera is ./src/ipa/raspberrypi/data/ov9281_mono.json

So I think you can also manually set the tuning file with one of the Raspberry Pi specific environment variables.