-
Notifications
You must be signed in to change notification settings - Fork 188
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
[BUG] Camera tuning can calculation can overflow causing alternating white and black lines when images are very red. #1160
Comments
Hi, thanks for the report. Can you provide a link to a DNG file that you've captured that gives rise to a bad LSC tuning? That would give me something I could investigate. Thanks! |
Thanks for the quick response @davidplowman. Would an |
Would prefer a DNG really. |
I currently don't have hardware to hand so this was generated by someone else with:
there is also a jpg. The DNG doesn't look raw? Do we need to redo with I have looked at Is there also a reason why the table is reduced to only 16x12 compared to the 52x39 that was possible in the old camera stack? |
I've taken a look, though I'm not quite sure what to make of it. A few comments:
In case it's useful, here's what I wrote to process the DNG file into something viewable based on the tuning you have.
Also, how are you capturing these images? They seem quite low resolution. Are you able to capture with |
Right. I have managed to reproduce this with So I made my custom tuning file with our software. And added an I took an image of nothing with the white balance on. I got a nice image. I recorded the gains and using I moved the microscope slide so I am looking directly at red pen I then ran:
I still get the clear red-cross with the black and white artifacts: The DNG has no cross and looks quite yellow. It has a bright centre and is dull around the edges. We expect this sort of ring shape due to the lenslet array when using at as a microscope. Hence the custom tuning. When running your code above we get a uniform-ish image (screenshot): Tuning, DNG, and full-res jpg: |
Describe the bug
Camera tuning can calculation can overflow causing alternating white and black lines when images are very red. This happens when using it as a microscope. We use a custom tuning file to do lens shading correction. A similar algorithm was developed for the old picamera stack and does not give this issue with the same hardware.
To Reproduce
I apologise that this is significantly less self contained than you would like! But it gives you an idea of what we are doing.
Expected behaviour
A uniform-ish red image. The alternating black and white lines in the grey area seem to imply there is some sort of overflow in the alsc calculation, in certain areas of the image if the pixels are too red.
Console Output, Screenshots
Without the same lens set up this isn't going to be overly useful for reproducing the images.
Hardware :
Pi4, Pi Camera v2, Custom lens setup to make it a microscope as explained above.
Additional context
Tagging others who work on the OpenFlexure project.
@rwb27 @JohemianKnapsody
The text was updated successfully, but these errors were encountered: