[ptx] Vignetting correction in nona

Pablo d'Angelo pablo.dangelo at web.de
Fri Jan 6 17:50:44 GMT 2006


Hi,

I have just commited the vignetting correction code. It implements.all the
method mentioned below:

> Gamma correction prior to the remapping. This is similar to the gamma value
> supported by PTStitcher.
> 
> Two vignetting correction modes:
>  1. correction by addition: i_new(x,y) = i(x,y) + corr(x,y)
>  2. correction by division: i_new(x,y) = i(x,y) / corr(x,y)
> 
>  The first case is similar to the vignetting correction implemented in panotools
>  plugin and suitable for gamma corrected images (like the typical gamma 2.2
>  (or something similar) of the images output by scanners or a digicam.)

While I haven't experimented a lot with it, this seems to work best for
images without many brightness variations in the border/corner areas.

>  The correction by division should work best with linear images (gray/color
>  values proportional to light captured by the sensor)

Together with the gamma correction this seems to work well. more experiments
are needed though.

> The correction offset/factor can be specified by a polynomial which depends on
> the normalized distance r (0..1) between point (x,y) and the image center.

corr(x,y) = Va + Vb*r^2 + Vc*r^4 + Vd*r^6

where Va, Vb, Vc and Vd are variables specified in the stitcher script file.

To get a similar result as the Radial Luminance correction of the panotools
plugins, use additive correction and use the Va and Vb parameters.

see also: https://www.email-lists.org/pipermail/ptx/2003-October/000721.html

To get the same results use Va=-z, Vb=z, where z is the brightness
difference given to the radial luminance filter.


For the flatfield image, the following is used:
>  1. for additive correction
>      corr(x,y) = flat(x,y)
>  2. for correction by division:
>      corr(x,y) = flat(x,y) / mean(flat)
> I decided to use different interpretations of the flatfield image because it
> should then be possible to just feed a captured flatfield image into nona.

I have used the mean value of the flat field as JD suggested.

I have made some experiements with flatfield correction by division, and so
far the results are better than with the pure, additive approach.

I'll post some more information when I had time to do some more experiments.

Automatic estimation of the correction polynomial is also planned in the future.

ciao
  Pablo


More information about the ptx mailing list