【问题标题】:Detecting the camera from which the image was taken检测拍摄图像的相机
【发布时间】:2016-02-13 08:38:20
【问题描述】:

考虑我们遇到的一个问题,比方说 - 一组 5 个相机和从每个相机拍摄的 10 张照片(在不同的照明条件下)。

我的问题是,是否有可能有一张随机照片(从集合中的一个相机拍摄)并确定它是从哪个相机拍摄的?

图像处理、计算机视觉、机器学习.. 不是我的专业领域(正如您可能建议的那样),但我确实知道一些机器学习概念/算法的基础知识以及如何处理数据集等。

我知道这是一个非常广泛的问题,可能没有非黑即白的答案,但任何关于我如何解决问题或起点应该是什么的指导将不胜感激,因为我找不到太多关于这个具体问题在线。

【问题讨论】:

  • 可能是通过检测坏点...此外,如果图像未调整大小/裁剪,则可能会在相同分辨率下获得拜耳过滤器网格中的偏移量,因为每个相机可能有不同的光线芯片分辨率和镜头焦距 ...
  • 你们有相机的内部校准数据吗?或者相机甚至相互之间进行了外部校准?
  • 会有人试图伪造相机身份吗?
  • 请澄清您是在期待诡计还是这是一个直截了当的问题。

标签: image-processing machine-learning computer-vision


【解决方案1】:

你正在深入巫师领域

我会尽量让我的回答简短易懂,但您指的是涉及深度数学魔法的完整研究领域。现在没有回头路了...

请阅读令人惊叹的论文“Digital Image Forensics : a booklet for beginner”。 这个答案将涵盖论文(仅此而已,我不是专家)。

数字图像取证 101


图像采集管道

上面的每个步骤都会留下标记,例如:

  • 镜头伪影可用于两次识别同一个相机
  • 彩色滤光片阵列 (CFA) 模式取决于相机制造商
  • 传感器噪声统计数据因图像而异。
  • 图像压缩 (JPEG) 使用不同制造商的“压缩表”

还有更多(再次,请阅读论文!)

相机内变化?

上述技术依赖于可以分类的人工制品:

  • 与相机模型的所有实例相同的属性
  • 同一型号的 2 个不同相机的属性不同
  • 同一相机制造商的属性相同

它提出了你想要识别什么的问题:

  • 给定一个相机“这张照片是由这个特定设备拍摄的吗”?
  • 这张照片是用同一型号的相机拍摄的吗?

反取证,反反取证......

专注于单个统计属性(例如 CFA 模式),我们计算参考相机和给定图像的相关统计数据,并测量相关性。

这些属性适用于任何未篡改的图像,但我们必须假设有恶意的人会尝试篡改图像以使其看起来一直是正确的相机!

如果我们事先知道要计算什么指标,我们可以通过篡改图像并围绕与目标值的相似性优化我们的图像统计信息来轻松欺骗系统(请记住,优化是不应该轻视的黑魔法;)

例如 JPEG 压缩表可以在后期处理中进行调整,方法是使用给定的表重新采样,以使我的假图像作为另一个相机传递。

这场取证、反取证、反反取证之间的猫捉老鼠游戏可以走得很远。

【讨论】:

    【解决方案2】:

    最简单的方法可能是查看图像名称,因为大多数相机分配的帧数都是单调递增的,而且相机不太可能都拍摄了相同数量的照片 - 如果有的话,您可以先多拍 100 张照片从第一台相机开始,第二台相机多出 200 张照片,第三台相机多出 300 张,依此类推,以抵消帧数。

    另一种选择是使用jheadexiftool等工具查看图片标题中的EXIF数据,例如

    exiftool IMG_3913.JPG
    

    输出

    ExifTool Version Number         : 10.01
    File Name                       : IMG_3913.JPG
    Directory                       : .
    File Size                       : 1979 kB
    File Modification Date/Time     : 2015:05:28 17:16:43+01:00
    File Access Date/Time           : 2015:11:12 08:05:21+00:00
    File Inode Change Date/Time     : 2015:11:12 07:59:13+00:00
    File Permissions                : rw-------
    File Type                       : JPEG
    File Type Extension             : jpg
    MIME Type                       : image/jpeg
    Exif Byte Order                 : Big-endian (Motorola, MM)
    Make                            : Apple
    Camera Model Name               : iPhone 5
    Orientation                     : Rotate 90 CW
    X Resolution                    : 72
    Y Resolution                    : 72
    Resolution Unit                 : inches
    Software                        : 8.3
    Modify Date                     : 2015:05:28 17:16:43
    Y Cb Cr Positioning             : Centered
    Exposure Time                   : 1/120
    F Number                        : 2.4
    Exposure Program                : Program AE
    ISO                             : 80
    Exif Version                    : 0221
    Date/Time Original              : 2015:05:28 17:16:43
    Create Date                     : 2015:05:28 17:16:43
    Components Configuration        : Y, Cb, Cr, -
    Shutter Speed Value             : 1/120
    Aperture Value                  : 2.4
    Brightness Value                : 5.308204915
    Exposure Compensation           : 0
    Metering Mode                   : Multi-segment
    Flash                           : Auto, Did not fire
    Focal Length                    : 4.1 mm
    Subject Area                    : 1373 1230 998 998
    Run Time Scale                  : 1000000000
    Run Time Value                  : 27313980762583
    Run Time Epoch                  : 0
    Run Time Flags                  : Valid
    Sub Sec Time Original           : 037
    Sub Sec Time Digitized          : 037
    Flashpix Version                : 0100
    Color Space                     : sRGB
    Exif Image Width                : 3264
    Exif Image Height               : 2448
    Sensing Method                  : One-chip color area
    Scene Type                      : Directly photographed
    Exposure Mode                   : Auto
    White Balance                   : Auto
    Focal Length In 35mm Format     : 33 mm
    Scene Capture Type              : Standard
    Lens Info                       : 4.12mm f/2.4
    Lens Make                       : Apple
    Lens Model                      : iPhone 5 back camera 4.12mm f/2.4
    GPS Latitude Ref                : North
    GPS Longitude Ref               : West
    GPS Altitude Ref                : Above Sea Level
    GPS Time Stamp                  : 16:16:35.6
    GPS Speed Ref                   : km/h
    GPS Speed                       : 0
    GPS Date Stamp                  : 2015:05:28
    Compression                     : JPEG (old-style)
    Thumbnail Offset                : 1328
    Thumbnail Length                : 10991
    XMP Toolkit                     : XMP Core 5.4.0
    Region Applied To Dimensions H  : 2448
    Region Applied To Dimensions W  : 3264
    Region Applied To Dimensions Unit: pixel
    Region Extensions Time Stamp    : -1596906250
    Region Extensions Face ID       : 2
    Region Extensions Confidence Level: 352
    Region Extensions Angle Info Yaw: 0
    Region Extensions Angle Info Roll: 270
    Region Area Y                   : 0.503881
    Region Area W                   : 0.306066
    Region Area Unit                : normalized
    Region Area X                   : 0.418658
    Region Area H                   : 0.408088
    Region Type                     : Face
    Image Width                     : 3264
    Image Height                    : 2448
    Encoding Process                : Baseline DCT, Huffman coding
    Bits Per Sample                 : 8
    Color Components                : 3
    Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
    Aperture                        : 2.4
    GPS Altitude                    : 20 m Above Sea Level
    GPS Date/Time                   : 2015:05:28 16:16:35.6Z
    GPS Latitude                    : 51 deg 51' 3.11" N
    GPS Longitude                   : 2 deg 12' 18.89" W
    GPS Position                    : 51 deg 51' 3.11" N, 2 deg 12' 18.89" W
    Image Size                      : 3264x2448
    Megapixels                      : 8.0
    Run Time Since Power Up         : 7:35:13
    Scale Factor To 35 mm Equivalent: 8.0
    Shutter Speed                   : 1/120
    Create Date                     : 2015:05:28 17:16:43.037
    Date/Time Original              : 2015:05:28 17:16:43.037
    Thumbnail Image                 : (Binary data 10991 bytes, use -b option to extract)
    Circle Of Confusion             : 0.004 mm
    Field Of View                   : 57.2 deg
    Focal Length                    : 4.1 mm (35 mm equivalent: 33.0 mm)
    Hyperfocal Distance             : 1.89 m
    Light Value                     : 9.8
    

    或者像这样使用jhead

    jhead -v IMGxyz.jpg
    

    输出

    Exif header 12317 bytes long
    Exif section in Motorola order
    (dir has 11 entries)
        Make = "Apple"
        Model = "iPhone 5"
        Orientation = 6
        XResolution = 72/1
        YResolution = 72/1
        ResolutionUnit = 2
        Software = "8.3"
        DateTime = "2015:05:28 17:16:43"
        YCbCrPositioning = 1
        ExifOffset = 198
        Exif Dir:(dir has 32 entries)
            ExposureTime = 1/120
            FNumber = 12/5
            ExposureProgram = 2
            ISOSpeedRatings = 80
            ExifVersion = "0221"
            DateTimeOriginal = "2015:05:28 17:16:43"
            DateTimeDigitized = "2015:05:28 17:16:43"
            ComponentsConfiguration = "?"
            ShutterSpeedValue = 5567/806
            ApertureValue = 4845/1918
            BrightnessValue = 12745/2401
            ExposureBiasValue = 0/1
            MeteringMode = 5
            Flash = 24
            FocalLength = 103/25
            SubjectArea = 1373, 1230, 998, 998
            Maker note:  41 70 70 6c 65 20 69 4f 53 00 00... (232 bytes)
            SubSecTimeOriginal = "037"
            SubSecTimeDigitized = "037"
            FlashPixVersion = "0100"
            ColorSpace = 1
            ExifImageWidth = 3264
            ExifImageLength = 2448
            SensingMethod = 2
            SceneType = ""
            ExposureMode = 0
            WhiteBalance = 0
            FocalLengthIn35mmFilm = 33
            SceneCaptureType = 0
            Unknown Tag a432 Value = 103/25, 103/25, 12/5, 12/5
            Unknown Tag a433 Value = "Apple"
            Unknown Tag a434 Value = "iPhone 5 back camera 4.12mm f/2.4"
        GPS Dir offset = 996
        GPS info dir:(dir has 10 entries)
            GPSLatitudeRef      ="N"
            GPSLatitude         =51/1, 51/1, 311/100, 51/1, 311/100, 2/1, 311/100, 2/1, 12/1
            GPSLongitudeRef     ="W"
            GPSLongitude        =2/1, 12/1, 1889/100, 12/1, 1889/100, 17151/857, 1889/100, 17151/857, 16/1
            GPSAltitudeRef      =00
            GPSAltitude         =17151/857
            GPSTimeStamp        =16/1, 16/1, 3560/100, 16/1, 3560/100, 0/1, 3560/100, 0/1, 842019125/976237882
            GPSSpeedRef         ="K"
            GPSSpeed            =0/1
            GPSDateStamp        ="2015:05:28"
        Continued directory (dir has 6 entries)
            Compression = 6
            XResolution = 72/1
            YResolution = 72/1
            ResolutionUnit = 2
            ThumbnailOffset = 1316
            ThumbnailLength = 10991
    Thumbnail size: 10991 bytes
    Image cotains XMP section, 1939 bytes long
    ??http://ns.adobe.com/xap/1.0/?<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 5.4.0">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:mwg-rs="http://www.metadataworkinggroup.com/schemas/regions/"
                xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#"
                xmlns:apple-fi="http://ns.apple.com/faceinfo/1.0/"
                xmlns:stArea="http://ns.adobe.com/xmp/sType/Area#">
             <mwg-rs:Regions rdf:parseType="Resource">
                <mwg-rs:AppliedToDimensions rdf:parseType="Resource">
                   <stDim:h>2448</stDim:h>
                   <stDim:w>3264</stDim:w>
                   <stDim:unit>pixel</stDim:unit>
                </mwg-rs:AppliedToDimensions>
                <mwg-rs:RegionList>
                   <rdf:Seq>
                      <rdf:li rdf:parseType="Resource">
                         <mwg-rs:Extensions rdf:parseType="Resource">
                            <apple-fi:Timestamp>-1596906250</apple-fi:Timestamp>
                            <apple-fi:FaceID>2</apple-fi:FaceID>
                            <apple-fi:ConfidenceLevel>352</apple-fi:ConfidenceLevel>
                            <apple-fi:AngleInfoYaw>0</apple-fi:AngleInfoYaw>
                            <apple-fi:AngleInfoRoll>270</apple-fi:AngleInfoRoll>
                         </mwg-rs:Extensions>
                         <mwg-rs:Area rdf:parseType="Resource">
                            <stArea:y>0.503881</stArea:y>
                            <stArea:w>0.306066</stArea:w>
                            <stArea:unit>normalized</stArea:unit>
                            <stArea:x>0.418658</stArea:x>
                            <stArea:h>0.408088</stArea:h>
                         </mwg-rs:Area>
                         <mwg-rs:Type>Face</mwg-rs:Type>
                      </rdf:li>
                   </rdf:Seq>
                </mwg-rs:RegionList>
             </mwg-rs:Regions>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>
    Jpeg section marker 0xdb size 132
    Jpeg section marker 0xdd size 4
    JPEG image is 3264w * 2448h, 3 color components, 8 bits per sample
    Jpeg section marker 0xc4 size 418
    File name    : IMG_3913.JPG
    File size    : 2026129 bytes
    File date    : 2015:05:28 17:16:43
    Camera make  : Apple
    Camera model : iPhone 5
    Date/Time    : 2015:05:28 17:16:43
    Resolution   : 3264 x 2448
    Orientation  : rotate 90
    Flash used   : No (auto)
    Focal length :  4.1mm  (35mm equivalent: 33mm)
    Exposure time: 0.0083 s  (1/120)
    Aperture     : f/2.4
    ISO equiv.   : 80
    Whitebalance : Auto
    Metering Mode: pattern
    Exposure     : program (auto)
    GPS Latitude : N 51d 51m  3.11s
    GPS Longitude: W  2d 12m 18.89s
    GPS Altitude :  20.01m
    

    您可能会在图像文件名(佳能专业相机做到这一点)或 EXIF 数据中找到一个序列号 - 这将是理想的。

    如果做不到这一点,最简单的方法可能是在每个相机上设置不同的日期,例如正确设置日期和时间,但将摄像机 1 的年份设置为 2001,摄像机 2 的年份设置为 2002,摄像机 3 的年份设置为 2003。

    【讨论】:

    猜你喜欢
    • 2011-05-22
    • 2011-07-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-09-15
    • 2017-09-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多