jjzjj

depthDataMap

全部标签

ios - 如何从 AVDepthData 缓冲区读取 CGPoint 处的深度数据

我试图在捕获的图像中的某个点找到深度数据,并返回以米为单位的距离。我已启用深度数据并在图像旁边捕获数据。我从图像中心的X、Y坐标(以及按下时)获取点,并使用将其转换为缓冲区索引Int((width-touchPoint.x)*(height-touchPoint.y))WIDTH和HEIGHT是捕获图像的尺寸。不过,我不确定这是否是实现此目标的正确方法。我这样处理深度数据:funchandlePhotoDepthCalculation(point:Int){guardletdepth=self.photoelse{return}////ConvertDisparitytoDepth//

ios - 如何从 AVDepthData 缓冲区读取 CGPoint 处的深度数据

我试图在捕获的图像中的某个点找到深度数据,并返回以米为单位的距离。我已启用深度数据并在图像旁边捕获数据。我从图像中心的X、Y坐标(以及按下时)获取点,并使用将其转换为缓冲区索引Int((width-touchPoint.x)*(height-touchPoint.y))WIDTH和HEIGHT是捕获图像的尺寸。不过,我不确定这是否是实现此目标的正确方法。我这样处理深度数据:funchandlePhotoDepthCalculation(point:Int){guardletdepth=self.photoelse{return}////ConvertDisparitytoDepth//

ios - 如何规范化 iOS 中的视差数据?

在WWDCsession“深度图像编辑”中,他们多次提到normalizedDisparity和normalizedDisparityImage:"Thebasicideaisthatwe'regoingtomapournormalizeddisparityvaluesintovaluesbetween0and1""Soonceyouknowtheminandmaxyoucannormalizethedepthordisparitybetween0and1."我试图首先像这样获得视差图像:letdisparityImage=depthImage.applyingFilter("CIDe

ios - 如何规范化 iOS 中的视差数据?

在WWDCsession“深度图像编辑”中,他们多次提到normalizedDisparity和normalizedDisparityImage:"Thebasicideaisthatwe'regoingtomapournormalizeddisparityvaluesintovaluesbetween0and1""Soonceyouknowtheminandmaxyoucannormalizethedepthordisparitybetween0and1."我试图首先像这样获得视差图像:letdisparityImage=depthImage.applyingFilter("CIDe