file=dir('C:\Users\SS\Desktop\bac\*.jpg');
for k=1:length(file)
	c=num2str(k);
	RGB=imread(file(k).name);
	disp(c);
	I=RGB(:,:,2);
	I3=imadjust(I);
	level=graythresh(I3);
	BW=im2bw(I3,1-level);
	image_sel_inv=(uint8(~BW).*I);
	dark(k)= mean(double(image_sel_inv(~BW)));
	image_sel=(uint8(BW).*I);
	bright(k)=mean(double(image_sel(BW)));
	fluorescence(k)=bright(k)/dark(k);
end
clear BW;
clear c;
clear file;
clear I;
clear I3;
clear image_sel_inv;
clear image_sel;
clear RGB;
clear level;

