utilities(matlab)—— mat2imgcell

来源:互联网 发布:java培训机构哪里好 编辑:程序博客网 时间:2024/06/14 04:42

mat2imgcell

function Img = mat2imgcell(D, h, w, fmt)N = size(D, 2);Img = cell(N, 1);for i = 1:N,    Img{i} = reshape(D(:, i), h, w, (fmt=='gray')*1+(fmt=='color')*3)end
0 0