clc
clear all
n=1;
A = imread('seq2772.tif'); %ENTER NAME OF FIGURE
BW = im2bw(A,0.05); %SET THE THRESHOLD VALUE
stats = regionprops('table',BW,'Centroid','MajorAxisLength','MinorAxisLength');
min=sum(stats.MajorAxisLength<2);
B(n)=(sum(stats.MajorAxisLength<20)-min);
n=n+1;
C=std(B);
B=mean(B);
figure,subplot(1,2,1); imshow(A);
subplot(1,2,2);imshow(255*BW);