# mathematical transfer for different camera attributes

Suppose I have two camera shoots(Image1,Image2) for the exactly same scene (each pixel is alignment correctly) but from different cameras and different light conditions. I want to remove this light difference. I tried two way till now:

2. Gamma correction

I am getting result around 7/255 difference after adjustment.

I am looking for a mathematical transform "F", something like Adjusted_Image=F(Image1) which leads to |Image1-Image2| ~ 0 The "F" function will contains must-tuned parameters (a,b,c,....).

Any ideas of the formula of "F"?

many thanks,

• Hi This process is also known as Color Correction. You may find more info here.ia802707.us.archive.org/23/items/Lectures_on_Image_Processing/… – Balaji R Jun 9 '15 at 13:05
• The results are pretty good better than gamma or SV in most cases. I thank you @ Balaji R... you may please add it as answer so I can accept it. if not I gonna right it as answer. many thanks for your help :) – Humam Helfawi Jun 9 '15 at 14:58

This Process is Known as Color Correction.It is Explained in more detail here.

To Give a short Explanation:

Lets suppose

You have a Input Color Matrix represented as

    | R_O1 G_O1 B_O1 |
A = | R_O2 G_O2 B_O2 |
| R_On G_On B_On |


and a Reference Target Color Matrix represented as

    | R_T1 G_T1 B_T1 |
B = | R_T2 G_T2 B_T2 |
| R_Tn G_Tn B_Tn |


Color Correction Matrix X is computed as follows:

            **A X = B**

| R_O1 G_O1 B_O1 |     | A11 A12 A13 |   =  | R_T1 G_T1 B_T1 |
| R_O2 G_O2 B_O2 |   * | A21 A22 A23 |      | R_T2 G_T2 B_T2 |
| R_On G_On B_On |     | A31 A32 A33 |      | R_Tn G_Tn B_Tn |


X = (B.A^T)(A.A^T)^-1