我有一个图像IMG,我只想得到它的最后(20)列。 我的图像大小为500x500,我希望colums从480到500,行数保持不变。得到图像的最后20列:Matlab
0
A
回答
1
3
你可以把一些基本的数学和您的索引的end
关键字。所以,你将有
smallerImage = rawImage(:, (end-20+1):end);
作为colormapped(NxMx1)例如
load mandrill; %A colormapped (2d) Matlab demo image in the X variable
figure;
subplot(121)
image(X)
colormap(map)
title('Full picture')
subplot(122)
smallX = X(: , (end-20+1):end); %This is the subsetting operation for a 2D image
image(smallX)
colormap(map)
title('Rightmost 20 columns')
的RGB例子(NxMx3)
imdata = imread('ngc6543a.jpg');
figure;
subplot(121)
image(imdata)
colormap(map)
title('Full picture')
subplot(122)
smallImData = imdata (: , (end-20+1):end , :); %This is the subsetting operation for an RGB image, note 3rd dimension colon
image(smallImData)
colormap(map)
title('Rightmost 20 columns')
0
如果你想利用最后n
列,请使用:
A(:,end-n+1:end)
对于第一个n
列使用:
A(:,1:n)
相关问题
- 1. 获得位置+ 20像素?
- 2. 得到图像的某些部分,并把它放回到matlab主图像
- 3. 调用后得到的图像解析
- 4. 没有得到一个WordPress的后略图图像的URL后
- 5. 如何在zabbixAPI中获得zabbix的最后20个问题?
- 6. 得到最后的对话
- 7. 如何获得MATLAB中矩阵的第一列和最后一列?
- 8. 得到一个像谱图在MATLAB中的阴谋
- 9. 为什么当我得到傅立叶利用Matlab在Matlab变换图像的
- 10. UIBarButtonItem图像拉伸,即使使用的图像是建议的20 x 20点
- 11. 如何在MATLAB的图像中找到局部最大值?
- 12. 在SQL Server 2005图像列中存储20 Meg文件的最有效方法
- 13. 保存阵列图像,imwrite matlab的
- 14. 图像得到overlaped
- 15. 得到URL图像
- 16. paramiko挂上后得到20 MB的文件自己加载
- 17. 试图获得排名前20的mySQL
- 18. 删除图像后的尾部(空格)%20
- 19. 将图像关闭20像素(y轴)
- 20. MATLAB:图像
- 21. 找到实验图像上的圆(Matlab)
- 22. SWT - 得到的图像
- 23. 得到位图像素的自定义视图后旋转
- 24. Cron作业:保留最后20行
- 25. 得到3d图的最小/最大值
- 26. 创建图像阵列和MATLAB
- 27. 在Matlab中创建图像列表
- 28. 从MATLAB中保存图像的图像
- 29. 从MatLab拟合对象图得到点
- 30. 如何获得MATLAB中结构的最后一个字段?
Downvote因为:你有什么尝试,没有研究工作。 – neuronet 2015-03-13 19:22:25