how to store the image immediately after reading it in a for loop?

后端 未结 3 825
故里飘歌
故里飘歌 2021-01-25 02:07

I tried the following program for reading multiple images(about 300 images). Now I want to store these images immediately after reading each to some location by some name as

3条回答
  •  独厮守ぢ
    2021-01-25 02:56

    You can simply save all them into one big matrix:

    for i=1:5  
        images_all(:, :, :, i)  = imread(['C:\Users\shree\Desktop\1\im' num2str(i) '.jpg'])
    end
    

    After this, all images will be stored in images_all (here assume that all images are colored images, i.e. 3 channels).

提交回复
热议问题