Hi All,
I am trying to retrieve UNfiltered/raw AVDepthData from AVCapturePhotoOutput. Although, I set explicitly filtering to NO through a AVCapturePhotoSettings object i.e. photoSettings.depthDataFiltered = NO;
The output after the capture session is a filtered depth map i.e. no NAN values.
Find code snippet below from AVCam code example from apple:
I don't know why AVCapturePhotoOutput ignores the no filter settings.
Appreciate any hint, thanks.
<code snippet>
photoSettings = [AVCapturePhotoSettings photoSettings];
photoSettings.highResolutionPhotoEnabled = YES;
if ( self.depthDataDeliveryMode == AVCamDepthDataDeliveryModeOn && self.photoOutput.isDepthDataDeliverySupported ) {
photoSettings.depthDataDeliveryEnabled = YES;
-> photoSettings.depthDataFiltered = NO;
} else {
photoSettings.depthDataDeliveryEnabled = NO;
}
:
:
:
self.inProgressPhotoCaptureDelegates[@(photoCaptureDelegate.requestedPhotoSettings.uniqueID)] = photoCaptureDelegate;
[self.photoOutput capturePhotoWithSettings:photoSettings delegate:photoCaptureDelegate];