2

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:

  1. 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.

  2. 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.

  3. 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.

  4. 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).

  5. 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!

  • You might want to look into the source code for Hugin and Enfuse. Both are able to create panoramas from separate frames that have seamless blending at the edges of each frame. I don't know how their algorithms work, but all they have to work with is the data in the image files themselves. It is not 100% perfect every time, but for the most part, stitching panoramas with these tools produces seamless results in most cases. – jrista Sep 25 '13 at 6:54
1

The seams will only match exactly if the seams are located in areas that correspond to the average values you have used in creating a profile for each camera. If the seams are located closer to the edges of the frame, then perhaps you should sample the values from the same areas to create your camera profiles instead. This problem is compounded by the fact the seams cross areas of varying amounts of vignetting that may vary by different amounts in each individual camera.

You should also do your samples with the same lens set to the same aperture (and focal length if it is a zoom) as you will use in the shots you want to stitch. These variables will also affect the exact values from one camera to the next. If, for example, you take one photo at f/2 and 1/250 second and another at f/4 and 1/60 sec they will be very close, but not exactly the same exposure value. This is because of the minor imprecision between stated and actual apertures and shutter speeds.

  • I agree with everything you said regarding taking the imagery. Each camera had its own flat field applied to it, which was calculated from the average light and dark images. Also the aperture, integration time and focal length were all the same. I am wondering if one camera had significantly more flickering pixels, that could cause the average color channel for one camera to be significantly different from the other? I've always assumed this to be a simple gain and offset correction, but perhaps I'm making an ass-u-me? – Peter Sep 25 '13 at 18:21
  • Assuming that the selected focal length, aperture, and timing are exactly the same with different cameras will also lead to errors. f/5.6 is rarely exactly f/5.6. 35mm is rarely exactly 35mm. 1/60 second is rarely exactly 1/60 sec. If all of the cameras are the same exact model, there could still be slight differences, and if they're not all the same design then all bets are off. 35mm, 1/60 sec @ f/5.6 on one might actually be 32mm, 1/58 sec @ f/5.4 and the next might be 37mm, 1/65 sec @ f/5.9. Not to mention ISO varies by as much as 1/2 stop or more between manufacturers. – Michael C Sep 26 '13 at 2:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.