[ptx] Brightness/colour correction in pano12 and nona

Pablo d'Angelo pablo.dangelo at web.de
Sun Jan 16 09:26:24 GMT 2005


Hi!

Just stumbled upon this when searching for another mail...

Bruno Postle wrote:
> While I was looking around in adjust.c, there seems to be all the
> code used by PTStitcher to do brightness/colour correction of image
> pairs:
> 
>   void GetColCoeff ( Image *src, Image *buf, double ColCoeff[3][2] )
>   void ColCorrect ( Image *im, double ColCoeff[3][2] )
>   void DoColorCorrection ( Image *im1, Image *im2, int mode )
> 
> Could this be useful in nona?

I believe this is an old version of the correction algorithm, not the 
one described on

http://www.path.unimelb.edu.au/~dersch/cbcorrect/cb.html

Regarding that page, the description is a bit sparse on implementation 
details.

Quote from H.Dersch:
================================
 > If two images are perfectly colour balanced, their histograms are
 > identical. The algorithm now included in PTStitcher calculates
 > gradation-curves for each colour channel which match the corresponding
 > histograms. These gradation curves are then used to correct image B.
 > There are several advantages of this method:
 > [...]
 > The curves used for correction are calculated using a transformation
 > of the histograms, and are exact (at least under usually applicable
 > assumptions), not mere optimizations. They refer to the best fit
 > obtained using 256 variables for each channel. In other words: If the
 > image can be adjusted, this method will find the correct curves for
 > performing this adjustment.


Does anyone know what kind of transformation he uses? My first idea 
would have been minimisation of the error between the histograms, using 
numerical optimisation.

ciao
   Pablo



More information about the ptX mailing list