필터 지우기
필터 지우기

Convert images into .Mat files

조회 수: 21 (최근 30일)
pizzaa
pizzaa 2023년 5월 19일
답변: Piyush Dubey 2023년 5월 30일
Hi guys i have 6 of this images. I want to try to make it into .mat files. Just like this
In the picture above, u can see that there is 3 images that has 65536 in size. Now i want to turn my 6 images into .mat files just like this picture above.
What kind of code do i use?? thanks
  댓글 수: 2
Dyuman Joshi
Dyuman Joshi 2023년 5월 19일
편집: Dyuman Joshi 2023년 5월 19일
"In the picture above, u can see that there is 3 images that has 65536 in size."
Are you sure about that?
Ideally you can use a loop to achieve this, As you have named the images serially, but make sure that all the images are in the current directory.
for k=0:5
str = sprintf('chrome.%d.png', k)
I = imread(str);
out = sprintf('chrome%d.mat');
save(out, I)
end
KSSV
KSSV 2023년 5월 19일
Why and how your images are row dominant?

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

채택된 답변

Piyush Dubey
Piyush Dubey 2023년 5월 30일
Hi Putra,
Images need not be converted to .mat extension. Images can be read using imread() function and then saved with .mat extension. More clarity can be obtained on a similar MATLAB Answer’s thread attached below:
Hope this helps.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by