MATLAB: How to save a image from imshow into a cell array

Deep Learning ToolboximageImage Processing Toolbox

Hi ,I used (dd = [128 48] 😉 doubles array to do mat2gray() , then doing the imshow to save image in a cell array (like dat{i,1}=imshow(mat2gray(dd));)
But when the image update , those data can't save at the cell array.
i wanna save these data in cell arrat that me can simply take data to training my CNN .and i have no idea.
Have anyone can save me ,plz

Best Answer

I don't think you need the imshow(). imshow() is only used to show the image, and it returns an image object, which is not normally used in CNN training..
dat{i,1} = mat2gray(dd);
should store the grayscale image dd to dat cell array. If you want to show it later, just use imshow(dat{i,1}).
Related Question