[ptx] vignetting function estimation

Pablo d'Angelo pablo.dangelo at web.de
Sun Feb 5 22:32:46 GMT 2006


Hi all,

I have uploaded some code to the CVS recently:

1. OSX changes:
     Enabled PTStitcher choice in OSX port -> it should be possible to use
     PTmender with hugin.
     Additinally, the progress window for PTOptimizer has been disabled. I
     hope this fixes the crashes some people have experienced under OSX.

     PTStitcher progress reporting uses similar code, so it might be
     exibit the same behaviour as well. :(

2. Graphical display of vignetting correction polynomial.
3. Feature to optimize this polynomial based on the overlapping images.
    This function can only estimate the polynomial for the quotient approach
    right now.

    I will post a tutorial on this later (in a week or two).

    Basic usage:
      1. assemble panorama, optimize positions until they fit very well.
      2. open vignetting correction dialog, select "correction by division"
         and polynomial
      3. use the "estimate" button on the vignetting correction dialog. The
         default parameters should be fine for the first try.
      4. click apply and switch to preview window. Update preview and check
         if the vignetting has been corrected.

      Notes: its probably a good idea to try this on a static pano without
             parallax errors and moving elements first. The estimated
	    coefficients can the be used for all other panos take with the
             same lens at the same zoom and aperture settings.

             However, it would be interesting to see how the algorithm
             behaves on "normal panos" as well :)

             Setting the gamma (in the pano panel) to 2.2 might help,
             except when "linear" raw images are used.

	    If many "inconsistend points" are reported, the panorama might
	    not match well, or the exposure and white balance might have
             changed between shots. Try with a simple scene ;)

             The algorithm is not deterministic, it will probably generate
             slightly different results on every run. Try it again if the
             vignetting curve looks strange (has bumps or hills), or doesn't
             correct the vignetting well.

    A brief technical description of the used algorithm:

      1. filter input images with a laplace filter -> use as a measurement
         for texturedness later (misregistration will have bad effects in
	areas with many details.)

      2. extract gray value pairs in overlapping image areas. Special care is
         taken that the radi of the extracted points are roughly uniformly
         distributed. This avoid problems with the very edges of the images.

         If just random points are selected from the pano, the probablility
  	that points near the corners are taken is very low -> bad estimate
	for the corners.

      3. use the RANSAC algorithm to select a largest subset of compatible
	point pairs -> try to avoid outliers in the following least
         squares fit

      4. Use a least mean squares fit with the inliers from step 3.
         This is actually a linear equation, and can be solved very fast even
         for tenths of thousands of point pairs.


good night,
   Pablo





More information about the ptx mailing list