clear all;
mFID = fopen(‘C:\Users\WDJR\Desktop\r.txt’, ‘r’);
y=textscan(mFID, '%d ')
y=cell2mat(y);
m=reshape(y,19204,1080);
% m=m’;
figure(1);
colormap(gray(256));
image(m);
ii=0;jj=0;
for i=1:4:1920
4
ii=ii+1;
for j=1:1:1080
jj=jj+1;
z(jj,ii)= m(i,j);
end
jj=0;
end
figure(2);
colormap(gray(256));
image(z);

结果:读取r分量并且显示
读取rgba格式的图片,并且显示R分量成灰度图

相关文章:

  • 2021-12-19
  • 2021-08-29
  • 2022-03-02
  • 2022-12-23
  • 2021-12-02
  • 2021-07-31
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2022-01-02
  • 2021-07-27
  • 2022-12-23
  • 2021-12-05
  • 2021-11-15
相关资源
相似解决方案