【问题标题】:Load satellite image in Matlab在 Matlab 中加载卫星图像
【发布时间】:2012-11-05 03:01:13
【问题描述】:

我有一个关于如何在 Matlab 上加载 Landsat 图像的问题。我的图片格式为 .img,包含以下信息:

Columns and rows= 9487 x 8543
Number of bands= 6
Cellsize= 25 x 25
Source Type= continuous
Píxel type= unsigned integer
Pixel Depth= 16 bit
Scale factor= 0,9996

这是我的代码:

IM= multibandread('2000.img',[9487, 8543, 6],'int16',0,'ieee-le',{'Row','Range',[9487 8543]);

但是有如下错误:

错误:不平衡或意外的括号或括号。

我尝试过更改,但它不起作用。我能做什么?

提前致谢,

艾玛

【问题讨论】:

  • 您似乎缺少}
  • 感谢丹尼斯的回复,但还是不行!
  • 不确定这是否是个问题,但我看到您使用的是 int16 而不是无符号变体 uint16。如果这不能解决问题,也许您可​​以上传图片?

标签: image matlab


【解决方案1】:

Dennis 是对的,您缺少一个右花括号。它应该像这样插入在括号和括号之间:

IM= multibandread('2000.img',[9487, 8543, 6],'int16',0,'ieee-le',{'Row','Range',[9487 8543]} );

【讨论】:

  • 谢谢!我已经添加了它,但它不起作用。我收到以下错误。???使用 ==> fopen 时出错 机器格式无效。 ==> multibandread>parseInputs 中的错误 317 fid = fopen(filename,'r',byteOrder); ==> multibandread 中的错误 112 info = parseInputs(filename, dims,...
【解决方案2】:

我认为您可能希望完全保留子集参数,除了使用 unsigned uint16 之外,请尝试以下操作:

multibandread('2000.img',[9487, 8543, 6],'uint16',0,'ieee-le')

请注意,在您当前的通话中,您似乎正在尝试将第 9487 行提取到第 8543 行。

【讨论】:

    猜你喜欢
    • 2013-02-09
    • 2014-02-25
    • 1970-01-01
    • 2020-03-13
    • 1970-01-01
    • 2017-10-17
    • 2012-05-21
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多