You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Android 10(API 29)Camera2 API广角相机FOV异常回归问题咨询

Pixel 3 XL Android 10 Dual Front Camera FOV Match Issue

Yes, this is a known behavior change introduced in Android 10 for the Pixel 3 XL's dual front cameras—not a regression bug, but a deliberate system adjustment that’s caught many developers off guard. Let’s break this down:

What’s Causing the FOV Match?

Starting with Android 10, Google modified how the Pixel 3 XL’s logical dual front camera handles output from the wide-angle sensor. By default, the system now crops the wide-angle camera’s feed to match the field of view (FOV) of the regular front camera. This was intended to create a more consistent visual experience when switching between sensors, but it overrides the natural wider FOV you relied on in Android 9.

Have Other Developers Encountered This?

Absolutely. When Android 10 launched, numerous developers using the Camera2 API for dual-camera setups on the Pixel 3 XL reported exactly this issue. It’s a common pain point because code that worked as expected on Android 9 suddenly loses the wide-angle’s signature field of view after the OS update.

How to Restore the Original Wide-Angle FOV

To get back the wider FOV from your wide-angle sensor on Android 10, you need to explicitly configure the physical camera’s output instead of relying on the logical camera’s default settings. Here’s what you can do:

  1. Target Physical Camera Parameters Directly
    When building your CaptureRequest, set parameters specific to each physical camera using their IDs. Use the focal length difference you already detect in your findShortLongCameraPair function to calculate the required zoom ratio for the wide-angle sensor.

    For example, if your regular camera has a focal length of f1 and the wide-angle has f2 (where f2 < f1), the zoom ratio to restore the original wide FOV would be f1 / f2. Apply this to the wide-angle camera’s capture request:

    val wideAngleCameraId = dualCamera.physicalId2 // Adjust based on your pairing logic
    val zoomRatio = focalLengths1.max()!! / focalLengths2.min()!! // From your existing focal length check
    
    val captureRequest = session.device.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW).apply {
        addTarget(surface1) // Regular camera surface
        addTarget(surface2) // Wide-angle camera surface
        // Bind the zoom ratio to the specific wide-angle physical camera
        setPhysicalCameraParameter(wideAngleCameraId, CaptureRequest.CONTROL_ZOOM_RATIO, zoomRatio)
    }.build()
    
  2. Verify Uncropped Output Sizes
    Ensure you’re using output sizes natively supported by the wide-angle camera. The logical camera may force a cropped size by default—check the SCALER_STREAM_CONFIGURATION_MAP for the physical wide-angle camera to get its full-resolution, uncropped output sizes.

  3. Check Zoom Constraints
    Confirm the wide-angle camera’s SCALER_AVAILABLE_MAX_DIGITAL_ZOOM is sufficient to allow your calculated zoom ratio. If not, adjust your output resolution to a size that supports the required FOV.

Key Takeaway

Your original code isn’t broken—Android 10 just applies a default crop to align the two sensors’ outputs. By explicitly targeting physical camera parameters, you can override this default and restore the wide-angle FOV you expect.

内容的提问来源于stack exchange,提问作者Levon Shirakyan

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 11:23:15