How to read images from folders in matlab

前端 未结 3 611
迷失自我
迷失自我 2021-01-27 04:19

I have six folders like this >> Images and each folder contains some images. I know how to read images in matlab BUT my question is how I can traverse through these folders and

3条回答
  •  深忆病人
    2021-01-27 05:02

    So basically you want to read images in different folders without putting all of the images into one folder and using imread()? Because you could just copy all of the images (and name them in a way that lets you know which folder they came from) into a your MATLAB working directory and then load them that way.

    Use the cd command to change directories (like in *nix) and then load/read the images as you traverse through each folder. You might need absolute path names.

提交回复
热议问题