I'm an electrical engineer, but I thought I'd ask this in the photography section to get some more insight from experienced photographers.
I am designing a system which will stitch images taken by multiple cameras to create landscape imagery in real time. In order to remove the seam between two adjacent images, I have taken the following steps for each camera:
Pointed each camera into a flat field source (like an integrating sphere or a white panel with diffused light) and averaged 20 light images to produce a single average light image.
Calculated the average pixel value for each color in the light image. This gives me three values - one for red, green and blue since the camera sensor is a Bayer array. The average value should be slighly greater than corner pixels and slightly less than center pixels due to vignetting.
Repeat steps 1 and 2 again with the lens cap on to produce dark image values and create a flat field gain table for each camera.
I then used the average light and dark colors to calculate color gains so that I can reference an image taken by one camera to another camera. (light color Cam2 - Dark color Cam2) / (light color Cam1 - dark color Cam1).
Then take two adjacent images, flat field them, apply the color gain calculated above to camera 1 and the seam should disappear!
But it doesn't and I am unsure why. When removing seams, is there something else that should be done? All of my algorithms are very basic, such as averaging the green color adds all of the green pixels up and then divides by half the total number of pixels (since this is Bayer, half are green, quarter are red, quarter are blue). Anyone with any experience doing this before?
Thanks!