pro maskedge,cam loadct,13 file='c:\idl\data\mask'+strtrim(cam,2)+'.dat' b=bytarr(256,256) openr,lun,file,/get_lun readu,lun,b free_lun,lun tvscl,b ix=defroi(256,256) b(ix)=0 wdelete,0 wb=where(b) one2two,wb,b,xb,yb triangulate,xb,yb,tr,eb ebc=[eb,eb(0)] neb=n_elements(eb) print,neb window,0 plots,xb(ebc),yb(ebc),/dev skel=tvrd(0,0,256,256) wsk=where(skel) nsk=n_elements(wsk) print,nsk openw,lun,'c:\idl\data\mask'+strtrim(cam,2)+'.edg',/get_lun printf,lun,nsk printf,lun,wsk free_lun,lun return end