ตั้งแต่วันที่ 27 มีนาคม 2025 เป็นต้นไป เราขอแนะนำให้ใช้ android-latest-release
แทน aosp-main
เพื่อสร้างและมีส่วนร่วมใน AOSP โปรดดูข้อมูลเพิ่มเติมที่หัวข้อการเปลี่ยนแปลงใน AOSP
โหมด High Dynamic Range
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
การจับภาพ High Dynamic Range (HDR) ในรูปแบบต่างๆ มีอยู่ใน API ของ Camera2
หน้านี้จะอธิบายฟีเจอร์ต่างๆ ความสามารถ และโหมดของ HDR รวมถึงความแตกต่างของฟีเจอร์และความสามารถต่างๆ เหล่านี้ตาม API แต่ละรายการ
การจับภาพนิ่ง HDR
การจับภาพนิ่งใน HDR ประกอบด้วยอัลกอริทึมต่างๆ ที่ช่วยปรับปรุงช่วงไดนามิกของกล้องในอุปกรณ์เคลื่อนที่
สำหรับ Android 13 ขึ้นไป เอาต์พุตกล้อง 10 บิต
capability
จะรองรับเอาต์พุตกล้อง 10 บิต คลาสช่วงไดนามิก HDR
DynamicRangeProfiles
ช่วยให้ไคลเอ็นต์กล้องกำหนดค่าเอาต์พุตของกล้องที่สามารถสร้างเฟรมที่มีรูปแบบพิกเซล 10 บิตจริงและฟังก์ชันการโอน 10 บิตที่เกี่ยวข้อง การกำหนดค่าเอาต์พุตของกล้อง 10 บิตที่ใช้โปรไฟล์ช่วงไดนามิก HDR จะเปิดใช้เฉพาะความลึกของบิตจริงที่ขยาย
การกำหนดค่าเอาต์พุตกล้อง 10 บิตสามารถใช้โหมดต่อไปนี้ร่วมกับโหมดฉาก HDR
- การจับภาพนิ่งแบบไม่บีบอัด 10 บิตโดยใช้รูปแบบพิกเซล P010
- การจับภาพนิ่งที่บีบอัด HDR โดยใช้รูปแบบพิกเซล
JPEG_R
ตามข้อกำหนด Ultra HDR
สำหรับอุปกรณ์ที่ใช้ Android 12 หรือต่ำกว่า วิธีการจับภาพ HDR แบบคงที่จะเกี่ยวข้องกับการประมวลผลเฟรมที่บางครั้งมีการบีบอัดเป็นช่วงไดนามิก 8 บิตมาตรฐาน ต่อไปนี้คือวิธีการจับภาพนิ่ง HDR ที่ระบบจะจับเฟรมหลายเฟรมที่มีระดับการเปิดรับแสงต่างกัน และสร้างผลลัพธ์ HDR สุดท้ายโดยการผสานแต่ละภาพเข้าด้วยกัน
- โหมดฉาก HDR: โหมดนี้จะใช้ที่เลเยอร์ HAL ของกล้อง และลูกค้ากล้องสามารถตั้งค่าได้หากรองรับภายในคำขอจับภาพด้วยกล้องปกติ
- ประเภทส่วนขยาย HDR:
เราขอแนะนำให้ใช้ประเภทส่วนขยายนี้กับฉากที่มีคอนทราสต์สูง ใช้เซสชันการจับภาพที่มีความสามารถจํากัดเมื่อเทียบกับเซสชันการจับภาพปกติ ในอุปกรณ์เครื่องเดียวกัน ส่วนขยายกล้องจะให้ผลลัพธ์ที่มีคุณภาพรูปภาพสูงกว่าคำขอจับภาพปกติ
การบันทึกวิดีโอ HDR
HDR สำหรับวิดีโอจะหมายถึงการจับภาพวิดีโอ HDR (การบันทึกวิดีโอ 10 บิต) เท่านั้น ซึ่งแตกต่างจากการจับภาพนิ่ง HDR
ตัวอย่างเนื้อหาและโค้ดในหน้าเว็บนี้ขึ้นอยู่กับใบอนุญาตที่อธิบายไว้ในใบอนุญาตการใช้เนื้อหา 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,["# High dynamic range modes\n\nVarious forms of high dynamic range (HDR) capture are available in the\n[`Camera2`](https://developer.android.com/reference/android/hardware/camera2/package-summary)\nAPI. This page describes the various features, capabilities, and modes for HDR\nand how they differ depending on the specific API.\n\nHDR still capture\n-----------------\n\nStill capture in HDR encapsulates a variety of algorithms for improving the\ndynamic range of mobile cameras.\n\nFor Android 13 and higher, the 10-bit camera output\n[`capability`](/docs/core/camera/10-bit-camera-output)\nsupports 10-bit camera output. The HDR dynamic range\n[`DynamicRangeProfiles`](https://developer.android.com/reference/android/hardware/camera2/params/DynamicRangeProfiles)\nclass lets camera clients configure camera outputs capable of producing\nframes with actual 10-bit pixel format and corresponding 10-bit transfer\nfunctions. 10-bit camera\n[output configurations](https://developer.android.com/reference/kotlin/android/hardware/camera2/params/OutputConfiguration#setdynamicrangeprofile)\nusing HDR dynamic range profiles enable only the extended physical bit depth.\n10-bit camera output configurations can use the following modes in conjunction\nwith the\n[HDR scene mode](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#CONTROL_SCENE_MODE_HDR):\n\n- 10-bit uncompressed still capture using the [P010](https://developer.android.com/reference/kotlin/android/graphics/ImageFormat#ycbcr_p010) pixel format.\n- HDR compressed still capture using the [`JPEG_R`](https://developer.android.com/reference/kotlin/android/graphics/ImageFormat#jpeg_r) pixel format based on the [Ultra HDR](https://developer.android.com/guide/topics/media/hdr-image-format) specification.\n\nFor devices running Android 12 or lower, HDR still capture methods involve\nprocessing frames that at some point get compressed to the standard 8-bit\ndynamic range. The following are HDR still capture methods where several frames\nwith different exposures are captured and the final HDR result is produced by\nfusing the individual images:\n\n- [HDR scene mode](https://developer.android.com/reference/android/hardware/camera2/CameraMetadata#CONTROL_SCENE_MODE_HDR): This mode is implemented at the camera HAL layer and if supported can be set by camera clients within regular camera capture requests.\n- [HDR extension type](https://developer.android.com/reference/android/hardware/camera2/CameraExtensionCharacteristics#EXTENSION_HDR): This extension type is recommended for high contrast scenes. Uses a capture session with limited capabilities when compared to regular capture sessions. On the same device, camera extensions can produce results with higher image quality than regular capture requests.\n\nHDR video recording\n-------------------\n\nIn contrast to HDR still capture, video HDR refers only to\n[HDR video capture (10-bit video recording)](https://developer.android.com/training/camera2/hdr-video-capture)."]]