# Xrite Color Profiles ?

Started 11 months ago | Discussions thread
Re: Pinv and the Normal Equation
1

Xasan wrote:

Jack Hogan wrote:

Xasan wrote:

Iliah Borg wrote:

Xasan wrote:

Right! Thank you, I missed that.

I don't know enough about pinv to undestand why

4. With pinv,

M0 = pinv(raw) * xyzRef;

or

Try seeding with

M0 = xyzRef' * pinv(raw');

should give the same result as the standard form of the Normal Equation referenced in the original code

M0 = pinv(raw' * raw) * raw' * xyzRef;

Calculating M0 as pinv(raw' * raw) * raw' * xyzRef;

7.3014e-01 2.8669e-01 7.4507e-02
2.2482e-01 9.5975e-01 -3.1573e-01
7.3872e-03 -2.3704e-01 1.1420e+00

avg. dE00 = 16.873

Calculating M0 as xyzRef' * pinv(raw'):

7.3014e-01 2.2482e-01 7.3872e-03
2.8669e-01 9.5975e-01 -2.3704e-01
7.4507e-02 -3.1573e-01 1.1420e+00

avg. dE00 = 1.4427

The difference between M0 matrices is - transpose.

[or equivalently for speed in Matlab/Octave: M0 = (raw' * raw) \ raw' * xyzRef]

- but neither seems to give equivalent results.

Somehow I missed your reply the first time around but you are indeed correct, I wonder what I was smoking earlier. In any case for reference in Matlab the fastest solution of those above seems to be provided by

inv(raw' * raw) * raw' * xyzRef

which I will use from now on, thanks.

Jack

Complain
Post ()
Keyboard shortcuts: