简体   繁体   English

Xamarin.Android:使用 Camera2 > 多摄像头 API 实现缩放用例

[英]Xamarin.Android: Implement Zoom use-case using Camera2 > Multi-camera API

I have tried to implement a Multi-camera API to access a Wide-angle camera but no luck.我试图实现一个多摄像头 API 来访问广角摄像头,但没有运气。 Using the following links, not getting camera Ids on Nokia 7.2, Mi A1, Mi A3, One Plus Nord 2, and Samsung M30s.使用以下链接,在诺基亚 7.2、Mi A1、Mi A3、One Plus Nord 2 和三星 M30s 上未获取相机 ID。

Also, I tried to convert Java source code to Xamarin.Android from listed links but some constants are not found in Xamarin.Android (CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA, CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE).此外,我尝试将 Java 源代码从列出的链接转换为 Xamarin.Android,但在 Xamarin.Android 中找不到一些常量(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA、CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_BACKWARD_COMPATIBLE)。

Kindly provide some documentation/guidance to achieve this or suggest any library.请提供一些文档/指导来实现这一点或建议任何库。

Thanks谢谢

According to this document :根据这份 文件

To determine if the device supports a logical multi camera, you can look at the capabilities of each camera on the device to see if it supports RequestAvailableCapabilitiesLogicalMultiCamera .要确定设备是否支持逻辑多摄像头,您可以查看设备上每个摄像头的功能,看看它是否支持RequestAvailableCapabilitiesLogicalMultiCamera

Android Pie also includes a new SessionConfiguration class that can be used to help reduce delays during initial capture and eliminate the need to start and start the camera stream. Android Pie 还包括一个新的SessionConfiguration 类,可用于帮助减少初始捕获期间的延迟,并消除启动和启动相机流的需要。

For more information about Multi-Camera support in Android P, see Multi-camera support and camera updates.有关 Android P 中的多摄像头支持的更多信息,请参阅多摄像头支持和摄像头更新。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM