如何使用MATLAB提取图像元数据?

拉纳蒂公主

如何使用MATLAB提取图像元数据,例如曝光度,宽度,高度或位深?

直到最近我一直在使用exifread,但是最新的MATLAB版本中不再存在此函数。

另一个功能是imfinfo,但是它无法读取“ EXPOSURE DATA”图像。

如何阅读“曝光”图像?

小猪

exifread()9年前已弃用。它已被替换为imfinfo

info = imfinfo(filename) 将返回您想要的所有信息。

Matlab参考

一些文件格式返回的其他字段:

仅JPEG和TIFF-如果文件名包含可交换图像文件格式(EXIF)标记,则信息可能还包含“ DigitalCamera”或“ GPSInfo”(全球定位系统信息)字段。

info.Widthinfo.Heightinfo.BitDepth曝光时间以及所有其他相机参数都存储在1x1结构中info.DigitalCamera

这是一个例子

https://de.mathworks.com/matlabcentral/answers/146651-missing-functionality-when-using-imfinfo-instead-of-exifread

>> info = imfinfo('img_1771.jpg')
info = 
            Filename: 'C:\Users\fhempel\Desktop\tmp\img_1771.jpg'
         FileModDate: '07-Aug-2014 12:09:45'
            FileSize: 32764
              Format: 'jpg'
       FormatVersion: ''
               Width: 480
              Height: 360
            BitDepth: 24
           ColorType: 'truecolor'
     FormatSignature: ''
     NumberOfSamples: 3
        CodingMethod: 'Huffman'
       CodingProcess: 'Sequential'
             Comment: {}
                Make: 'Canon'
               Model: 'Canon PowerShot S40'
         Orientation: 1
         XResolution: 180
         YResolution: 180
      ResolutionUnit: 'Inch'
            DateTime: '2003:12:14 12:01:44'
    YCbCrPositioning: 'Centered'
       DigitalCamera: [1x1 struct]
       ExifThumbnail: [1x1 struct]


>> info.DigitalCamera
ans = 
                ExposureTime: 0.0020
                     FNumber: 4.9000
                 ExifVersion: [48 50 50 48]
            DateTimeOriginal: '2003:12:14 12:01:44'
           DateTimeDigitized: '2003:12:14 12:01:44'
     ComponentsConfiguration: 'YCbCr'
      CompressedBitsPerPixel: 5
           ShutterSpeedValue: 8.9688
               ApertureValue: 4.6563
           ExposureBiasValue: 0
            MaxApertureValue: 2.9709
                MeteringMode: 'CenterWeightedAverage'
                       Flash: 'Flash did not fire, no strobe return detection function, auto flash mode, f...'
                 FocalLength: 21.3125
                   MakerNote: [1x450 double]
                 UserComment: [1x264 double]
             FlashpixVersion: [48 49 48 48]
                  ColorSpace: 'sRGB'
            CPixelXDimension: 2272
            CPixelYDimension: 1704
         InteroperabilityIFD: [1x1 struct]
       FocalPlaneXResolution: 8.1143e+03
       FocalPlaneYResolution: 8.1143e+03
    FocalPlaneResolutionUnit: 2
               SensingMethod: 'One-chip color area sensor'
                  FileSource: 'DSC'
              CustomRendered: 'Normal process'
                ExposureMode: 'Auto exposure'
                WhiteBalance: 'Auto white balance'
            DigitalZoomRatio: 1
            SceneCaptureType: 'Standard'

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章