As Jamesh has implied, it also means I shouldn't be dedicating any significant time on the forums to it.Yes, you did say that! We appreciate in whatever we could learn from this. In my head (non-native English speaker), legacy and unsupported mean use-as-it-is as there will be no firmware update, mmal update, code update, or work to make this work from Raspi et al.As I've said early, this is all legacy and hence unsupported.
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.1/ Also, how to open ch1.bin, ch2.bin, ch3.bin, ch4.bin to look at the surface? I guess these are stuff for Matlab since your comment states four colour channels as ch1.bin-ch4.bin, viewable as 16bit/pixel single channel images, although only the bottom 10 bits are used. I cannot seem to figure out what software to use to view these. I tried GIMP and failed.
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.* It'll write out the four colour channels as ch1.bin-ch4.bin, viewable as
* 16bit/pixel single channel images, although only the bottom 10 bits are used.
Black level is dictated by the sensor.2/ Based on your experience, in my baseline-raw.jpg, since it is a 10 bit raw file so RGGB channels would be 0 to 1023, maybe I should increase my black levels instead of using default value of 16?
OV5647 (V1 camera) had a black level of 16. 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.
Why do you think ch1 and ch2 are the green channels? That wouldn't fit with any Bayer pattern.3/ This lens_shading_calibration_kernel.jpg is based on baseline-raw.jpg which then correction is applied to produce image-with-custom-shader.jpg.
Based on your experience, which channels would be best to tinker with to reduce the green dot, yellow dot, vignette? Should I look at Ch1 and Ch2, (both greens channels) and flatten the centre so instead of values at centre closer low 32s, they would be in their 40s so closer to their edges, OR bring their edges from 40s closer to the centre so high 32s?
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.
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.
Statistics: Posted by 6by9 — Thu Dec 11, 2025 12:42 pm