function f_size=corper(A,perc);
tic
[r,c]=size(A)
gem=sum(sum(A)')/(r*c);
cr(r/2)=0;
jo=1;
while( jo < r/2 )
	for io=1:c;
	cr(jo)=cr(jo)+sum((A(1:r-jo+1,io)-gem).*(A(jo:r,io)-gem));
	end;
	if  cr(jo) <  cr(1)*perc ,break, end;
	jo=jo+2;
end;
f_size=jo;
toc
end;
