Author Topic: extracting the *new* Google depth format?  (Read 807 times)

dclaar

  • Newbie
  • *
  • Posts: 1
extracting the *new* Google depth format?
« on: February 18, 2020, 06:54:02 PM »
I'm not sure if this is the right place, but while Exiftool 11.70 appears to support the old Google depth format, there's a new format https://developer.android.com/training/camera2/Dynamic-depth-v1.0.pdf. I can't use the old formulas that I found via searches (e.g. using -ImageDepth, etc) to extract the new depth image, as it doesn't seem to expose the file as a binary blob.

I think maybe if I was clever, I could write a config for this, but I don't see any examples that do extraction.

I've attached a sample image for reference.

Any thoughts on the feasibility of extracting the images? Thanks!

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17944
    • ExifTool Home Page
Re: extracting the *new* Google depth format?
« Reply #1 on: February 18, 2020, 09:18:21 PM »
I'll take a look at this first thing tomorrow.

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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17944
    • ExifTool Home Page
Re: extracting the *new* Google depth format?
« Reply #2 on: February 19, 2020, 12:49:57 PM »
I think I can do something smart with a config file here, but first I need to add support for reading these new XMP tags.  I should be able to have something for you by tomorrow.

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

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17944
    • ExifTool Home Page
Re: extracting the *new* Google depth format?
« Reply #3 on: February 20, 2020, 09:47:48 AM »
Wow.  OK.  The Google Dynamic Depth specification sucks.  The documentation is unclear, and the metadata structure is more convoluted than necessary.  Without the example you provided I wouldn't have been able to add support for this.  The namespaces in the example are also different than those in the documentation.

ExifTool 11.88 (just released) has full support for these new XMP tags.  With this version and the attached config file, the following command will extract the DepthMap and ConfidenceMap images from all JPG files in directory:

exiftool -config depthmap.config -W %d%f_%t.%s -depthmap -confidencemap -b -ext jpg DIR

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

herb

  • ExifTool Freak
  • *****
  • Posts: 383
Re: extracting the *new* Google depth format?
« Reply #4 on: February 21, 2020, 08:33:39 AM »
Hello Phil,

Thanks for the new version that allows to extract these trailers.

But, is it really by design that e.g. an htmldump or also the info given by -v option says: Unknown trailer ?
Ok, I can imagine that the htmldump does not know the trailer consists of depthmap and confidence map,
but as the trailer starts with x'ffd8 - which is a jpg header - it would be helpful to have an information like "trailer 1 - jpg image" or so.

Thanks in advance
Herb 

Phil Harvey

  • ExifTool Author
  • Administrator
  • ExifTool Freak
  • *****
  • Posts: 17944
    • ExifTool Home Page
Re: extracting the *new* Google depth format?
« Reply #5 on: February 21, 2020, 08:34:48 AM »
Hi Herb,

As this information is currently only extracted by user-defined tags in a config file, it is unknown as far as ExifTool is concerned.

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