2016-06-01 2 views
0

nicht abrufen Ich habe ein digitales Negativ, das ich versuche, in Matlab zu lesen und es zu verarbeiten. Ich habe die folgenden 3 Zeilen benutzt, um es vorläufig zu lesen.Konnte SubIFD für ein dng Bild in MATLAB

filename='imagename.dng'; 
t=Tiff(filename,'r'); 
offsets = getTag(t,'SubIFD'); 

Die Warnungen und Fehler, die ich bekommen sind als

raw2display 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 33421 (0x828d) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 33422 (0x828e) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 33434 (0x829a) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 33437 (0x829d) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 34855 (0x8827) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 36867 (0x9003) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 37386 (0x920a) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 37398 (0x9216) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 50964 (0xc714) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 50965 (0xc715) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 51009 (0xc741) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 51022 (0xc74e) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library warning - 'TIFFReadDirectory: Unknown 
field with tag 51041 (0xc761) encountered.' 
> In Tiff (line 651) 
    In raw2display (line 4) 
Warning: TIFF library error - '_TIFFVSetField: 
/Users/bryan/Documents/Project/img_0531/IMG_20160531_105331.dng: 
Bad value 0 for "Orientation" tag.' - file may be corrupt. 
> In Tiff (line 651) 
    In raw2display (line 4) 
Error using tifflib 
Unable to retrieve SubIFD. 

Error in Tiff/getTag (line 838) 
        tagValue = 
        tifflib('getField',obj.FileID,Tiff.TagID.(tagId)); 

Error in raw2display (line 5) 
offsets = getTag(t,'SubIFD'); 

Die imfinfo für das Bild folgt, gibt mir die folgende Ausgabe

Filename: '' FileModDate: '31-May-2016 13:53:32' FileSize: 24738008 Format: 'tif' FormatVersion: [] Width: 4080 Height: 3028 BitDepth: 16 ColorType: 'CFA' FormatSignature: [73 73 42 0] ByteOrder: 'little-endian' NewSubFileType: 0 BitsPerSample: 16 Compression: 'Uncompressed' PhotometricInterpretation: 'CFA' StripOffsets: [1x3028 double] SamplesPerPixel: 1 RowsPerStrip: 1 StripByteCounts: [1x3028 double] XResolution: 72 YResolution: 72 ResolutionUnit: 'Inch' Colormap: [] PlanarConfiguration: 'Chunky' TileWidth: [] TileLength: [] TileOffsets: [] TileByteCounts: [] Orientation: 0 FillOrder: 1 GrayResponseUnit: 0.0100 MaxSampleValue: 65535 MinSampleValue: 0 Thresholding: 1 Offset: 8 ImageDescription: '' Make: 'LGE' Model: 'Nexus 5X' Software: 'google/bullhead/bullhe…' DateTime: '2016:05:27 06:33:52' Copyright: '' ExposureTime: 1.9983e-04 FNumber: 2 ISOSpeedRatings: 80 DateTimeOriginal: '2016:05:27 06:33:52' FocalLength: 4.6700 DNGVersion: [1 4 0 0] DNGBackwardVersion: [1 1 0 0] UniqueCameraModel: 'Nexus 5X-LGE-google' CFAPlaneColor: [0 1 2] CFALayout: 1 BlackLevelRepeatDim: [2 2] BlackLevel: [52 52 52 52] WhiteLevel: 1023 DefaultScale: [1 1] DefaultCropOrigin: [8 8] DefaultCropSize: [4016 3008] ColorMatrix1: [1x9 double] ColorMatrix2: [1x9 double] CameraCalibration1: [1x9 double] CameraCalibration2: [1x9 double] AsShotNeutral: [0.5312 1 0.4062] CalibrationIlluminant1: 21 CalibrationIlluminant2: 17 ActiveArea: [2 48 3026 4080] UnknownTags: [8x1 struct]

Dieses Bild geklickt wurde ein Nexus mit 5x Gerät läuft die App Android L Kamera. Auch merke ich, dass es hier keine LinearizationTable gibt. Kannst du mir helfen, das zu beheben oder mir mehr Informationen darüber zu geben?

Antwort

0

Wenn es nicht funktioniert, versuchen Sie zuerst "Adobe DNG Konverter": http://supportdownloads.adobe.com/product.jsp?product=106&platform=Windows Danach versuchen Sie, den Code auf dem verarbeiteten Bild auszuführen. Das Mosaikbild wird in der Variablen "cfa" in B W

clear all; 
close all; 
warning off MATLAB:tifflib:TIFFReadDirectory:libraryWarning 
t = Tiff('DSC_9511_conv.dng','r'); 
offsets = getTag(t,'SubIFD'); 
setSubDirectory(t,offsets(1)); 
cfa = read(t); 
close(t); 
gespeichert