Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Import Images to MATLAB with same sorting in File

Status
Not open for further replies.

panda1234

Full Member level 2
Joined
Jan 22, 2015
Messages
125
Helped
4
Reputation
8
Reaction score
4
Trophy points
18
Activity points
1,172
Hi,
I have 100 pictures and i want to imports these in MATLAB for this we can write below code:
Dir = 'Pictures\';

% Read images from Images folder

Imgs = dir(fullfile(Dir, '*.bmp'));
for j=1:length(Imgs)

pic{j} = imread(fullfile(Dir, Imgs(j).name)); % Read image

end
but with this Method my sorting was vanished for example in folder i have picture that it's name is Pic10 and it's number in MATLAB is 2.but i want to numbers in MATLAB as same as in folder.
What do i do?
Thanks
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top