Remove all true depth APIs temporarily

This commit is contained in:
Georg Hagen
2025-01-23 23:19:17 +01:00
parent b644a7eb2c
commit 5d67a906b5
2 changed files with 2 additions and 33 deletions

View File

@@ -42,10 +42,6 @@ namespace OpenVulkano::AR::ArKit
{
return GetSize(arKitFrame.smoothedSceneDepth.depthMap);
}
if(arKitFrame.capturedDepthData)
{
return GetSize(arKitFrame.capturedDepthData.depthDataMap);
}
}
return { -1, -1 };
}
@@ -117,15 +113,6 @@ namespace OpenVulkano::AR::ArKit
m_depthImage.format = ArDepthFormat::METER_FP32;
m_depthImage.confidence.resolution = m_depthImage.depth.resolution;
}
else if (m_arKitFrame.capturedDepthData)
{
auto depthFormat = arKitFrame.capturedDepthData.depthDataType;
if (arKitFrame.capturedDepthData.depthDataType == kCVPixelFormatType_DepthFloat32) m_depthImage.format = ArDepthFormat::METER_FP32;
else if (arKitFrame.capturedDepthData.depthDataType == kCVPixelFormatType_DepthFloat16) m_depthImage.format = ArDepthFormat::METER_FP16;
else Logger::AR->info("Received depth frame with unsuported format: {} ({})",
depthFormat == kCVPixelFormatType_DisparityFloat16 ? "DisparityFloat16" : (depthFormat == kCVPixelFormatType_DisparityFloat32 ? "DisparityFloat32" : "Unknown"), depthFormat);
m_depthImage.confidence.resolution = { 1, 1 };
}
m_depthImage.intrinsic = frameMetadata.intrinsic.GetForResolution(m_depthImage.depth.resolution);
}
@@ -147,10 +134,6 @@ namespace OpenVulkano::AR::ArKit
CVPixelBufferUnlockBaseAddress(m_arKitFrame.smoothedSceneDepth.depthMap, kCVPixelBufferLock_ReadOnly);
CVPixelBufferUnlockBaseAddress(m_arKitFrame.smoothedSceneDepth.confidenceMap, kCVPixelBufferLock_ReadOnly);
}
else
{
CVPixelBufferUnlockBaseAddress(m_arKitFrame.capturedDepthData.depthDataMap, kCVPixelBufferLock_ReadOnly);
}
}
[m_arKitFrame release];
}
@@ -201,14 +184,6 @@ namespace OpenVulkano::AR::ArKit
m_depthImage.confidence.data = CVPixelBufferGetBaseAddress(m_arKitFrame.smoothedSceneDepth.confidenceMap);
m_lockedDepth = true;
}
else if(m_arKitFrame.capturedDepthData)
{
CVPixelBufferLockBaseAddress(m_arKitFrame.capturedDepthData.depthDataMap, kCVPixelBufferLock_ReadOnly);
m_depthImage.depth.data = CVPixelBufferGetBaseAddress(m_arKitFrame.capturedDepthData.depthDataMap);
m_frameDepthQuality = static_cast<uint8_t>(m_arKitFrame.capturedDepthData.depthDataQuality) + static_cast<uint8_t>(m_arKitFrame.capturedDepthData.depthDataAccuracy);
m_depthImage.confidence.data = &m_frameDepthQuality;
m_lockedDepth = true;
}
}
}
return m_depthImage;

View File

@@ -35,7 +35,7 @@ namespace OpenVulkano::AR::ArKit
std::string SupportedVideoFormatsToString(bool frontCam)
{
std::stringstream ss("[ ");
auto vidFormats = frontCam ? [ARFaceTrackingConfiguration supportedVideoFormats] : [ARWorldTrackingConfiguration supportedVideoFormats];
auto vidFormats = [ARWorldTrackingConfiguration supportedVideoFormats];
for (ARVideoFormat* format: vidFormats)
{
if (ss.tellp() > std::streampos(5)) ss << ", ";
@@ -69,13 +69,7 @@ namespace OpenVulkano::AR::ArKit
: m_frameId(0)
{
m_arKitDelegate = [[ArKitDelegate alloc] initWithFrameHandler:this];
if (config.useFrontCamera)
{
ARFaceTrackingConfiguration* arConfig = [ARFaceTrackingConfiguration new];
arConfig.worldTrackingEnabled = true;
m_arConfig = arConfig;
}
else
{
ARWorldTrackingConfiguration* arConfig = [ARWorldTrackingConfiguration new];
if (config.enableDepth)