% Fig. 2.28
% g(x,y) = f(x,y) - h(x,y), where h(x,y) is the mask
% Enhance g(x,y)

f = imread('Fig0228(b)(angiography_live_ image).tif');
h = imread('Fig0228(a)(angiography_mask_image).tif');
imshow(f); 
figure;
imshow(h);
g = double(f) - double(h);

% Enhance difference
gm = g - min(min(g));
gm_max = max(max(gm));
gs = 255*(gm/gm_max);
figure;
imshow(uint8(gs))