ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
การติดตามการเคลื่อนไหว
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ใน Android 9 อุปกรณ์กล้องสามารถโฆษณาความสามารถในการติดตามการเคลื่อนไหว
กล้องที่รองรับฟีเจอร์นี้จะไม่สร้างข้อมูลการติดตามการเคลื่อนไหวเอง แต่จะใช้โดย ARCore หรืออัลกอริทึมระบบกันภาพสั่นร่วมกับเซ็นเซอร์อื่นๆ สำหรับการวิเคราะห์ฉาก อุปกรณ์ต้องรองรับ CONTROL_CAPTURE_INTENT_MOTION_TRACKING
จึงจะใช้ฟีเจอร์นี้ได้
หากความตั้งใจนี้เป็นส่วนหนึ่งของคำขอจับภาพ กล้องต้องจำกัดเวลาการเปิดรับแสงไว้ที่ไม่เกิน 20 มิลลิวินาทีเพื่อลดภาพเบลอจากการเคลื่อนไหว
ตัวอย่างและแหล่งที่มา
การใช้งานการติดตามการเคลื่อนไหวอ้างอิงฝั่ง HAL มีให้ใช้งานเป็นส่วนหนึ่งของ Camera HAL
การใช้งาน
หากต้องการเปิดใช้การติดตามการเคลื่อนไหวในอุปกรณ์กล้อง ให้ตรวจสอบสิ่งต่อไปนี้
การตรวจสอบความถูกต้อง
อุปกรณ์กล้องที่รองรับฟีเจอร์การติดตามการเคลื่อนไหวต้องผ่านการทดสอบ CTS ของกล้อง
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา Java และ OpenJDK เป็นเครื่องหมายการค้าหรือเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-26 UTC
[[["เข้าใจง่าย","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 UTC"],[],[],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)."]]