Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Function mean on images input reduces the size of the output: input images = 2000 Ko, output image=35 Ko
조회 수: 3 (최근 30일)
이전 댓글 표시
Here is my script in which I need to average a given number of images. The issue being that the function mean reduces the quality (size memory) of the final averaged image.
Script:
if true
a='tile_';%name of your image without the number
b='.tif';%image format
n=64;%number of image
z='0';
for i=1:n;
d=num2str(i);
if i<10 m=strcat(z,d);
else m=d;
end
s = strcat(a,m,b);
F(:,:,i)=imread(s);
end
span=2;%number of images per subcluster
clus=floor(n/span);% number of subcluster
for j=1:clus;
Av(:,:,j)=mean(F(:,:,(j*span-(span-1)):(j*span)),3);
end
for j=1:clus;
imwrite(Av(:,:,j),num2str(j),'tif');
end% code
end
The image saved is about 46kB when the input images were about 2000KB (the averaged on should be around 2000KB as well).
Help please !
댓글 수: 0
답변 (0개)
이 질문은 마감되었습니다.
참고 항목
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!