make mask image PP = vb_gray_2_mask(Pimage,level) Copyright (C) 2011, ATR All Rights Reserved. License : New BSD License(see VBMEG_LICENSE.txt)
0001 function PP = vb_gray_2_mask(Pimage,level) 0002 % make mask image 0003 % PP = vb_gray_2_mask(Pimage,level) 0004 % 0005 % Copyright (C) 2011, ATR All Rights Reserved. 0006 % License : New BSD License(see VBMEG_LICENSE.txt) 0007 Dim = size(Pimage); 0008 PP = zeros(Dim); 0009 0010 ix = find( Pimage >= level ); 0011 PP(ix) = 1;