2017-07-21 44 views
1

高光譜圖像用Matlab我可以看到我的圖像的第四信道,但不與八度:載入在八度

對圖像(I)的下列Matlab代碼給出

I = imread(」 ../rec3/2012R_1_1.tif')[nr nc nb] = size(I);
NB

它給出:

NB = 4

其中nb是信道號和I是一個64位圖像(3057x1210)

但對於Octave給出的相同圖像:

NB = 3

我應該爲了加載任何特殊的包能夠與高光譜圖像的工作?

EDIT

的imfinfo的用於倍頻的輸出:

ANS =

標量結構包含字段:

Filename = c:/2012R_1_1.tif 
FileModDate = 10-May-2016 20:02:10 
FileSize = 23140500 
Format = TIFF 
FormatVersion = 
Width = 3057 
Height = 1210 
BitDepth = 16 
ColorType = truecolor 
DelayTime = 0 
DisposalMethod = 
LoopCount = 0 
ByteOrder = undefined 
Gamma = 0 
Chromaticities = [](1x0) 
Comment = 
Quality = 75 
Compression = undefined 
Colormap = [](0x0) 
Orientation = 1 
ResolutionUnit = Inch 
XResolution = 0 
YResolution = 0 
Software = 
Make = 
Model = 
DateTime = 
ImageDescription = 
Artist = 
Copyright = 

和Matlab的

Filename: 'c:\2012R_...' 
       FileModDate: '10-máj.-2016 18:02:10' 
       FileSize: 23140500 
        Format: 'tif' 
      FormatVersion: [] 
        Width: 3057 
        Height: 1210 
       BitDepth: 64 
       ColorType: 'truecolor' 
      FormatSignature: [73 73 42 0] 
       ByteOrder: 'little-endian' 
      NewSubFileType: 0 
      BitsPerSample: [16 16 16 16] 
       Compression: 'LZW' 
PhotometricInterpretation: 'RGB' 
      StripOffsets: [1x38 double] 
      SamplesPerPixel: 4 
      RowsPerStrip: 32 
      StripByteCounts: [1x38 double] 
       XResolution: [] 
       YResolution: [] 
      ResolutionUnit: 'Inch' 
       Colormap: [] 
     PlanarConfiguration: 'Chunky' 
       TileWidth: [] 
       TileLength: [] 
       TileOffsets: [] 
      TileByteCounts: [] 
       Orientation: 1 
       FillOrder: 1 
     GrayResponseUnit: 0.0100 
      MaxSampleValue: [65535 65535 65535 65535] 
      MinSampleValue: [0 0 0 0] 
      Thresholding: 1 
        Offset: 23139726 
       Predictor: 'Horizontal differencing' 
      ExtraSamples: 0 
      SampleFormat: {'Unsigned integer' 'Unsigned integer' 'Unsigned integer' 'Unsigned integer'} 
     ModelPixelScaleTag: [1 1 1] 
     ModelTiepointTag: [0 0 0 6.7143e+05 5.1757e+06 0] 
     GeoKeyDirectoryTag: [1x52 double] 
     GeoDoubleParamsTag: [] 
     GeoAsciiParamsTag: '' 
+0

能否請您提供一個例子形象? – Ash

+0

也顯示代碼。 –

+0

嗨,我只是使用:I = imread('../ rec3/2012R_1_1.tif');那麼上面顯示的行 – Kristan

回答

2

可以使用的功能rasterreadgdalreadmapping包讀取高光譜圖像。

pkg load mapping 
ras = rasterread("myfile.tif"); 
I = ras.data; 

[~,~,I]= gdalread("myfile.tif");