Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

Camera board • Re: MMAL lens shading v2 (Zero 2W) + Camera v2 NOIR

$
0
0
As Jamesh has implied, it also means I shouldn't be dedicating any significant time on the forums to it.
I understand and it is noted. Thank you for all and future replies. We are thankful. Yes, we are only human so we didn't expect being able to recall like yesterday but we thought of giving it a chance since forums are sometimes helpful and Pi has been quite "open" since at the beginning of business. I learned a lot and forgotten a lot too so I'd probably fail at job interviews because I have to remember everything.

I will try to keep questions short and simple and hopefully won't take more than 15 minutes in my posts and I think my posts won't be that often moving forward regarding this (famous last words... :oops: ) since I think you have decanted some valuable information in the latest posts. I thank you. :)

When we make it past the finish line, we'll let you know by singing the praises of Pi.

I honestly don't recall as it was 6 years ago. Highly unlikely I used Matlab as it's not a tool I tend to go for.
Reading https://github.com/6by9/lens_shading/bl ... .c#L39-L40

I probably viewed it with Vooya as a 10bpp single channel image with 16bit packing.
Yes, I did see that 10bpp in your lens shading project later as I somehow missed that initially. Initially, I was wondering how to use all these with the ls_table.h. Got it with Vooya.

IMX219 (V2) has a black level of ~66. Check the libcamera tuning files (imx219 and ov5647) but be aware that those values are normalised to 16bit, hence 64 (2^6) times larger.

Ideally you measure it by taking a capture with short exposure and covered lens and see what the values come out as.
How short would you think this baseline exposure should be with covered lens, about 100ms, or between 20ms to 80ms?

OK, will note on the 64 (2^6) times larger in libcamera tuning files when I get to that bridge.

Why do you think ch1 and ch2 are the green channels? That wouldn't fit with any Bayer pattern.
https://github.com/6by9/lens_shading/bl ... #L297-L303
Ch1 would appear to be red, ch2 and 3 are the greens, and ch4 is the blue.
Mea culpa. I made a boo boo in my Excel spreadsheet and sorry to confuse you. I was counting from 0 instead of 1. So in principle, I concur with you.

To correct my above Excel chart spreadsheet (lens_shading_calibration_kernel.jpg) :

Incorrect --> Corrected
Ch0 -R --> Ch1 -R
Ch1 -Gr --> Ch2 -Gr
Ch2 -Gb --> Ch3 -Gb
Ch3 -B --> Ch4 -B

Feel free to mess around and program higher values in one channel to observe the behaviour and which colour the image shifts to. I'm expecting big values in ch1 will give a red image, and big values in ch4 will give a bluer image. Changes in the green channel are generally less obvious.
Cool. This is helpful. Thank you very much!



Have a good day 6x9 and jamesh for your time and support.

Statistics: Posted by jmnemonic — Thu Dec 11, 2025 2:46 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles