Olympus-OM
[Top] [All Lists]

[OM] Does one add or multiply the correction image?

Subject: [OM] Does one add or multiply the correction image?
From: Joe Gwinn <joegwinn@xxxxxxxxxxxx>
Date: Mon, 31 Dec 2001 12:56:19 -0500
At 6:27 AM +0000 12/30/01, olympus-digest wrote:
>Date: Sat, 29 Dec 2001 19:38:19 -0000
>From: "Roger Wesson" <roger@xxxxxxxxxxxxxxxxxxxxxxx>
>Subject: Re: [OM] XA cosine^4 falloff and vignetting
>
>- ----- Original Message -----
>From: "Joe Gwinn" <joegwinn@xxxxxxxxxxxx>
>To: <olympus@xxxxxxxxxxxxxxx>
>Sent: Saturday, December 29, 2001 6:17 PM
>Subject: [OM] XA cosine^4 falloff and vignetting
>
>
> > >
> > >Shot a grey card or northern sky; scan that. Bring into PhotoShop and
> > >turn it into a negative and do the add layers operation. I'm not all
> > >that familiar with PhotoShop; but I've read this technique in the
> > >AstroPhoto mailing lists. It is common with astrophotos.
> >
> > This sounds about right, but does one _add_ the inverted gray-card photo,
>or does one do a pixel-by-pixel _multiply_?  By physics, I would expect that
>one would need to multiply, or the contrast would fall off at the edges,
>even if the addition corrected the average brightness.
> >
>
>I don't really know enough about the way photoshop does its operations to be
>certain, but I think adding is best.  You're right about needing to
>multiply, but the eye's response is logarithmic, so the RGB values in an
>image represent a logarithmic brightness scale, not a linear one.  Adding on
>a logarithmic scale is the same as multiplying on a linear scale (so that
>log(10) + log(5) = log(50)), so adding the grey card photo would seem to be
>the way to go.
>
>Sorry if that was an unintelligible explanation.  I'll not be at all
>surprised if theory and practice differ.

While it's true that the eye's response is more or less logarithmic, it's also 
true that film is pretty close to linear in the midrange, and digital sensors 
(CCDs) are very closely linear over an even larger dynamic range.  Falloff at 
the corners is a physical effect in the camera, not a physiological effect in 
the eyes, so the correction should also be physical.  

The correction process for CCD imagers involves subtraction of static offset 
(bias and darkfield images) followed by multiplication of each pixel by a 
correction factor derived from a uniform lightfield image.  The process 
described below for silver-based film is adapted from that for astronomical CCD 
imagers, which is in turn based on Janesick's approach ("Scientific Charge 
Coupled Devices", James Janesick, SPIE, January 2001, 920 pages hardcover, $88).

That said, the fact that our eyes are nominally logarithmic reduces the 
perceived magnitude of many imperfewctions of the camera, and increases others, 
so as you suggest some experiments may be in order.

I'm pretty sure that Photoshop can add, subtract, and multiply images, so one 
can try it.  Scientific image processing software can do all these things.


Experimental protocol: (Adapted from the procedure used to correct CCD imagers.)

Use one make and speed of film for all the following steps.  Do not mix types.

1.  Perform the following procedure to remove base fog: First take a picture in 
total darkness, yielding the darkness picture, which will be subtracted from 
all other pictures to eliminate the effect of the film's background fog level.

2.  Perform the following procedure to remove illumination variation: Take a 
picture while the camera is viewing a uniformly (to within 1%) illuminated 
white area bright enough to give a log density of about 1.0 on the negative, 
yielding a flatfield negative.  The inside of a small integrating sphere works 
well as a uniformly illuminated area.  

The camera's exposure control system will attempt to achieve 18 0ray in the 
prints, which corresponds to a negative log density of 1.0, just letting the 
camera do what it wants may suffice.  If not, it may me useful to lie to the 
camera about the film speed.  

One can test the density of a negative using an ordinary reflected-light 
lightmeter:  When metering a wall of some brightness, putting the negative over 
the lightmeter's lens should cause a 3-1/3 stop drop in illumo=ination.

In any event, great precision is not required, as the density of the flatfield 
image will cancel out in the following math.
   

In Photoshop or equivalent:

3.  Subtract the darkness picture, as described above, from all non-darkness 
photos, yielding darkness-compensated negatives.  This is done to flatfields 
and to regular picture negatives that will be compensated for illumination 
falloff.

4.  Compute the average flatfield pixel value by adding up the 
darkness-compensated values of all pixels in the flatfield negative, and 
dividing the sum by the number of pixels summed.  

5.  Compute each element in the normalization matrix, which has one element per 
pixel, by dividing the average flatfield pixel value by the value for the pixel 
corresponding to that matrix element.  Assuming a one-stop falloff at the 
corners, the resulting element values will typically range from 1.00 to 2.00.  

6.  Each negative to be corrected for falloff is multiplied pixel for 
corresponding pixel by the normalization matrix, to normalize those pixels to 
the average illumination (sensitivity) of all pixels, yielding 
illumination-corrected negatives.

7.  The illumination-corrected negatives may then be reversed to yield 
corrected positives.  If exposure was sufficient that the corners were 
adequately exposed to retain detail, the falloff will be perfectly corrected.  
In any case, one cannot do better.

Another poster commented that the degree of falloff (due to cosine^4 and 
vignetting) will vary with chosen aperture (f-stop).  The degree to which the 
XA lens suffers from this can be determined by doing the above process at three 
apertures, max, mid, and min, and comparing the corrected flatfields.


Joe Gwinn.


< This message was delivered via the Olympus Mailing List >
< For questions, mailto:owner-olympus@xxxxxxxxxxxxxxx >
< Web Page: http://Zuiko.sls.bc.ca/swright/olympuslist.html >


<Prev in Thread] Current Thread [Next in Thread>
  • [OM] Does one add or multiply the correction image?, Joe Gwinn <=
Sponsored by Tako
Impressum | Datenschutz