Hello,
I'm working on a simple GUI that will let me collect still images with a UI and allow me to customize the controls like exposure and visually see the results. I have a raspberry pi zero 2 w and a HQ camera w/ 16mm lense attached to a tracking device for astrophotography. I am using Qt with libcamera so I can figure out all the different options and how best to customize the capturing. This software is initially complete with the exception of selecting valid configurations for capturing large still images. Testing was performed with a XRGB8888 format with 800x600 size. Increasing the size to use the full sensor is failing and I am running into all sorts of issues with selecting combinations of pixel format and size.
When I select RGBA8888 with a resolution of 2028x1520 and bit depth of 12, the camera is forcing the stream to YUYV 2028x1520. I could add a conversion here, but I would prefer to be as close to lossless as possible.
When I print all permutations for format with size after setting up the config with StillOptions flag, I'm not finding 4056x3040, 2028x1520, or other binning permutations. Here is the query:
I'm seeing that the 'formats.sizes(format);' has a hard coded list with no 4056x3040, 2028x1520 resolutions which is counter-intuitive. I would have expected the library to refer to the camera properties to get the sizes, not a list. I can't tell why these pixel format and size combinations are invalid; is this a hardware issue with me using a pi zero? Or is there a way to fail the validate when you are expecting a specific permutation?
I did math out I would need a different pi to get the 4056x3040 resolution, but I would still expect the binned (2028x1520) version should still work. That will be a later problem!
Any pointers would be greatly appreciated.
I'm working on a simple GUI that will let me collect still images with a UI and allow me to customize the controls like exposure and visually see the results. I have a raspberry pi zero 2 w and a HQ camera w/ 16mm lense attached to a tracking device for astrophotography. I am using Qt with libcamera so I can figure out all the different options and how best to customize the capturing. This software is initially complete with the exception of selecting valid configurations for capturing large still images. Testing was performed with a XRGB8888 format with 800x600 size. Increasing the size to use the full sensor is failing and I am running into all sorts of issues with selecting combinations of pixel format and size.
When I select RGBA8888 with a resolution of 2028x1520 and bit depth of 12, the camera is forcing the stream to YUYV 2028x1520. I could add a conversion here, but I would prefer to be as close to lossless as possible.
When I print all permutations for format with size after setting up the config with StillOptions flag, I'm not finding 4056x3040, 2028x1520, or other binning permutations. Here is the query:
Code:
config = camera->generateConfiguration({libcamera::StreamRole::StillCapture});auto const &formats = config->at(0).formats();for(const auto &format : supported_formats) { auto sizes = formats.sizes(format); // <-----}I'm seeing that the 'formats.sizes(format);' has a hard coded list with no 4056x3040, 2028x1520 resolutions which is counter-intuitive. I would have expected the library to refer to the camera properties to get the sizes, not a list. I can't tell why these pixel format and size combinations are invalid; is this a hardware issue with me using a pi zero? Or is there a way to fail the validate when you are expecting a specific permutation?
I did math out I would need a different pi to get the 4056x3040 resolution, but I would still expect the binned (2028x1520) version should still work. That will be a later problem!
Any pointers would be greatly appreciated.
Statistics: Posted by galapaegos — Thu Apr 17, 2025 1:34 pm