自 2025 年 3 月 27 日起,我們建議您使用 android-latest-release
而非 aosp-main
建構及貢獻 AOSP。詳情請參閱「Android 開放原始碼計畫變更」。
動作追蹤
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
在 Android 9 中,攝影機裝置可以宣傳動作追蹤功能。支援這項功能的相機不會自行產生動作追蹤資料,而是由 ARCore 或圖像穩定化演算法與其他感應器搭配使用,用於場景分析。如要支援這項功能,裝置必須支援 CONTROL_CAPTURE_INTENT_MOTION_TRACKING
。如果這項意圖是擷取要求的一部分,相機必須將曝光時間限制在 20 毫秒以下,以減少動作模糊現象。
範例和來源
Camera HAL 會提供 HAL 端的參考動作追蹤實作項目。
實作
如要在攝影機裝置上啟用動作追蹤功能,請確認:
驗證
支援動作追蹤功能的相機裝置必須通過相機 CTS 測試。
這個頁面中的內容和程式碼範例均受《內容授權》中的授權所規範。Java 與 OpenJDK 是 Oracle 和/或其關係企業的商標或註冊商標。
上次更新時間:2025-07-26 (世界標準時間)。
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["缺少我需要的資訊","missingTheInformationINeed","thumb-down"],["過於複雜/步驟過多","tooComplicatedTooManySteps","thumb-down"],["過時","outOfDate","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["示例/程式碼問題","samplesCodeIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-07-26 (世界標準時間)。"],[],[],null,["# Motion tracking\n\nIn Android 9, camera devices can advertise\n[motion tracking capability](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING).\nCameras that support this feature don't produce motion tracking data itself,\nbut instead are used by ARCore or an image-stabilization algorithm along with\nother sensors for scene analysis. To support this feature, devices must support\n[`CONTROL_CAPTURE_INTENT_MOTION_TRACKING`](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#CONTROL_CAPTURE_INTENT_MOTION_TRACKING).\nIf this intent is part of the capture request, the camera must limit the\nexposure time to a maximum of 20 milliseconds to reduce motion blur.\n\nExamples and source\n-------------------\n\nA reference motion tracking implementation on the HAL side is available as part\nof the\n[Camera HAL](https://android.googlesource.com/platform/hardware/qcom/camera/+/android16-release/msm8998/QCamera2/HAL3/QCamera3HWI.cpp).\n\nImplementation\n--------------\n\nTo enable motion tracking on a camera device, make sure:\n\n- The [`ANDROID_REQUEST_AVAILABLE_CAPABILITIES_MOTION_TRACKING`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.3/types.hal#230) capability is enabled.\n- The [`ANDROID_CONTROL_CAPTURE_INTENT_MOTION_TRACKING`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.3/types.hal#206) intent is supported and when included in a capture request limits the camera exposure time to a maximum of 20 milliseconds.\n- Lens calibration data from the following list is accurately reported in the\n static information and dynamic metadata fields:\n\n - [`ANDROID_LENS_POSE_ROTATION`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.2/types.hal#747)\n - [`ANDROID_LENS_POSE_TRANSLATION`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.2/types.hal#753)\n - [`ANDROID_LENS_INTRINSIC_CALIBRATION`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.2/types.hal#773)\n - [`ANDROID_LENS_RADIAL_DISTORTION`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.2/types.hal#780)\n - [`ANDROID_LENS_POSE_REFERENCE`](https://android.googlesource.com/platform/hardware/interfaces/+/android16-release/camera/metadata/3.3/types.hal#78)\n\nValidation\n----------\n\nCamera devices supporting the motion tracking feature must pass the\n[camera CTS tests](/docs/compatibility/cts/camera-hal#cts_tests)."]]