I want to read all these images into my workspace. Path of all the images are in this csv file. i imported it into a table. how to read these images now. please do help.

1 次查看(过去 30 天)
  2 个评论
Jan
Jan 2018-6-12
As soon as you post the existing code, it is a little but easier to post a solution. This will be clearer than "i imported it into a table".
Karthik K
Karthik K 2018-6-12
with only 2 lines i have imported these into matlab sir. uiopen('D:\MATLAB\MURA\train_image_path.csv',1); or d=importdata('D:\MATLAB\MURA\train_image_path.csv'); Next i needed to read images 1by1. below answer helped me. Thank u sir.

请先登录,再进行评论。

采纳的回答

KSSV
KSSV 2018-6-12
YOu need not to import images into a file.....you could simply do:
images = dir('*.png') ;
N = length(images) ;
for i = 1:N
thisimage = images(i).name ;
I = imread(thisimage) ;
imshow(I) ;
end
If you want to pick it from csv:
[num,txt,raw] = xlsread('FileName.csv') ;
N = size(txt,1) ;
for i = 1:N
I = imread(txt{i}) ;
imshow(I) ;
end

更多回答(1 个)

Jan
Jan 2018-6-12
编辑:Jan 2018-6-12

类别

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