[argyllcms] Re: inter-instrument matching tables

  • From: Gerhard Fuernkranz <nospam456@xxxxxx>
  • To: argyllcms@xxxxxxxxxxxxx
  • Date: Tue, 15 Nov 2011 20:54:39 +0100

Am 15.11.2011 18:28, schrieb Alexey Gribunin:
Hello Gerhard!
Please can you describe a little bit more the calculation process of this 
matrix. Did you use MathCad?

Hello Alexy,

please see the code snippets below which I had already attached previously. I'm 
using GNU Octave, but I think they should work also in Matlab, or other Matlab 
clones. You're asking for more - however the core of the calculation isn't 
more... (but there is likely room for additional improvements).

Spectral_readings and reference_readings are the two corresponding measurement 
sets, acquired with the two instruments, from the same print of the test chart 
(the rows of these matrices are the observations (i.e. the patches), and the 
columns are the spectral bands; the columns of the two measurement sets do not 
need to correspond 1:1, i.e. the wavelength ranges and sampling intervals of 
the two instruments can be different).

Regards,
Gerhard


Gerhard Fuernkranz wrote:
[...]

    % compute correction matrix M

    % training set, measured with 2nd instrument
    spectral_readings = [
      ...
    ];
    % same chart measured with 1st (reference) instrument
    reference_readings = [
      ...
    ];
    % number of principal components
    num_pc = 15;
    [u,s,v] = svd(spectral_readings);
    basis = v(:,1:num_pc);
    M = basis * ((spectral_readings * basis) \ reference_readings);


    % apply correction to spectral readings measured with 2nd instrument

    estimated_reference_readings = readings * M;



Other related posts: