%m016
%promediacion de secuencia de imagenes

for i=0:7
	A=double(imread(['calle' int2str(i) '.bmp']));
   A=(A(:,:,1)+A(:,:,2)+A(:,:,3))/3;
   subplot(4,2,i+1);imshow(A,[]);
end;
disp('presione una tecla..');pause

P=0*A;
for i=0:7
	A=double(imread(['calle' int2str(i) '.bmp']));
   A=(A(:,:,1)+A(:,:,2)+A(:,:,3))/3;
   P=P+A;
   subplot(1,1,1);imshow(P,[]);
   pause(1);
end;

P=P/8;

subplot(1,1,1);imshow(P,[]);
