Open thechargedneutron opened 4 years ago
Very interesting.
Correcting depth map using AVDepthData.cameraCalibrationData
may fix this, but I'm not certain.
https://developer.apple.com/documentation/avfoundation/avdepthdata https://github.com/shu223/iOS-Depth-Sampler/issues/5
@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?
Unfortunately for now I don't have iOS development environment (and phone), so I cannnot handle this issue right now, sorry.
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: Now I plotted the R values after taking a suitable window around the region of interest and obtained this:
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