Shading correction
Compensates for uneven lens and CCD performance

see copyright notice. Page created 11-Mar-2005

-----

Making panoramic pictures the hard way (without clever image-stitching software) reveals camera artifacts that you didn't know existed. I was quite surprised by the variations in brightness and colour across my camera's field of view, which gave a distinctly stripey appearance to some composite images.

[original pictures]

This thumbnail comprises two of the six frames that form a panoramic picture of a pier. All the camera settings were of course locked for the duration. I'd normally join the images with a transparency fade a few pixels wide, but here I've used an abrupt edge to make the unevenness stand out. Due partly to lens optics, partly to the CCD sensor (I suspect), each frame is brighter in the centre than at the edges, and slightly green on the left, magenta on the right. Once you're aware of these things, even individual pictures not intended for panoramas look bad!

[shade map]

I made this image in Corel PHOTO-PAINT (TM), by averaging several pictures of an overcast sky, taken with the camera in different orientations, and focussed close-up, so that any detail in the sky itself was minimised. There might have been better ways of getting the camera's view of a uniform white area, but it's really quite tricky to illuminate something like a piece of paper absolutely evenly! The lens angle and white balance were the same as I'd used for the pier pictures. I applied lots of blur to get rid of any residual camera noise, and made a slight brightness adjustment so that the brightest component (blue) of the brightest part of the image just touched 255. It's vital to avoid clipping when preparing such an image (which I'll refer to as a shade map).

[enhanced shade map]

As a curiosity, this is the same shade map image, with the contrast greatly enhanced. I'm unsure of the origin of the three dark blotches, but they are also present in the pier frames, so they do need to feature in the clean-up.

[shading corrected]

I pasted the shade map image over each pier frame in turn, with the Merge Mode set to Divide. This has the effect of multiplying every pixel by the inverse of the corresponding shade map pixel - i.e. the software appears to treat level 255 as 1.0 in its divisions. The pier frames are now minus their shading, as evidenced by the disappearance of the join!

[shading and colour corrected]

In theory, this technique could provide colour correction as well, but in this case my overcast sky was a bit blue-green, so it "corrected" the pier sky to look more pink. This version is altered to look closer to the original colour.

-----

[Top of page]