img = imread(‘mdb025.jpg’);
[rows,cols]=size(img);
r=zeros(rows,cols);
g=zeros(rows,cols);
b=zeros(rows,cols);
r=double(img);
g=double(img);
b=double(img);
rgb=cat(3,r,g,b);
imwrite(uint8(rgb),’mdb025-rgb.jpg’);
[rows,cols]=size(img);
r=zeros(rows,cols);
g=zeros(rows,cols);
b=zeros(rows,cols);
r=double(img);
g=double(img);
b=double(img);
rgb=cat(3,r,g,b);
imwrite(uint8(rgb),’mdb025-rgb.jpg’);
版权声明:本文为u012260117原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。