I am trying to get the depth map from the attached image that was taken in portrait mode on a samsung A70 phone.
I was able to use the following command to extract the depth map from an image taken on a Pixel 3a :
exiftool PXL_20220211_211848299.PORTRAIT.jpg -trailer -b | exiftool - -trailer -b > depth.jpg
but cannot manage to find anything that works for the image from samsung A70
That attached image appears to have been stripped of all data except for the ICC_Profile.
thanks for the quick reply. It was shared with me as an email attachment, I'm guessing that stripped everything except the ICC_Profile. Would uploading the photo to a cloud storage account from the phone preserve the depth data?
Yes, cloud storage will probably preserve the data, though MS's OneDrive might alter the file, as OneDrive sometimes edits the metadata of images uploaded to it. Zipping the file up before sending it will also preserve the data.
Thanks. I have this image that was uploaded to dropbox and it looks like it retained all of the metadata, but when I try to get the original image out using:
exiftool 20220228_093025.jpg -trailer -b > 20220228_093025_original.jpg
I get a file that looks to be about the right size, but its corrupted..
> exiftool 20220228_093025.jpg "-embedded*" -a
Embedded Image Name : DualShot_1
Embedded Image : (Binary data 1512973 bytes, use -b option to extract)
Embedded Image Name : DualShot_2
Embedded Image 2 : (Binary data 649775 bytes, use -b option to extract)
Thanks Phil. I'm able to get the original image using:
exiftool -b -EmbeddedImage 20220228_093025.jpg > 20220228_093025_output.jpg
when I try to do:
exiftool -b -DepthMapData 20220228_093025.jpg > 20220228_093025_output.jpg
I get a file that again appear the right size but when I try to open it, it is corrupted. I have also tried:
exiftool 20220228_093025.jpg -b -DualShot_2 > output.jpg
but that didnt work either
Sorry, I thought one of the EmbeddedImages may contain what you want. But I think it is the DepthMapTiff you are looking for. (A TIFF-format image.):
> exiftool ~/Desktop/20220228_093025.jpg -'*depth*'
Depth Map Name : DualShot_DepthMap_1
Depth Map Data : (Binary data 518400 bytes, use -b option to extract)
Depth Map Width : 960
Depth Map Height : 540
Depth Map Tiff : (Binary data 518604 bytes, use -b option to extract)
- Phil
Thats it! Thank you Phil!
Is there a way to retain or copy ALL the metadata after auto-rotating the JPEG? I've used exiftran, tried to copy the metadata from original to rotated with exiftool, and it always leaves out the maker notes, including the depth maps. I have a sinking feeling I have hit into a real limit here.
- J
What is the command you're using?
This should copy all tags, including MakerNotes, to the same exact locations they are in the original.
exiftool -TagsFromFile Source.jpg -All:All -icc_profile Target.jpg
Though I'm not sure if the -unsafe shortcut should be included in that.
Or you could always copy as a block in case there are tags that exiftool doesn't have definitions for
exiftool -TagsFromFile Source.jpg -EXIF -IPTC -XMP -icc_profile Target.jpg
See also FAQ #9 (https://exiftool.org/faq.html#Q9)
I have tried many commands, including ones you've shared, but the depth map maker notes are not copying. Have you tried? Do you get different results? - J
It copies MakerNotes from my Nikon jpgs correctly. I don't know about depth maps, as I don't have a camera that does that.
https://exiftool.org/forum/index.php?action=dlattach;topic=13335.0;attach=4442
This is the image being analyzed in this thread, that's all i have to work with myself! - J
Ah, that's because it's in the trailer.
C:\>exiftool -P -overwrite_original -TagsFromFile Y:\!temp\aaaa\20220228_093025.jpg -trailer y:\!temp\Test4.jpg
1 image files updated
C:\>exiftool -G1 -a -s -e --file:all y:\!temp\Test4.jpg
[ExifTool] ExifToolVersion : 12.39
[Samsung] DepthMapName : DualShot_DepthMap_1
[Samsung] DepthMapData : (Binary data 518400 bytes, use -b option to extract)
[Samsung] DepthMapWidth : 960
[Samsung] DepthMapHeight : 540
[Samsung] EmbeddedImageName : DualShot_1
[Samsung] EmbeddedImage : (Binary data 1512973 bytes, use -b option to extract)
[Samsung] EmbeddedImageName : DualShot_2
[Samsung] EmbeddedImage2 : (Binary data 649775 bytes, use -b option to extract)
[Samsung] TimeStamp : 2022:02:28 06:30:25-08:00
[Samsung] MCCData : 310
I don't know what that means, but it sure seems hopeless...? - J
Look at the command. I copied the Trailer from 20220228_093025.jpg into Test4.jpg and now Test4.jpg has the depth map data.
Change your name from StarGeek to StarGod!
THANK YOU SO MUCH!!! : )
J