xwhjerry 发表于 2014-8-23 11:13

小白之怒!!!碎纸片问题,图片矩阵matlab表达求解

比如有19张图,现在读出了19个72*1980的矩阵块
编号为Si  (i为0到18)
然后怎样用matlab表达出si(:,1)
即每个19个矩阵块的第一列
求大神解答啊,不会用matlab写出来

lazypatrick 发表于 2014-8-23 12:20

不懂帮顶。。

madio 发表于 2014-8-23 13:28

你是问如何在matlab中将图片读入吗?

madio 发表于 2014-8-23 16:54

例,在电脑F\picture下有一彩色图像文件nice.bmp,则可由下述语句读取: 下面是对图像 nice.bmp以y轴为对称轴所做的一个对称变换。
% Transfer1.m clear all figure
=imread('F:\picture\nice.bmp');% 所得x为一375x420x3的矩阵
=size(x); % 375 X 420
w22=floor(w2/2);
image(x); %显示出图像
title('HELLO! @This is the first pose of me')%则显示出图像nice.bmp
axis off;                       % 去掉图像中的坐标  
colormap(map);       % colormap(),图像查找表函数。函数结构为colormap(map),设置当前的图像查找表到map。
imwrite(x,map,'nice.bmp')
for i=1:w1         
     for j=1:w22           % 图像关于y轴对折
           t=x(i,j);  
          x(i,j)=x(i,w2-j+1);
          x(i,w2-j+1)=t;
     end
end
figure image(x);   
axis off
  title('HELLO!!@@ Can you find any difference of my two picture! ')
colormap(map);
imwrite(x,map,'newpic.bmp') %把x写到nepic2.bmpz中去  
% Transfer1.m文件中包含了最基本也是最常用的对读像处理的命令。  在对图像处理的整个过程中,实质上是对=imread(‘figure')函数中所得x矩阵的各种变换!
页: [1]
查看完整版本: 小白之怒!!!碎纸片问题,图片矩阵matlab表达求解