CameraX 在 1080p 下封盖图像分析的解决方法?
Workaround for CameraX capping image analysis at 1080p?
现代 CameraX API 围绕用例(预览、拍照和图像分析)展开。然而,根据我的观察和文档,ImageAnalysis 似乎任意限制在 1080:
The maximum available resolution that could be selected for an ImageAnalysis is limited to be under 1080p. The limitation of 1080p for ImageAnalysis has considered both performance and quality factors so that users can obtain reasonable quality and smooth output stream under 1080p.
我的图像处理管道需要 1280x720,所以我有点沮丧,因为现在被卡在旧版 Camera2 的狂热中,而且可能无法过渡到这个新的 API。有没有办法绕过这个限制(这似乎是相当新的,我发现许多 CameraX samples 没有这样的限制)或者我可以以某种方式轻松地将 1080x1080 YUV 数据 rescale/pad 到 1280x720 分辨率以满足下一个加入我的处理流程?
最高分辨率为 1920x1080,您可以在该分辨率下定位任何您想要的分辨率。
imageAnalysis = new ImageAnalysis.Builder().setTargetResolution(new Size(720, 1280)).build();
现代 CameraX API 围绕用例(预览、拍照和图像分析)展开。然而,根据我的观察和文档,ImageAnalysis 似乎任意限制在 1080:
The maximum available resolution that could be selected for an ImageAnalysis is limited to be under 1080p. The limitation of 1080p for ImageAnalysis has considered both performance and quality factors so that users can obtain reasonable quality and smooth output stream under 1080p.
我的图像处理管道需要 1280x720,所以我有点沮丧,因为现在被卡在旧版 Camera2 的狂热中,而且可能无法过渡到这个新的 API。有没有办法绕过这个限制(这似乎是相当新的,我发现许多 CameraX samples 没有这样的限制)或者我可以以某种方式轻松地将 1080x1080 YUV 数据 rescale/pad 到 1280x720 分辨率以满足下一个加入我的处理流程?
最高分辨率为 1920x1080,您可以在该分辨率下定位任何您想要的分辨率。
imageAnalysis = new ImageAnalysis.Builder().setTargetResolution(new Size(720, 1280)).build();