HOW TO CREATE A CELL ARRAYS CONTAINING THE IMAGE AND THE CORRESPONDING NAME OF THE IMAGE

1 回表示 (過去 30 日間)
federica pasquali
federica pasquali 2018 年 3 月 3 日
編集済み: Sujit Muduli 2018 年 3 月 9 日
hi! I've a problem , i want to create a cell arrays containing the image and the corresponding name of the image and once all the images have been saved , show it . But I don't know how to do this.

回答 (1 件)

Sujit Muduli
Sujit Muduli 2018 年 3 月 9 日
編集済み: Sujit Muduli 2018 年 3 月 9 日
Hi Federica,
I would suggest using map container(containers.Map class) instead of using a cell array here. Create a map data structure use the name(string) as a key and in the value feild you can keep the image data.
mapObj = containers.Map; % create a map object
% storing a file under a file name
mapObj('filename') = imread('filename.PNG');
%displaying the image
imshow(mapObj('filename'));
Here are few documentation links to help you out with this,
  • https://in.mathworks.com/help/matlab/ref/containers.map-class.html
  • https://in.mathworks.com/help/matlab/ref/imread.html
  • https://in.mathworks.com/help/matlab/ref/imshow.html
Thanks,
Sujit

カテゴリ

Help Center および File ExchangeImages についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by