如何在MATLAB中检索图像的类型,大小和尺寸?MATLAB中图像的类型,大小和尺寸
3
A
回答
11
IMFINFO应该向您显示您正在查找的信息。
这里的例子来自MATLAB帮助:
info = imfinfo('ngc6543a.jpg')
info =
Filename: [1x95 char]
FileModDate: '01-Oct-1996 17:19:44'
FileSize: 27387
Format: 'jpg'
FormatVersion: ''
Width: 600
Height: 650
BitDepth: 24
ColorType: 'truecolor'
FormatSignature: ''
NumberOfSamples: 3
CodingMethod: 'Huffman'
CodingProcess: 'Sequential'
Comment: {[1x69 char]}
1
你可以使用imfinfo关于图像文件的信息,这与各个领域,包括宽度,高度和输出的ColorType的结构。
例如:
InfoImage = imfinfo('peppers.png');
InfoImage =
Filename: '/Applications/MATLAB_R2014a.app/toolbox/matlab/imagesc...'
FileModDate: '02-Apr-2013 15:55:52'
FileSize: 287677
Format: 'png'
FormatVersion: []
Width: 512
Height: 384
BitDepth: 24
ColorType: 'truecolor'
FormatSignature: [137 80 78 71 13 10 26 10]
Colormap: []
Histogram: []
InterlaceType: 'none'
Transparency: 'none'
SimpleTransparencyData: []
BackgroundColor: []
RenderingIntent: []
Chromaticities: []
Gamma: []
XResolution: []
YResolution: []
ResolutionUnit: []
XOffset: []
YOffset: []
OffsetUnit: []
SignificantBits: []
ImageModTime: '16 Jul 2002 16:46:41 +0000'
Title: []
Author: []
Description: 'Zesty peppers'
Copyright: 'Copyright The MathWorks, Inc.'
CreationTime: []
Software: []
Disclaimer: []
Warning: []
Source: []
Comment: []
OtherText: []
然后你就可以得到你想要的信息与普通结构分配:你是好去
With = InfoImage.Width;
Height = InfoImage.Height;
Colortype = InfoImage.ColorType;
之后。更多HERE
set(handles.WidthTextbox,'String',num2str(InfoImage.Width));
and so on for the other fields.
检查:您可以通过他们的“字符串”属性设置为你想要的显示在文本框此信息。
相关问题
- 1. Android缩小大图像尺寸
- 2. Matlab的:比较2幅图像具有不同的尺寸和像素尺寸
- 3. 缩小图像尺寸C#
- 4. 缩小图像尺寸imagemagic
- 5. Android - 缩小图像尺寸不会减小尺寸的比例
- 6. Jcrop有大尺寸图像
- 7. iPhone 6S和6S +字体大小和图像尺寸
- 8. 调整UITableViewCell的大小以显示最大尺寸的图像
- 9. 已知尺寸的JPEG图像的最大文件大小
- 10. 图像大小和一个div尺寸不匹配
- 11. Dropzone检查图像尺寸和文件大小
- 12. 使用CSS调整图像大小和裁剪尺寸
- 13. 为较小尺寸的屏幕调整图像大小
- 14. 更改图的尺寸MATLAB
- 15. WordPress的图像中等大小显示不同尺寸
- 16. 如何在图像中缩放各种尺寸的Sprites大小?
- 17. 规模下降非常大尺寸图像无失真和质量损失非常小尺寸图像
- 18. 图像尺寸,
- 19. 尺寸图像的尺寸1600 * 1200
- 20. 使用压缩缩小图像大小不改变尺寸
- 21. 将图像大小解压缩至最大尺寸
- 22. 为什么图像的尺寸更大?
- 23. 大图像尺寸的问题
- 24. 获取图像的最大尺寸
- 25. 背景图像的最大尺寸CSS
- 26. Matlab log2图形尺寸
- 27. 当屏幕尺寸减小时自动调整图像尺寸
- 28. Matlab rgb2hsv尺寸
- 29. 图像的Matlab大小
- 30. 尺寸图像以适合WebView尺寸
到目前为止你做了什么? – Donnie 2010-05-29 19:36:50
我有图像,我想要检索其属性。 – Achraf 2010-05-29 19:40:15