]> AND Private Git Repository - these_gilles.git/blob - THESE/codes/graphe/Ncut_9/showmask.m
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
19 oct
[these_gilles.git] / THESE / codes / graphe / Ncut_9 / showmask.m
1 function RGB=showmask(V,M,display_flag);
2 % showmask(V,M);
3 %
4 % M is a nonneg. mask
5 % Jianbo Shi, 1997
6
7 V=V-min(V(:));
8 V=V/max(V(:));
9 V=.25+0.75*V; %brighten things up a bit
10
11 M=M-min(M(:));
12 M=M/max(M(:));
13
14 H=0.0+zeros(size(V));
15 S=M;
16 RGB=hsv2rgb(H,S,V);
17
18 %if nargin>2
19    image(RGB)
20    axis('image')
21 %end