testdeconJA.m 426 Bytes
Newer Older
1
2
3
clear all; close all;


Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
4
dyes = [254 209 0; % yellow
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
5
6
    0 155 58 % green
    0 0 0]';    % black
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
7
im = imread('pics/Flag_of_Jamaica.png');
8
9

[amounts, P, Q, R, RGB, A, K, iOD] = cld_decon(dyes, im, 'od');
10
11


Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
12
13
14
15
figure
imshow(im)

figure
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
16
imshow(uint8(P))
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
17
18

figure
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
19
imshow(uint8(Q))
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
20
21

figure
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
22
imshow(uint8(R))
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
23
24
25
26
27
28
29
30
31

for d = 1:3
    
    figure
    imagesc(amounts(:, :, d))
    colormap(gray)
    colorbar
    
end
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
32
33
34


figure
Turnhout, M.C. van's avatar
Turnhout, M.C. van committed
35
imshow(uint8(RGB))