How to compress the image ?
조회 수: 17 (최근 30일)
이전 댓글 표시
for example, I have a 3D image in grayscale, 512X512X300.
I just want to compress it in X and Y plane.
I want 4 pixels to combine into one pixel.
And the value of the combined pixel takes average on that 4 pixels or take its max.
Can I directly do on 3D image? If not, please tell me how to do it on 2D image.
Thanks.
댓글 수: 0
답변 (2개)
Image Analyst
2014년 8월 29일
Just save it as a .mat file. This is a proprietary binary format that will probably be fairly compressed, and anyway, it will make it convenient to read back in to MATLAB.
댓글 수: 6
Yawar Rehman
2014년 9월 3일
image analyst is rigth, i think you have a stack 300 gray scale images whose dimensions are 512x512.
compression usually involves techniques like principal components analysis. but from your question it is more evident that you want to downsample an image by the factor of 1/4 rather than compress. i think this would be useful!
% images you have
imgs = zeros(512,512,300);
% downsample by 1/4
downImages = imresize(imgs,1/4);
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!