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

Non Linear Depth Issue #3

Open
thechargedneutron opened this issue Dec 24, 2019 · 3 comments
Open

Non Linear Depth Issue #3

thechargedneutron opened this issue Dec 24, 2019 · 3 comments

Comments

@thechargedneutron
Copy link

I used the plugin to obtain a depth map from iPhone X and XR. All works correct, but I guess the returned depth values are non-linear. I captured an image of an object oriented such that the depth changes gradually.
I simply mapped depth in a range to RB from 0-255 and G 255 when out of range / undefined.
The obtained image is as follows:
image
Now I plotted the R values after taking a suitable window around the region of interest and obtained this:

image

This is indicative of the fact that the returned depth values are non-linear.

Can you help me out with a solution to this or maybe the error in my formulation?

Thanks

@AtsushiSuzuki
Copy link
Owner

Very interesting.
Correcting depth map using AVDepthData.cameraCalibrationData may fix this, but I'm not certain.

https://developer.apple.com/documentation/avfoundation/avdepthdata
shu223/iOS-Depth-Sampler#5

@thechargedneutron
Copy link
Author

@AtsushiSuzuki Thank you for your reply. I tried following the second link which asks to uncomment certain parts of AVCameraCalibrationData.h but either it is not working, or I am making some mistake. Can you provide a possible working solution to this?

@AtsushiSuzuki
Copy link
Owner

Unfortunately for now I don't have iOS development environment (and phone), so I cannnot handle this issue right now, sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants