extracting the *new* Google depth format?

Started by dclaar, February 18, 2020, 06:54:02 PM

Previous topic - Next topic

dclaar

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

Phil Harvey

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

herb

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

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/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).