sách gpt4 ăn đã đi

iOS;不支持的像素格式

In lại 作者:技术小花猫 更新时间:2023-10-29 10:52:41 25 4
mua khóa gpt4 giày nike

我的 Unity 应用为该应用使用的多个系统使用相机源;例如 Vuforia、ARKit,以及一般的相机输入。

我遇到的问题是,其中每一个都请求不同的像素格式,这似乎会导致 ARKit 出现问题。这需要 YUV,我不知道如何将相机像素格式 native 切换回此格式。所以当我尝试在其他人之后启动 ARKit 时出现此错误;

2017-08-21 08:51:38.749452+0100 ar_app[399:105849] [Sensor] Unsupported pixel format: 875704438

2017-08-21 08:51:38.749876+0100 ar_app[399:105849] [Session] Session did fail with error: Error Domain=com.apple.arkit.error Code=104 "Unsupported capture session configuration."

UserInfo={ NSLocalizedRecoverySuggestion=Make sure that the correct device and format are being used for capture.,

NSLocalizedDescription=Unsupported capture session configuration.,

NSLocalizedFailureReason=Input device and/or format of the provided capture session are not supported for the given configuration. }

至少,这就是我认为的问题;它没有获得 YUV 格式。任何帮助将非常感激。.谢谢。

câu trả lời hay nhất

YUV是一个色彩空间,有多种格式。

ar_app[399:105849] [Sensor] Unsupported pixel format: 875704438

875704438 Chuyển đổi thành 420v ( NV12 ) 或 kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange :

kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange = '420v'

所以你实际上有一个 YUV 像素格式,特别是具有视频范围的双平面。

ARKit tài liệu确实提到了双平面 YUV 格式,但没有提到范围的类型:

The pixel buffer’s contents are encoded in a biplanar YCbCr (also called YUV) data format

但是 Unity ARKit 插件会检查 kCVPixelFormatType_420YpCbCr8BiPlanarFullRangehiện hữu didUpdateFrame :

 if (CVPixelBufferGetPlaneCount(pixelBuffer) < 2 || CVPixelBufferGetPixelFormatType(pixelBuffer) != kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) {
trở lại;
}

所以总而言之,它可能不喜欢它不是全范围的事实,但我没有简单的方法来测试它。如果相机和其他模块支持,也许您可以尝试强制全范围。

关于iOS;不支持的像素格式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45793216/

25 4 0
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress