Home > polypedal > ProjectiveReconstruction > getInteractiveMask.m

getInteractiveMask

PURPOSE ^

SYNOPSIS ^

function msk = getInteractiveMask( grayimg, markers )

DESCRIPTION ^

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function msk = getInteractiveMask( grayimg, markers )
0002     fh = figure;
0003     grayimg = grayimg - min(min(grayimg));
0004     grayimg = grayimg / max(max(grayimg));
0005     msk = false(size(grayimg));
0006     rgb = cat(3,grayimg/2,grayimg/3,grayimg);
0007 %    try;
0008       while 1
0009         tmp =rgb;
0010         tmp(:,:,1)=max(max(tmp(:,:,1)))*msk;    
0011         imagesc(tmp);
0012         hold on;
0013         plot(markers,'*y');
0014         nb = roipoly;
0015         if ~any(nb)
0016             break;
0017         end
0018         msk = msk | nb;
0019       end
0020       %  catch;
0021       %fprintf('MatLab 7.5 is shit!\n');
0022       %end
0023     close(fh);
0024 return

Generated on Mon 02-Aug-2010 16:44:38 by m2html © 2003