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

start presenting chapter

parent f484fb65
...@@ -89,6 +89,8 @@ ...@@ -89,6 +89,8 @@
\include{algebra} \include{algebra}
\include{testJA} \include{testJA}
\begin{savequote}\vspace*{-2cm} \begin{savequote}\vspace*{-2cm}
Here at the Journal of Alternative Facts, we do not believe in retraction. In the field of alternative facts, there are no mistakes or falsehoods, only facts that are appropriately alternative. In fact, we encourage submission of retracted papers from other venues to the Journal of Alternative Facts. \qauthor{Casey Fiesler, cited by Ivan Oransky \cite{Oransky2017}}\end{savequote} Here at the Journal of Alternative Facts, we do not believe in retraction. In the field of alternative facts, there are no mistakes or falsehoods, only facts that are appropriately alternative. In fact, we encourage submission of retracted papers from other venues to the Journal of Alternative Facts. \qauthor{Casey Fiesler, cited by Ivan Oransky \cite{Oransky2017}}\end{savequote}
\def\bibname{References} \def\bibname{References}
...@@ -104,10 +106,7 @@ Here at the Journal of Alternative Facts, we do not believe in retraction. In th ...@@ -104,10 +106,7 @@ Here at the Journal of Alternative Facts, we do not believe in retraction. In th
%\clearpage %\clearpage
\appendix \appendix
%\include{addendum} \include{present}
%\include{demosall}
%\include{engines}
%\include{elmlib}
%\include{chapter7}
\end{document} \end{document}
% !TeX root = ClDlab.tex
%\begin{savequote}
%Yet why should anyone assume that the intervention of an instrument necessarily corrects defects of sensation, rather than making them worse? It was thought, with good reason, that lenses and prisms alter the light that passes through them: not only is it refracted (meaning in effect that its path is altered), but it was suspected &mdash; until Isaac Newton showed otherwise &mdash; that the spectral colours seen in sunlight after passing it through a prism were <i>produced</i> by the prism and not merely <i>revealed</i> by it. </br></br>Philip Ball. <i>Curiosity &mdash; How Science Became Interested in Everything</i> (The University of Chicago Press, 2012).
%Who could have imagined that the sun's bright white beams are spun from red and blue, green and purple, especially since artists knew very well that mixing many colours made them only become progressively more muddy and dark? That, indeed, was one reason why Newton's theory of colour and light was long resisted by both artists and philosophers. </br></br>Philip Ball. <i>Curiosity &mdash; How Science Became Interested in Everything</i> (The University of Chicago Press, 2012).
%\end{savequote}
\chapter{Presenting and analysing results}\label{present}
Colour deconvolution solves the question `how much of each of these (3) paints did the artist use for this master-piece?'. In other words: the outcome, the result, of colour deconvolution is `the (3) amounts of dye (pigment)' in a pixel.
This, however, is not the `result' that colour deconvolution algorithms may present (by default), nor does it have to be the `result' that the end-user would most appreciate.\\
\noindent Colour deconvolution results can be presented, interpreted, and handled in many ways. We will show some of those in this appendix with deconvolution results for the image in figure \ref{presentraw} as an example.
\begin{figure}[h]
\center
\includegraphics[width=\linewidth]{pics/2ColorImageselection.png}\\
\caption{Example image for deconvolution. \label{presentraw}}
\end{figure}
\ No newline at end of file
clear all; close all;
% read image
im = imread('pics/2ColorImageselection.png');
% % `original' absorbtion values from Martin (only for the two dyes, add
% % third colour here)
% dyes = [0.5737953, 0.6956962, 0.4322119;
% 0.24696793, 0.84164965, 0.48024228]';
%
% % do the deconvolve
% [amounts, P, Q, R, RGB, A, K] = cld_decon(dyes, im, 'od', 'norm');
dyes = [58 52 113; 244 220 202]';
% % do the deconvolve
[amounts, P, Q, R, RGB, A, K] = cld_decon(dyes, im, 'rgb');
figure
subplot(2, 2, 1)
imshow(im)
for n = 1:3
subplot(2, 2, n + 1)
imshow(squeeze(amounts(:, :, n)))
colorbar
caxis([min(min(squeeze(amounts(:, :, n)))) max(max(squeeze(amounts(:, :, n))))])
end
figure
subplot(2, 2, 1)
imshow(im)
for n = 1:3
subplot(2, 2, n + 1)
imshow(squeeze(amounts(:, :, n)))
colorbar
caxis([0 max(max(squeeze(amounts(:, :, n))))])
end
figure
subplot(2, 2, 1)
imshow(im)
subplot(2, 2, 2)
imshow(uint8(round(P)))
subplot(2, 2, 3)
imshow(uint8(round(Q)))
subplot(2, 2, 4)
imshow(uint8(round(R)))
figure
subplot(2, 2, 1)
imshow(im)
subplot(2, 2, 2)
imshow(rgb2gray(uint8(round(P))))
subplot(2, 2, 3)
imshow(rgb2gray(uint8(round(Q))))
subplot(2, 2, 4)
imshow(rgb2gray(uint8(round(R))))
figure
ap = double(squeeze(amounts(:, :, 1)));
hist(ap(:), 50)
figure
ar = rgb2gray(uint8(round(P)));
hist(double(ar(:)), 50)
figure
plot(ap(:), ar(:), '.')
\ No newline at end of file
...@@ -11,8 +11,8 @@ dyes = [254 209 0; % yellow ...@@ -11,8 +11,8 @@ dyes = [254 209 0; % yellow
[amounts, P, Q, R, RGB, A, K, iOD] = cld_decon(dyes, im(1, 1, :), 'rgb'); [amounts, P, Q, R, RGB, A, K, iOD] = cld_decon(dyes, im(1, 1, :), 'rgb');
% test image green/yellow % test image green/yellow
m = 3; s = 5e2; m = 1; s = 5e2;
[ay, ag] = meshgrid(linspace(0, norm(A(:, 1)), s), linspace(0, norm(A(:, 2)), s)); [ay, ag] = meshgrid(linspace(0, m*norm(A(:, 1)), s), linspace(0, m*norm(A(:, 2)), s));
tim = zeros([size(ag) 3]); tim = zeros([size(ag) 3]);
for r = 1:size(ag, 1) for r = 1:size(ag, 1)
for c = 1:size(ag, 2) for c = 1:size(ag, 2)
...@@ -117,4 +117,20 @@ set(gca, 'view', [122 22]) ...@@ -117,4 +117,20 @@ set(gca, 'view', [122 22])
% svgprint(10, 'pics/sim1ygRGB') % svgprint(10, 'pics/sim1ygRGB')
da = ay - squeeze(tamounts(:, :, 1)); da = ay - squeeze(tamounts(:, :, 1));
da(da > 0.01) = 1; da(da < 1) = 0; figure, imagesc(da)
colorbar
figure, imagesc(tim(:,:,3))
colorbar
% da(da > 0.01) = 1; da(da < 1) = 0;
m = [ay(end, end) ag(end, end) 1;
ay(end-20, end) ag(end-20, end) 1
ay(end, end-20) ag(end, end-20) 1]
I = [da(end, end); da(end-20, end); da(end, end-20)]
coeff = m\I
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