-
Notifications
You must be signed in to change notification settings - Fork 219
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
The preview image is wrong when the preview width is greater than 2048 using Pi3. #66
Comments
Could you provide the exact command line you are using to get this corruption? Additionally, what sensor is this on? |
Sorry for that. I thought this might be a known issue or limitation.
libcamera-vid:
config.txt
hardware info:
I tested IMX219 and IMX477 and they have the same problem, it seems that this problem has nothing to do with the camera and only has to do with the resolution. |
@gdldiv, thank you for the info. I am away for a week, so will not get a chance to look at this for a few days. However, could I ask you to try using the |
Thanks for the information. I've had a look at this today and indeed it's easy to reproduce the problem. I think the root cause is that the maximum texture size is more restricted on the Pi 3. Unsurprisingly given the symptoms, GL_MAX_TEXTURE_SIZE appears to be set at 2048. On the one hand I don't think there's much we can do about that, although I wonder whether the real issue is not so much that you want huge images, it's more that you perhaps want to force the camera into full read-out mode? In general we still have some issues around getting libcamera to use the correct camera mode, but there might also be some other workarounds we could look at - for example, libcamera can give us a "lower resolution stream" alongside the main one, which we might be able to use instead. Can you explain anytthing more about the specific use-cases you have in mind, then we could give these questions some thought? Thanks! |
Thanks for your reply, As you said, our main purpose is not to preview the large resolution, but whether the preview mode selected by libcamera-still is correct. |
@glddiv Thanks for the reply. I think the most obvious idea would simply be to figure out the maximum allowed image size and be sure not to exceed it (well, certainly not by default!). That wouldn't quite fix everything, though:
I probably need to sleep on that a bit. |
Does the current ISP support image resize operation? (I remember that mmal provides a resize component. Does this mean that ISP supports resize?) |
We've pushed a modification which detects the maximum allowed image size and uses this to limit what it asks for from the camera. This should largely fix this issue. If anyone runs into the remaining awkward case of trying to record (for example) 4K MJPEG on a Pi 3 with a preview, please submit a new report and we'll think some more on that one. Thanks! |
Thank you very much, I tested it and it works great! |
When using libcamera-still to set the width of the preview resolution (--viewfinder-width) greater than 2048 on Pi3, the image is not displayed correctly. (The saved picture is normal)
The effect is as follows:
There is no problem using the same SD Card on Pi4.
kernel version:
Linux raspberrypi 5.10.52-v7+ #1444 SMP Thu Aug 12 20:22:57 BST 2021 armv7l GNU/Linux
firmware version:
The text was updated successfully, but these errors were encountered: