% 1999-02-09:David Cary simplified. % 1999-01-??:SA:started by Scott Acton % See also AREAOPENCLOSE. clear; [file, path]=uigetfile('*.RAW', 'RAW File Input'); height=input('Image Height: '); width=input('Image Width: '); fid=sprintf('%s%s', path, file); x=loadraw(fid,width,height); orig=x; % E=zeros(size(x)); % DAV: huh ? minarea=input('Minimum Area: '); outfile=input('Output file name: ','s'); trueoutfile=sprintf('%s%s', path, outfile); opened = areaopenclose(x, minarea); figure colormap(gray(256)) image(opened); title('Area Open Close'); figure colormap(gray(256)) image(orig); title('Input image'); X=writeraw(trueoutfile,opened);