CODE:
function Find_CirclesCenter
%%Find Center of circles from picture
%%PSL@CSU
%%QQ:547423688
%%Email:anyuezhiji@qq.com
%%Edit @ 2010.4.14
path='D:\Program Files\MATLAB71\work\CurrentWork\test\';
outfile='CResult.txt';
clear CResult;
n=0;
maxcm=0;
flag=1;
for i=1:720
fname=['8-',num2str(i)];
filename=[fname,'.spe'];
if exist([path,filename],'file')
disp(['正在处理',filename]);
n=n+1;
[img,dtype]=ReadSpe([path,filename]);
%figure;imshow(img);
minp=min(min(img));
mask=img<3*minp;
mask = bwmorph(mask,'clean');
mask = bwmorph(mask,'majority',inf);
%figure;imshow(mask);
CResult(n).fname=