1

Steve Eddin がhttp://blogs.mathworks.com/steve/2011/03/08/tips-for-reading-a-camera-raw-file-into-matlab/に投稿したように、次のコードをたどってコピーしました。 MATLAB 2014b で実行されています。その結果、「BitsPerSample が 10 のイメージの読み取りはサポートされていません」というエラーが表示されました。info と info.SubIFDs{1} を確認したところ、INFOS で次の結果が得られました。Google で問題を検索しましたが、十分な情報がありません。したがって、私はこの問題をここに投稿し、誰かが私に解決策を教えてくれることを願っています.

コード::

warning off MATLAB:tifflib:TIFFReadDirectory:libraryWarning
t = Tiff('Non-Invasive DNGs/WP_20150311_15_03_14_Raw__highres.dng','r');
offsets = getTag(t,'SubIFD');
setSubDirectory(t,offsets(1));
cfa = read(t);
close(t);

エラー::

Error using Tiff.constructBlankOutputImage (line 2448)
Reading images with a BitsPerSample of 10 is not supported.

Error in Tiff/readAllStrips (line 2046)
            imageData = obj.constructBlankOutputImage(imageSize,bps,sampleFormat);

Error in Tiff/read (line 1507)
                [varargout{:}] = obj.readAllStrips();

Error in readDNG (line 11)
cfa = read(t);

INFOS_1::

                     FileSize: 43676288
                       Format: 'tif'
                FormatVersion: []
                        Width: 960
                       Height: 544
                     BitDepth: 24
                    ColorType: 'truecolor'
              FormatSignature: [73 73 42 0]
                    ByteOrder: 'little-endian'
               NewSubFileType: 1
                BitsPerSample: [8 8 8]
                  Compression: 'Uncompressed'
    PhotometricInterpretation: 'RGB'
                 StripOffsets: 69248
              SamplesPerPixel: 3
                 RowsPerStrip: 544
              StripByteCounts: 1566720
                  XResolution: []
                  YResolution: []
               ResolutionUnit: 'Inch'
                     Colormap: []
          PlanarConfiguration: 'Chunky'
                    TileWidth: []
                   TileLength: []
                  TileOffsets: []
               TileByteCounts: []
                  Orientation: 1
                    FillOrder: 1
             GrayResponseUnit: 0.0100
               MaxSampleValue: [255 255 255]
               MinSampleValue: [0 0 0]
                 Thresholding: 1
                       Offset: 8
                         Make: 'Nokia'
                        Model: 'Lumia 1020'
                     Software: 'Nokia RAW-to-DNG converter v01.00.06'
                     DateTime: '2015:03:11 15:03:11'
                      SubIFDs: {[1x1 struct]}
                DigitalCamera: [1x1 struct]
                   DNGVersion: [1 3 0 0]
           DNGBackwardVersion: [1 3 0 0]
            UniqueCameraModel: 'Nokia Lumia 1020'
                 ColorMatrix1: [1.6183 -0.7414 0.1000 -0.2665 1.1286 0.3664 0.1114 0.0951 0.8522]
                 ColorMatrix2: [0.9390 -0.1511 -0.0964 -0.3983 1.2153 0.1384 -0.0880 0.4120 0.5662]
           CameraCalibration1: [1.0361 0 0 0 1 0 0 0 0.9688]
           CameraCalibration2: [0.9851 0 0 0 0.9926 0 0 0 0.9763]
                AnalogBalance: [1 1 1]
                AsShotNeutral: [0.8476 1 0.6481]
             BaselineExposure: -1
                BaselineNoise: 1
            BaselineSharpness: 1
           LinearResponseUnit: 0.9999
                  ShadowScale: 1
               DNGPrivateData: [1x1246 double]
              MakerNoteSafety: 1
       CalibrationIlluminant1: 17
       CalibrationIlluminant2: 21
           AliasLayerMetadata: [58 48 51 58 49 49 32 49 53 58 48 51 58 49 49 0]
                  UnknownTags: [7x1 struct]

INFOS_2::サブ IFD{1}

                 FileSize: 43676288
                   Format: 'tif'
            FormatVersion: []
                    Width: 7728
                   Height: 4352
                 BitDepth: 10
                ColorType: 'CFA'
          FormatSignature: [73 73 42 0]
                ByteOrder: 'little-endian'
           NewSubFileType: 0
            BitsPerSample: 10
              Compression: 'Uncompressed'
PhotometricInterpretation: 'CFA'
             StripOffsets: 1635968
          SamplesPerPixel: 1
             RowsPerStrip: 4352
          StripByteCounts: 42040320
              XResolution: []
              YResolution: []
           ResolutionUnit: 'Inch'
                 Colormap: []
      PlanarConfiguration: 'Chunky'
                TileWidth: []
               TileLength: []
              TileOffsets: []
           TileByteCounts: []
              Orientation: 1
                FillOrder: 1
         GrayResponseUnit: 0.0100
           MaxSampleValue: 1023
           MinSampleValue: 0
             Thresholding: 1
                   Offset: 56578
            CFAPlaneColor: [0 1 2]
                CFALayout: 1
      BlackLevelRepeatDim: [2 2]
               BlackLevel: [0 0 0 0]
               WhiteLevel: 1023
             DefaultScale: [1 1]
        DefaultCropOrigin: [0 0]
          DefaultCropSize: [7728 4352]
          BayerGreenSplit: 1
        AntiAliasStrength: 1
         BestQualityScale: 1
              UnknownTags: [4x1 struct]
4

0 に答える 0