Commit f0e95d8a authored by Turnhout, M.C. van's avatar Turnhout, M.C. van
Browse files

prepare figures for yg blends

parent fa3eb035
......@@ -315,7 +315,7 @@ But that reasoning may be too hasty.\\
\noindent In the last example we still asked `how much of these three paints does an artist use to paint this flag?' but we switched the actual black (colour) in the flag for a purple-blue-ish paint (figure \ref{flagJA2rc}). And given that the artist had to produce a black colour with yellow, green and purple-blue-ish paint\dots\ we still got the correct answer.
The \textsl{colour} `yellow' may not be present in the flag, that doesn't mean that the artist did not use yellow \textsl{paint} for (all) non-`yellow' colours in the flag\footnote{The fact that the `paint' in the second perpendicular example `does not exist' changes the numbers, but does not change the argument.}.\\
The \textsl{colour} `yellow' may not be present in a certain part of the flag, that doesn't mean that the artist did not use yellow \textsl{paint} for (all) non-`yellow' colours in the flag\footnote{The fact that the `paint' in the second perpendicular example `does not exist' changes the numbers, but does not change the argument.}.\\
\noindent So `where is the \textsl{colour} yellow?' may be an ambiguous question, in colour deconvolution you actually ask: `where is the \textsl{dye} (paint) yellow?'\footnote{More precisely, you ask: `\textsl{how much} of dye \dots\ is there?'}.
......@@ -328,6 +328,8 @@ If the colours in your image are truly the result of only \textsl{two} dyes, t
\noindent Well. As long as you are deconvolving pure (not blended) paints, that is. Although the results for `black' are promising, it is time to move on and to investigate (known) blends of colours.
\section{Two blending flag colours analysis}
\section{Two blending flag dyes analysis}
\nocite{Haub2015}
\ No newline at end of file
......@@ -8,66 +8,93 @@ dyes = [254 209 0; % yellow
0 0 0]'; % black
% do the deconvolve
[amounts, P, Q, R, RGB, A, K, iOD] = cld_decon(dyes, im, 'rgb');
% show image
figure
imshow(im)
[amounts, P, Q, R, RGB, A, K, iOD] = cld_decon(dyes, im(1, 1, :), 'rgb');
% test image green/yellow
m = 3;
[ay, ag] = meshgrid(linspace(0, norm(A(:, 1)), 256), linspace(0, norm(A(:, 2)), 256));
m = 3; s = 5e2;
[ay, ag] = meshgrid(linspace(0, norm(A(:, 1)), s), linspace(0, norm(A(:, 2)), s));
tim = zeros([size(ag) 3]);
for r = 1:size(ag, 1)
for c = 1:size(ag, 2)
tim(r, c, :) = cld_OD2RGB(K, [ay(r, c), ag(r, c), 0]');
tim(r, c, :) = cld_od2rgb(K, [ay(r, c), ag(r, c), 0]');
end
end
figure
imshow(uint8(tim))
imwrite(uint8(P), 'pics/sim1ry.png', 'PNG')
[tamounts, tP, tQ, tR, tRGB, tA, tK, tiOD] = cld_decon(dyes(:, 1:2), tim, 'rgb');
figure
imagesc(ay)
imagesc(ay/norm(A(:, 1)))
colormap(gray)
colorbar
xlabel('$a_y/norm(ay)$\.[-]')
ylabel('row')
svgprint(2, 'pics/sim1ygayin')
figure
imagesc(squeeze(tamounts(:, :, 1)))
imagesc(squeeze(tamounts(:, :, 1))/norm(A(:, 1)))
colormap(gray)
colorbar
xlabel('$\hat{a}_y/norm(ay)$\,[-]')
ylabel('row')
svgprint(3, 'pics/sim1ygayout')
p = ay(:);
q = squeeze(tamounts(:, :, 1)); q = q(:);
figure
plot(p, q, '.', [0 6], [0 6])
xlabel('$a_y$\,[-]')
ylabel('$\hat{a}_y$\,[-]')
svgprint(4, 'pics/sim1ygasy')
figure
imagesc(ag)
imagesc(ag/norm(A(:, 2)))
colormap(gray)
colorbar
ylabel('$a_g/norm(ag)$\,[-]')
xlabel('column')
svgprint(5, 'pics/sim1ygagin')
figure
imagesc(squeeze(tamounts(:, :, 2)))
imagesc(squeeze(tamounts(:, :, 2))/norm(A(:, 2)))
colormap(gray)
colorbar
ylabel('$a_g/norm(ag)$\,[-]')
xlabel('column')
svgprint(6, 'pics/sim1ygagout')
p = ag(:);
q = squeeze(tamounts(:, :, 2)); q = q(:);
figure
plot(p, q, '.', [0 6], [0 6])
xlabel('$a_g$\,[-]')
ylabel('$\hat{a}_g$\,[-]')
svgprint(7, 'pics/sim1ygasg')
% figure
% imagesc(zeros(size(ay)))
% colormap(gray)
% colorbar
% svgprint(8, 'pics/sim1ygayin')
figure
imagesc(zeros(size(ay)))
imagesc(squeeze(tamounts(:, :, 3))/norm(A(:, 3)))
colormap(gray)
colorbar
ylabel('row')
xlabel('column')
svgprint(8, 'pics/sim1ygabout')
figure
imagesc(squeeze(tamounts(:, :, 3)))
colorbar
p = ay(:);
q = squeeze(tamounts(:, :, 3)); q = q(:);
figure
plot(p, q, '.', [0 6], [0 6])
plot(p, q, '.')
xlabel('$a_y$\,[-]')
ylabel('$\hat{a}_b$\,[-]')
svgprint(9, 'pics/sim1ygasb')
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment