function S=objectstat(nobg,fore)

labeled = bwlabel(nobg,8);
stats = regionprops(labeled,'Area','Perimeter','BoundingBox','Centroid');
[N,W] = size(stats);
S=zeros(N, 11);

 for i=1:N
 S(i,1)=i;
 a = stats(i).Area;
 p = stats(i).Perimeter;
 c = (a/p);
 S(i,2)=c;
 S(i,10)=a;
 S(i,11)=p;
 
 bb=stats(i).BoundingBox;
 S(i,3)=bb(1);
 S(i,4)=bb(2);
 subImage = imcrop(fore, bb);
 
 m=round(mediacolor(subImage));
 S(i,5)=m(1);
 S(i,6)=m(2);
 S(i,7)=m(3);
 
 cc=stats(i).Centroid;
 S(i,8)=cc(1);
 S(i,9)=cc(2);
 
 end  
