Possible issue with date Create Date and SubSeconds

Started by mhall, March 20, 2022, 10:10:21 PM

Previous topic - Next topic

mhall

Hi,

I'm running into an issue with Create Date as extracted by EXIFTool and I'm wondering if it's a problem with the way the camera itself (Nikon Z 9) encodes Create Date or perhaps EXIFTool.

The Nikon offers a mode where it will shoot 120 FPS stills. However, it doesn't offer the ability to group images by "burst" - they are all dumped to the same folder. I have written some JS code (NodeJS) that uses EXIFTool to extract EXIF data from the files, then, using Create Date, groups the images based on an interval threshold value between create dates of each image. 120 fps is ~8.33ms between images - I'm using a threshold of 2x that value to determine if an image should be included in a group or not. If the interval is larger than the threshold a new accumulation group is created.

The issue is occasionally 1 or more images from a burst will be pulled into their own group when they shouldn't be - they are actually part of a longer group of images and should be included in that group. My investigation showed that, when this happened, the difference between create dates was always 901 milliseconds. Further looking showed that this was only the case when the Create Date rolled over from one second to the next during the burst/group.

In cases such as those, the Create Date for one frame is extracted as:

2022:03:06 13:09:42.99

and the following frame is

2022:03:06 13:09:43.00

An interval calculated using those values is rightly 901 milliseconds and a new group is created. I'm wondering if EXIFTool is maybe discarding the final digit in SubSecTimeOriginal?

I've used Nikon's own RAW viewing tool (NX Studio) too display the EXIF data and it, too, reports only two digit precision in SubSecTimeOriginal as well. So it could be an issue where the camera does not encode it with three digit precision.

This is the EXIF that was extracted from one of the files:



{
      "SourceFile": "-",
      "ExifTool": {
        "ExifToolVersion": 12.39
      },
      "Other": {
        "FileSize": "3.3 MiB",
        "FilePermissions": "p---------",
        "FileType": "JPEG",
        "FileTypeExtension": "jpg",
        "MIMEType": "image/jpeg"
      },
      "Time": {
        "FileModifyDate": "0000:00:00 00:00:00",
        "FileAccessDate": "0000:00:00 00:00:00",
        "FileCreateDate": "0000:00:00 00:00:00",
        "ModifyDate": "2022:03:06 13:09:42",
        "DateTimeOriginal": "2022:03:06 13:09:42",
        "CreateDate": "2022:03:06 13:09:42",
        "OffsetTime": "-08:00",
        "OffsetTimeOriginal": "-08:00",
        "OffsetTimeDigitized": "-08:00",
        "TimeZone": "-08:00",
        "DaylightSavings": "No",
        "DateDisplayFormat": "Y/M/D",
        "PowerUpTime": "2022:03:06 12:57:38",
        "SubSecTime": 99,
        "SubSecTimeOriginal": 99,
        "SubSecTimeDigitized": 99,
        "SubSecCreateDate": "2022:03:06 13:09:42.99-08:00",
        "SubSecDateTimeOriginal": "2022:03:06 13:09:42.99-08:00",
        "SubSecModifyDate": "2022:03:06 13:09:42.99-08:00",
        "CreateDateMS": 1646600982099
      },
      "Image": {
        "ExifByteOrder": "Little-endian (Intel, II)",
        "Orientation": "Rotate 270 CW",
        "XResolution": 300,
        "YResolution": 300,
        "ResolutionUnit": "inches",
        "Software": "Ver.01.11",
        "YCbCrPositioning": "Co-sited",
        "ExposureTime": "1/800",
        "FNumber": 2,
        "ISO": 4000,
        "SensitivityType": "Recommended Exposure Index",
        "RecommendedExposureIndex": 4000,
        "ExifVersion": "0232",
        "ComponentsConfiguration": "Y, Cb, Cr, -",
        "CompressedBitsPerPixel": 2,
        "ExposureCompensation": 0,
        "HDRInfoVersion": "0200",
        "HDR": "Off",
        "HDRLevel": "Auto",
        "FileInfoVersion": "0100",
        "MemoryCardNumber": 0,
        "DirectoryNumber": 100,
        "FileNumber": 7630,
        "UserComment": "",
        "FlashpixVersion": "0100",
        "ColorSpace": "sRGB",
        "ExifImageWidth": 4128,
        "ExifImageHeight": 2752,
        "InteropIndex": "R98 - DCF basic file (sRGB)",
        "InteropVersion": "0100",
        "FileSource": "Digital Camera",
        "SceneType": "Directly photographed",
        "CFAPattern": "[Red,Green][Green,Blue]",
        "CustomRendered": "Custom",
        "SerialNumber": 3002881,
        "LensInfo": "200mm f/2",
        "LensMake": "",
        "LensModel": "VR 200mm f/2G",
        "LensSerialNumber": "",
        "CompositeImage": "Not a Composite Image",
        "Compression": "JPEG (old-style)",
        "ThumbnailOffset": 23048,
        "ThumbnailLength": 10152,
        "CreatorTool": "NIKON Z 9 Ver.01.11   ",
        "Rating": 0,
        "MPFVersion": "0100",
        "NumberOfImages": 3,
        "MPImageFlags": "Dependent child image",
        "MPImageFormat": "JPEG",
        "MPImageType": "Large Thumbnail (full HD equivalent)",
        "MPImageLength": 510346,
        "MPImageStart": 2959872,
        "DependentImage1EntryNumber": 0,
        "DependentImage2EntryNumber": 0,
        "ImageWidth": 4128,
        "ImageHeight": 2752,
        "EncodingProcess": "Baseline DCT, Huffman coding",
        "BitsPerSample": 8,
        "ColorComponents": 3,
        "YCbCrSubSampling": "YCbCr4:2:2 (2 1)",
        "Aperture": 2,
        "ImageSize": "4128x2752",
        "Megapixels": 11.4,
        "ShutterSpeed": "1/800",
        "DOF": "0.42 m (11.68 - 12.10 m)",
        "FOV": "10.1 deg (2.10 m)",
        "LightValue": 6.3,
        "FileName": "Z91_7630"
      },
      "Camera": {
        "Make": "NIKON CORPORATION",
        "Model": "NIKON Z 9",
        "ExposureProgram": "Manual",
        "MeteringMode": "Multi-segment",
        "LightSource": "Unknown",
        "Flash": "No Flash",
        "FocalLength": "200.0 mm",
        "MakerNoteVersion": 2.11,
        "Quality": "Normal",
        "WhiteBalance": "Preset1",
        "FocusMode": "AF-C",
        "FlashSetting": "Normal",
        "FlashType": "",
        "WB_RBLevels": "1.837890625 1.689453125 1 1",
        "ProgramShift": 0,
        "ExposureDifference": 0,
        "ImageBoundary": "0 0 4128 2752",
        "ExternalFlashExposureComp": 0,
        "FlashExposureBracketValue": 0,
        "ExposureBracketValue": 0,
        "CropHiSpeed": "FX Uncropped (8280x5520 cropped to 8280x5520 at pixel 0,0)",
        "ExposureTuning": 0,
        "SerialNumber": 3002881,
        "ColorSpace": "sRGB",
        "VRInfoVersion": "0200",
        "VibrationReduction": "Off",
        "VRMode": "Off",
        "ActiveD-Lighting": "Off",
        "PictureControlVersion": "0301",
        "PictureControlName": "Neutral",
        "PictureControlBase": "Neutral",
        "PictureControlAdjust": "Quick Adjust",
        "PictureControlQuickAdjust": "n/a",
        "MidRangeSharpness": 1,
        "Clarity": 1,
        "Brightness": "Normal",
        "Hue": "None",
        "FilterEffect": "n/a",
        "ToningEffect": "n/a",
        "ToningSaturation": "n/a",
        "ISO": 4032,
        "ISOExpansion": "Off",
        "ISO2": 4032,
        "ISOExpansion2": "Off",
        "VignetteControl": "Normal",
        "AutoDistortionControl": "On",
        "ShutterMode": "Unknown (96)",
        "MechanicalShutterCount": 0,
        "ImageSizeRAW": "Small",
        "ColorTemperatureAuto": 0,
        "LensType": "G VR",
        "Lens": "200mm f/2",
        "FlashMode": "Did Not Fire",
        "ShootingMode": "Continuous",
        "ShotInfoVersion": "0805",
        "FirmwareVersion": "01.11.b1",
        "FirmwareVersion2": "01.00.c0",
        "FirmwareVersion3": "01.00.00",
        "NumberOffsets": 27,
        "NoiseReduction": "Off",
        "ColorBalanceVersion": "0803",
        "LensDataVersion": "0802",
        "ExitPupilPosition": "93.1 mm",
        "AFAperture": 2,
        "FocusPosition": "0x33",
        "FocusDistance": "11.89 m",
        "LensIDNumber": 169,
        "LensFStops": 7,
        "MinFocalLength": "201.6 mm",
        "MaxFocalLength": "201.6 mm",
        "MaxApertureAtMinFocal": 2,
        "MaxApertureAtMaxFocal": 2,
        "MCUVersion": 171,
        "EffectiveMaxAperture": 2,
        "RetouchHistory": "None",
        "ImageDataSize": 2732824,
        "ShutterCount": 27653,
        "FlashInfoVersion": "0301",
        "FlashSource": "None",
        "ExternalFlashFirmware": "n/a",
        "FlashCompensation": 0,
        "VariProgram": "",
        "HighISONoiseReduction": "Off",
        "AFInfo2Version": "0400",
        "AFImageWidth": 8256,
        "AFImageHeight": 5504,
        "FocusPositionHoriontal": "6R of Center",
        "FocusPositionVertical": "1D from Center",
        "AFAreaWidth": 150,
        "AFAreaHeight": 152,
        "AFFineTune": "Off",
        "AFFineTuneIndex": "n/a",
        "AFFineTuneAdj": 0,
        "AFFineTuneAdjTele": 0,
        "RetouchInfoVersion": "0200",
        "RetouchNEFProcessing": "Off",
        "SilentPhotography": "Off",
        "SensingMethod": "One-chip color area",
        "ExposureMode": "Manual",
        "FocalLengthIn35mmFormat": "200 mm",
        "SceneCaptureType": "Standard",
        "GainControl": "High gain up",
        "Contrast": "Normal",
        "Saturation": "Normal",
        "Sharpness": "Normal",
        "SubjectDistanceRange": "Unknown",
        "BlueBalance": 1.689453,
        "RedBalance": 1.837891,
        "ScaleFactor35efl": 1,
        "LensID": "AF-S Nikkor 200mm f/2G ED VR II",
        "LensSpec": "200mm f/2 G VR",
        "CircleOfConfusion": "0.030 mm",
        "FocalLength35efl": "200.0 mm (35 mm equivalent: 200.0 mm)",
        "HyperfocalDistance": "665.64 m"
      },
      "Author": {
        "Artist": "MICHEAL HALL",
        "Copyright": "COPYRIGHT MICHEAL HALL PHOTOGRAPHY ALL RIGHTS RESERVED"
      },
      "Location": {
        "GPSVersionID": "2.3.0.0"
      },
      "Preview": {
        "ThumbnailImage": "(Binary data 10152 bytes, use -b option to extract)",
        "PreviewImage": "(Binary data 122811 bytes, use -b option to extract)",
        "MPImage3": "(Binary data 510346 bytes, use -b option to extract)"
      }
    },
    "imageName": "i20220306-00004-03_0086",
    "updatedAt": {
      "$date": "2022-03-07T07:07:02.255Z"
    }
  }


I can provide relevant JPGs if they are needed.

Right now I have included the very clunky solution of checking to see if the create date is within the interval threshold or if the difference is exactly 901ms. That does work using the sets of images I'm testing with, but is an awfully brittle solution.

Any thoughts would be appreciated!

Phil Harvey

Quote from: mhall on March 20, 2022, 10:10:21 PM
2022:03:06 13:09:42.99

and the following frame is

2022:03:06 13:09:43.00

An interval calculated using those values is rightly 901 milliseconds

??  But the difference between these two times is 10 milliseconds.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).