how to access images from sub folders?
Show older comments
hi. i have a folder F1 and then in this folder i have S1 and S2 afterwards in each S1 and S2 i have E1 and E2 finally in these folders i have images named as frame_0000.jpeg till frame_2000.jpeg. for better understanding i am attaching a pic of my hierarchy.

after accessing each image i have to convert them from rgb2gray, apply my required preprocessing and then make excel file of each images in 'E' folders. Please help me accessing these images. waiting for your kind response.
Accepted Answer
More Answers (1)
KSSV
on 14 Sep 2018
0 votes
A simple google will give you lot of links to this question. This question is discussed and asked lot many times.
4 Comments
sidra Rafique
on 28 Sep 2018
Edited: sidra Rafique
on 28 Sep 2018
"but i want to access these images using switch-case statements."
Why? This seems a very complex approach. A simple dir call, like KSSV's link shows, would do the job perfectly (unless there are some other requirements that you did not mention in your question).
sidra Rafique
on 29 Sep 2018
Image Analyst
on 30 Sep 2018
Looks like this doesn't apply anymore since you accepted the other answer.
Categories
Find more on Convert Image Type in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!