Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for pictures with depth map included #22

Open
steren opened this issue Nov 26, 2023 · 9 comments
Open

Add support for pictures with depth map included #22

steren opened this issue Nov 26, 2023 · 9 comments

Comments

@steren
Copy link
Owner

steren commented Nov 26, 2023

No description provided.

@steren
Copy link
Owner Author

steren commented Dec 3, 2023

@steren
Copy link
Owner Author

steren commented Feb 20, 2024

Google Camera portrait mode is supposed to have a depth map

@steren
Copy link
Owner Author

steren commented Feb 20, 2024

https://www.photopea.com/ is an online tool to view embedded depth map

@steren
Copy link
Owner Author

steren commented Feb 20, 2024

@steren
Copy link
Owner Author

steren commented Feb 20, 2024

image

@steren
Copy link
Owner Author

steren commented Feb 20, 2024

exiftool implementation

@steren
Copy link
Owner Author

steren commented Feb 21, 2024

exifr has an example for GDepth: https://mutiny.cz/exifr/examples/depth-map-extraction.html

@steren
Copy link
Owner Author

steren commented Feb 21, 2024

@steren
Copy link
Owner Author

steren commented Feb 21, 2024

Let's keep going for For Dynamic Depth:

From https://stackoverflow.com/questions/58957619/android-q-get-depth-map-from-portrait-mode-photos:

Pixel phone portrait mode photo is concatenated of 4 JFIF structure https://en.wikipedia.org/wiki/JPEG_File_Interchange_Format. Each JFIF structure is an jpeg image.
A JFIF structure starts with marker 0xFFD8 and ends with marker 0xFFD9. Therefore, we can split a portrait mode image into 4 jpeg files.

The Container.Directory exif has:

[
    {
        "parseType": "Resource",
        "Item": {
            "Mime": "image/jpeg",
            "Length": 0,
            "Semantic": "Primary"
        }
    },
    {
        "parseType": "Resource",
        "Item": {
            "Mime": "image/jpeg",
            "Length": 7850,
            "Semantic": "GainMap"
        }
    },
    {
        "parseType": "Resource",
        "Item": {
            "Mime": "image/jpeg",
            "Length": 1138762,
            "Semantic": "Original"
        }
    },
    {
        "parseType": "Resource",
        "Item": {
            "Mime": "image/jpeg",
            "Length": 181100,
            "Semantic": "Depth"
        }
    },
    {
        "parseType": "Resource",
        "Item": {
            "Mime": "image/jpeg",
            "Length": 65558,
            "Semantic": "Confidence"
        }
    }
]

steren added a commit that referenced this issue Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant