Deman32 (15 Январь 2015 - 10:56):
нашёл уже готовый, делал его для мембера ккк под с1(cLUT icm должен быть 33х33х33, что типично, если нет сделайте любой в аргайле с -qh), вам только предпоследнюю строку закомментить, а 12ю с конца раскомментить(в не исправленном виде копируется матрих из матрих icm'а в матрих cLUT профайла).
plut=iccread('C:\Users\64\d3_synth1.icm');
pmtx=iccread('C:\Users\64\YandexDisk\ICCProfileInspector\D600_it8_SUNLIGHT.icm');
gamma=1.72;
% Brad = [0.8951, 0.2664, -0.1614; -0.7502, 1.7135, 0.0367; 0.0389, -0.0685, 1.0296];
% D65 = [95.04; 100; 108.89];
% D50 = [96.42; 100; 82.49];
% roe65 = Brad*D65;
% roe50 = Brad*D50;
% midmat = zeros(3,3);
% midmat(1,1) = roe50(1)/roe65(1);
% midmat(2,2) = roe50(2)/roe65(2);
% midmat(3,3) = roe50(3)/roe65(3);
% adapt = inv(Brad)*midmat*Brad;
CLUT=plut. AToB0.CLUT;
v=[1;1;1];
mtx = [pmtx.MatTRC.RedColorant(1) pmtx.MatTRC.GreenColorant(1) pmtx.MatTRC.BlueColorant(1); pmtx.MatTRC.RedColorant(2) pmtx.MatTRC.GreenColorant(2) pmtx.MatTRC.BlueColorant(2); pmtx.MatTRC.RedColorant(3) pmtx.MatTRC.GreenColorant(3) pmtx.MatTRC.BlueColorant(3)];
%mtx=adapt*mtx;
for b=1:33
for g=1:33
for r=1:33
v(1)=((r-1)/32)^gamma*30000; % here is 30000 but 65535 is max
v(2)=((g-1)/32)^gamma*30000;
v(3)=((b-1)/32)^gamma*30000;
%v=mtx*v; % u may put the matrix to the cLUT as well
CLUT(r,g,b,1)=v(3);
CLUT(r,g,b,2)=v(2);
CLUT(r,g,b,3)=v(1);
end;
end;
end;
plut.AToB0.CLUT=CLUT;
pplut. MediaWhitePoint = pmtx. MediaWhitePoint;
plut.MediaBlackPoint = pmtx.MediaBlackPoint;
plut.AToB0.PreMatrix= mtx; % put the matrix to the Prematrix tag cell
iccwrite(plut, 'C:\Program Files\Phase One\Capture One 8\Color Profiles\DSLR\matlab_zero.icm');