Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for unsupported pixel format #218

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

doug-holtsinger
Copy link

If an unsupported pixel format is handed to libcamera, then it hits an assertion error in pisp.cpp instead of returning
a proper return code. The problem was originally seen here:
opencv/opencv#21653 (comment)
I can reproduce the same issue with the latest main branch of libcamera and opencv 4.x

Signed-off-by: Douglas Holtsinger <[email protected]>
@naushir
Copy link
Collaborator

naushir commented Dec 9, 2024

@doug-holtsinger, thank you for this fix. However, I'm a bit surprised this is needed. Do you happen to know exactly what format is originally requested to cause the failure?

@naushir
Copy link
Collaborator

naushir commented Dec 9, 2024

Also, can you post the output of dmesg when the error occurs to see if the kernel driver is complaining about anything?

@doug-holtsinger
Copy link
Author

Also, can you post the output of dmesg when the error occurs to see if the kernel driver is complaining about anything?

Here is the dmesg:
https://pastebin.com/KwRPPe28

There is a warning at line 384 but I can still use my RPi v3 camera just fine with libcamera using the YUYV format.

The failing requested format was libcamera::formats::MJPEG which is evidently not supported by my camera.

Output from 'cam -c1 -I' that lists supported Pixelformat and resolutions for my camera:
https://pastebin.com/jg3KGGSX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants