How to convert images as array to images and save them in folder

조회 수: 2 (최근 30일)
Laith Alzubaidi
Laith Alzubaidi 2021년 7월 21일
댓글: KSSV 2021년 7월 21일
Dear All,
I have worked on project and I got my results which are as one array or matrics when I plot them I can see them as shown in figure,
How can I built them as sparated images and save them in a folder
Could you please help with that,
Thank you

답변 (2개)

KSSV
KSSV 2021년 7월 21일
  댓글 수: 2
Laith Alzubaidi
Laith Alzubaidi 2021년 7월 21일
Thank you for your answer
I have used 'imwitte' but it saved one image of all images as shown in figure.
I'm looking for saving each image in figure as a spaerated image and same for other. The folder of images should have 25 images that showed in figure. BTW, all 25 images save as one matrics.
KSSV
KSSV 2021년 7월 21일
I gave you a link to refer on how to split your images into sub images.

댓글을 달려면 로그인하십시오.


Jonas
Jonas 2021년 7월 21일
편집: Jonas 2021년 7월 21일
for a matrix A with ynum images in y direction and xnum images in x direction with size height x width you can use
C = mat2cell(A,repelem(height,ynum),repelem(width,xnum));
this divides A into a bunch of cell arrays. you can then use cellfun or a ordinary double for loop with your own custom function to save each cell entry
alternatively you can use the function blockproc, to which you can give the block size (subimage size) and a custom function to save the subimages

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by