MATLAB: How can read multiple images from different subfolders

digital image processingimageImage Acquisition Toolboximage processingImage Processing Toolboximage segmentationmatrix manipulation

I have folder name data and under this folder 30 folders (named A1 to A30) and each one have many colored images RGB (each image sized to 150*150 pixels) around 8000 images. I would like to read those images and save them to one matrix which has size 150*150*3*8000 (4d matrix). I tried many code but could not come up with an efficient code. So, could someone please suggest me an idea or code at least how to read those images from different folders and save them.

Best Answer

See attached code.
Related Question