หน้านี้แสดงรายการการทดสอบที่ครอบคลุมภายใต้ชุดทดสอบภาพกล้อง (ITS) ซึ่งเป็นส่วนหนึ่งของตัวตรวจสอบชุดทดสอบความเข้ากันได้ของ Android (CTS) การทดสอบ ITS เป็นการทดสอบการทำงาน ซึ่งหมายความว่าไม่ได้วัดคุณภาพของภาพ แต่ฟังก์ชันกล้องที่โฆษณาทั้งหมดทำงานตามที่คาดไว้ เอกสารนี้ช่วยให้นักพัฒนาและผู้ทดสอบเข้าใจถึงสิ่งที่การทดสอบแต่ละรายการทำ และวิธีแก้ไขจุดบกพร่องในการทดสอบที่ล้มเหลว
การทดสอบประตู ITS ของกล้องตามคุณสมบัติของกล้องที่จำเป็น ระดับ API และระดับประสิทธิภาพของสื่อ (MPC) สำหรับระดับ API นั้น ITS จะใช้ ro.product.first_api_level
เพื่อเกตการทดสอบที่เพิ่มในระดับ API เฉพาะที่ทดสอบประสบการณ์ผู้ใช้เชิงลบสำหรับฟังก์ชันการทำงานในระดับ API ที่ต่ำกว่า ITS ใช้ ro.vendor.api_level
เพื่อทดสอบคุณสมบัติที่เพิ่มในระดับ API เฉพาะที่ต้องใช้ความสามารถด้านฮาร์ดแวร์ใหม่ หากมีการกำหนด ro.odm.build.media_performance_class
ไว้สำหรับอุปกรณ์ ITS จำเป็นต้องมีการทดสอบเฉพาะจึงจะรันได้ ทั้งนี้ขึ้นอยู่กับระดับ MPC
การทดสอบจะจัดกลุ่มตามฉากดังนี้:
- scene0 : บันทึกข้อมูลเมตา, ความกระวนกระวายใจ, ไจโรสโคป, การสั่นสะเทือน
- ฉาก 1 : ค่าแสง, ความไวแสง, การชดเชย EV, YUV เทียบกับ JPEG/RAW
- scene2 : การตรวจจับใบหน้า การทดสอบที่ต้องใช้ฉากสีหรือความมืดสนิท
- ฉาก 3 : การปรับปรุงขอบ การเคลื่อนไหวของเลนส์
- ฉาก 4 : อัตราส่วนภาพ, การครอบตัด, ขอบเขตการมองเห็น
- ฉากที่ 5 : การบังแสงของเลนส์
- ฉากที่ 6 : ซูม
- scene_extensions : ส่วนขยายของกล้อง
- sensor_fusion : ชดเชยเวลาของกล้อง/ไจโรสโคป
ดูแต่ละส่วนสำหรับคำอธิบายของแต่ละฉาก
ฉาก0
การทดสอบ Scene0 ไม่จำเป็นต้องมีข้อมูลฉากเฉพาะ อย่างไรก็ตาม โทรศัพท์จะต้องอยู่กับที่เพื่อทดสอบไจโรสโคปและการสั่นสะเทือน
test_burst_capture
ตรวจสอบว่าไปป์ไลน์การดักจับทั้งหมดสามารถตามทันความเร็วของการดักจับขนาดเต็มและเวลาของ CPU
API ที่ทดสอบแล้ว:
ผ่าน: ถ่ายภาพต่อเนื่องเป็นภาพขนาดเต็มและกล้องเร็วพอที่จะหลีกเลี่ยงการหมดเวลา
test_capture_result_dump
ทดสอบว่าผลลัพธ์การจับภาพจะถูกส่งกลับจากการจับภาพด้วยตนเอง แล้วจึงทิ้งข้อมูลนั้น
API ที่ทดสอบแล้ว:
ผ่าน: เสร็จสิ้นการจับภาพและทิ้งผลการจับภาพ
test_gyro_bias
ทดสอบว่าไจโรมีเอาต์พุตที่เสถียรหรือไม่เมื่ออุปกรณ์อยู่กับที่ ข้อมูลถูกพล็อตเป็นจุดข้อมูลโดยเฉลี่ย 20 จุด
API ที่ทดสอบแล้ว:
ผ่าน: เดลต้าของไจโรที่อ่านได้น้อยกว่า 0.01 เมื่อเวลาผ่านไป
test_gyro_bias_plot.png
ทดสอบ_กระวนกระวายใจ
วัดความกระวนกระวายใจในการประทับเวลาของกล้อง
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#SENSOR_TIMESTAMP
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
ผ่าน: มีเดลต้าอย่างน้อย 30 ms ระหว่างเฟรม
test_jitter_plot.png (สังเกตช่วงแกน y เล็ก ๆ จริง ๆ แล้ว Jitter มีขนาดเล็กในพล็อตนี้)
test_metadata
ทดสอบความถูกต้องของรายการข้อมูลเมตา ดูผลการจับภาพและวัตถุลักษณะเฉพาะของกล้อง การทดสอบนี้ใช้การเปิดรับแสง auto_capture_request
และรับค่าเนื่องจากเนื้อหารูปภาพไม่สำคัญ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#INFO_SUPPORTED_HARDWARE_LEVEL
-
android.hardware.camera2.CameraCharacteristics#SCALER_CROPPING_TYPE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_BLACK_LEVEL_PATTERN
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
-
android.hardware.camera2.CaptureRequest#SENSOR_FRAME_DURATION
-
android.hardware.camera2.CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW
ผ่าน: ระดับฮาร์ดแวร์, rollingShutterSkew
, แท็ก frameDuration
, timestampSource
, croppingType
, blackLevelPattern
, pixel_pitch
, FoV, Hyperfocal Distance มีอยู่และมีค่าที่ถูกต้อง
test_param_sensitivity_burst
ทดสอบว่ามีการใช้พารามิเตอร์ android.sensor.sensitivity
อย่างถูกต้องในการถ่ายภาพต่อเนื่อง ตรวจสอบข้อมูลเมตาของเอาต์พุตเท่านั้น
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
ผ่าน: ข้อมูลเอาต์พุตมีความทนทานต่อข้อผิดพลาดน้อยกว่า 0.2%
ทดสอบ_อ่าน_เขียน
ทดสอบว่าอุปกรณ์เขียนค่าแสงที่ถูกต้องและรับค่าโดยการอ่านกลับข้อมูลเมตาของการจับภาพ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_EXPOSURE_TIME_RANGE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureResult#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureResult#SENSOR_SENSITIVITY
ผ่าน: ค่าอ่านและเขียนตรงกันในทุกช็อต
test_sensor_เหตุการณ์
ทดสอบว่าอุปกรณ์ค้นหาและพิมพ์เหตุการณ์เซ็นเซอร์สำหรับอุปกรณ์ที่โฆษณาการรองรับการรวมเซ็นเซอร์ เซ็นเซอร์ที่คาดหวัง ได้แก่ มาตรความเร่ง ไจโรสโคป และแมกนีโตมิเตอร์ การทดสอบนี้จะใช้งานได้เฉพาะเมื่อหน้าจอเปิดอยู่ ซึ่งหมายความว่าอุปกรณ์ไม่อยู่ในโหมดสแตนด์บาย
API ที่ทดสอบแล้ว:
ผ่าน: ได้รับเหตุการณ์สำหรับเซ็นเซอร์แต่ละตัว
test_solid_color_test_pattern
ทดสอบว่ารูปแบบการทดสอบสีทึบถูกสร้างขึ้นอย่างเหมาะสมสำหรับการปิดเสียงกล้อง หากรองรับการปิดเสียงกล้อง จะต้องรองรับรูปแบบการทดสอบสีทึบ หากไม่รองรับการปิดเสียงกล้อง รูปแบบการทดสอบสีทึบจะถูกทดสอบเมื่อมีการโฆษณาความสามารถไว้เท่านั้น
หากรองรับภาพ RAW จะมีการทดสอบการกำหนดสีด้วย สีที่ทดสอบคือ สีดำ สีขาว สีแดง สีน้ำเงิน และสีเขียว สำหรับกล้องที่ไม่รองรับภาพ RAW จะมีการทดสอบเฉพาะสีดำเท่านั้น
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristic#SENSOR_AVAILABLE_TEST_PATTERN_MODES
-
android.hardware.camera2.CaptureResult#SENSOR_TEST_PATTERN_DATA
-
android.hardware.camera2.CaptureResult#SENSOR_TEST_PATTERN_MODE
ผ่าน: รูปแบบการทดสอบทึบที่รองรับคือสีที่ถูกต้อง และมีความแปรปรวนต่ำในภาพ
test_test_รูปแบบ
ทดสอบพารามิเตอร์ android.sensor.testPatternMode
เพื่อจับภาพเฟรมสำหรับรูปแบบการทดสอบที่ถูกต้องแต่ละรูปแบบ และตรวจสอบว่าเฟรมถูกสร้างขึ้นอย่างถูกต้องสำหรับสีทึบและแถบสี การทดสอบนี้มีขั้นตอนต่อไปนี้:
- จับภาพสำหรับรูปแบบการทดสอบที่รองรับทั้งหมด
- ดำเนินการตรวจสอบความถูกต้องอย่างง่ายสำหรับรูปแบบการทดสอบสีทึบและแถบสี
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristic#SENSOR_AVAILABLE_TEST_PATTERN_MODES
-
android.hardware.camera2.CaptureResult#SENSOR_TEST_PATTERN_MODE
ผ่าน: รูปแบบการทดสอบที่รองรับถูกสร้างขึ้นอย่างถูกต้อง
test_test_patterns_2.jpg
test_tonemap_curve
ทดสอบการแปลงรูปแบบการทดสอบจาก RAW เป็น YUV ด้วยโทนแมปเชิงเส้น การทดสอบนี้ต้องใช้ android.sensor.testPatternMode = 2
(COLOR_BARS) เพื่อสร้างรูปแบบภาพที่สมบูรณ์แบบสำหรับการแปลงโทนแมป ตรวจสอบให้แน่ใจว่าไปป์ไลน์มีเอาต์พุตสีที่เหมาะสมพร้อมโทนแมปเชิงเส้นและอินพุตรูปภาพในอุดมคติ (อาศัย test_test_patterns
)
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#DISTORTION_CORRECTION_MODE
-
android.hardware.camera2.CaptureRequest#SENSOR_TEST_PATTERN_MODE
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
ผ่าน: YUV และ RAW มีลักษณะคล้ายกัน
test_tonemap_curve_raw_2.jpg
test_tonemap_curve_yuv_2.jpg
test_unified_timestamp
ทดสอบว่าเหตุการณ์เซ็นเซอร์ภาพและการเคลื่อนไหวอยู่ในโดเมนเวลาเดียวกันหรือไม่
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#SENSOR_TIMESTAMP
-
android.hardware.Sensor
-
android.hardware.SensorEvent
-
android.hardware.Sensor#TYPE_ACCELEROMETER
-
android.hardware.Sensor#TYPE_GYROSCOPE
ผ่าน: การประทับเวลาการเคลื่อนไหวอยู่ระหว่างการประทับเวลาของรูปภาพทั้งสอง
ทดสอบ_การสั่นสะเทือน_ข้อจำกัด
ทดสอบว่าการสั่นสะเทือนของอุปกรณ์ทำงานตามที่คาดไว้หรือไม่
API ที่ทดสอบแล้ว:
-
android.hardware.Sensor
-
android.hardware.SensorEvent
-
android.hardware.Sensor#TYPE_ACCELEROMETER
-
android.os.Vibrator
-
android.hardware.camera2.CameraDevice#setCameraAudioRestriction
ผ่าน: อุปกรณ์ไม่สั่นเมื่อปิดเสียงโดย API การจำกัดเสียงของกล้อง
ฉาก1
Scene1 เป็นแผนภูมิสีเทา แผนภูมิสีเทาต้องครอบคลุมจุดศูนย์กลาง 30% ของขอบเขตการมองเห็นของกล้อง แผนภูมิสีเทาคาดว่าจะท้าทาย 3A (การเปิดรับแสงอัตโนมัติ สมดุลสีขาวอัตโนมัติ โฟกัสอัตโนมัติ) ในระดับปานกลาง เนื่องจากบริเวณกึ่งกลางไม่มีคุณสมบัติใดๆ อย่างไรก็ตาม คำขอจับภาพจะระบุฉากทั้งหมดซึ่งรวมถึงคุณสมบัติที่เพียงพอสำหรับ 3A ที่จะมาบรรจบกัน
สามารถทดสอบกล้อง RFoV ใน WFaV หรือแท่นทดสอบ RFoV ได้ หากมีการทดสอบกล้อง RFoV ในแท่นทดสอบ WFaV แผนภูมิจะถูกปรับขนาดเป็น ⅔ เพื่อให้แน่ใจว่าขอบเขตบางประการสำหรับแผนภูมิสีเทาใน FoV เพื่อช่วยให้ 3A มาบรรจบกัน สำหรับคำอธิบายโดยละเอียดเพิ่มเติมเกี่ยวกับแท่นทดสอบกล้อง โปรดดูที่ Camera ITS-in-a-box
ฉากที่ 1: ตารางขนาดเต็ม (ซ้าย) ⅔ แผนภูมิมาตราส่วน (ขวา)
ทดสอบ_3a
ทดสอบการบรรจบกันของ 3A กับเป้าหมายที่ท้าทายปานกลาง
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
ผ่าน: 3A มาบรรจบกันและค่า 3A ที่ส่งคืนนั้นถูกต้อง
test_ae_af
ทดสอบอัลกอริธึมการรับแสงอัตโนมัติ 3A (AE) และโฟกัสอัตโนมัติ (AF) แยกกัน
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
ผ่าน: 3A มาบรรจบกันและค่า 3A ที่ส่งคืนนั้นถูกต้องตามกฎหมาย
test_ae_precapture_trigger
ทดสอบเครื่องสถานะ AE เมื่อใช้ทริกเกอร์จับภาพล่วงหน้า บันทึกคำขอด้วยตนเองห้าคำขอโดยปิดใช้งาน AE คำขอสุดท้ายมีทริกเกอร์การจับภาพล่วงหน้าของ AE ซึ่งควรละเว้นเนื่องจาก AE ถูกปิดใช้งาน
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
-
android.hardware.camera2.CaptureResult#CONTROL_AE_STATE
ผ่าน: AE มาบรรจบกัน
test_auto_vs_manual
การทดสอบที่ถ่ายแบบอัตโนมัติและแบบแมนนวลจะมีลักษณะเหมือนกัน
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_GAINS
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_TRANSFORM
-
android.hardware.camera2.CaptureResult#TONEMAP_CURVE
-
android.hardware.camera2.CaptureResult#TONEMAP_MODE
ผ่าน: การเพิ่มไวต์บาลานซ์แบบแมนนวลและการแปลงที่รายงานในผลการจับภาพแต่ละรายการจะตรงกับ estimate
ไวต์บาลานซ์อัตโนมัติจากอัลกอริธึม 3A ของกล้อง
test_auto_vs_manual_auto.jpg
test_auto_vs_manual_wb.jpg
test_auto_vs_manual_manual_wb_tm.jpg
test_black_white
ทดสอบว่าอุปกรณ์สร้างภาพขาวดำที่สมบูรณ์ ถ่ายภาพสองครั้ง ภาพแรกให้อัตราขยายและการเปิดรับแสงที่ต่ำมาก ซึ่งส่งผลให้ได้ภาพสีดำ และภาพที่สองที่มีอัตราขยายสูงและค่ารับแสงที่นานมาก ซึ่งส่งผลให้ได้ภาพสีขาว
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
ผ่าน: สร้างภาพขาวดำ ช่องสัญญาณอิ่มตัวของภาพสีขาวมีค่า RGB ที่ [255, 255, 255] โดยมีความคลาดเคลื่อนต่างกันน้อยกว่า 1%
![]() | ![]() | |
test_black_white_black.jpg | test_black_white_white.jpg |
test_black_white_plot_means.png
test_burst_sameness_manual
ถ่ายภาพต่อเนื่อง 5 ภาพจาก 50 ภาพด้วยการตั้งค่าการถ่ายภาพแบบแมนนวล และตรวจสอบว่าภาพเหมือนกันทุกภาพ การทดสอบนี้สามารถใช้เพื่อระบุว่ามีเฟรมประปรายที่ได้รับการประมวลผลแตกต่างออกไปหรือมีอาร์ทิแฟกต์หรือไม่
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
-
android.hardware.camera2.CameraMetadata#SYNC_MAX_LATENCY_PER_FRAME_CONTROL
ผ่าน: รูปภาพจะเหมือนกันทั้งทางสายตาและในค่า RGB
ล้มเหลว: แสดงการเพิ่มขึ้นหรือลดลงของแผนภูมิค่าเฉลี่ย RGB ที่จุดเริ่มต้นของการระเบิดแต่ละครั้ง
- ความอดทนคือ 3% สำหรับ
first_API_level
< 30 - ความคลาดเคลื่อนคือ 2% สำหรับ
first_API_level
>= 30
test_burst_sameness_manual_mean.jpg
test_burst_sameness_manual_plot_means.png
test_capture_result
ทดสอบว่าข้อมูลที่ถูกต้องกลับมาในออบเจ็กต์ CaptureResult
ทำการจับภาพอัตโนมัติ แมนนวล และอัตโนมัติ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_REGIONS
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_REGIONS
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_REGIONS
-
android.hardware.camera2.CaptureRequest#CONTROL_MODE
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_GAINS
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_TRANSFORM
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_MODE
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
-
android.hardware.camera2.CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
ผ่าน: ข้อมูลเมตาใช้ได้กับการบันทึกทั้งหมด และการตั้งค่าด้วยตนเองจะไม่รั่วไหลไปสู่การบันทึกอัตโนมัติครั้งที่สอง แสดงการแก้ไขแสงเงาของเลนส์สำหรับการถ่ายภาพ
test_capture_result_plot_lsc_auto_ch0.png
test_crop_region_raw
ทดสอบว่าสตรีม RAW ไม่สามารถครอบตัดได้
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CaptureResult#SCALER_CROP_REGION
-
android.hardware.camera2.CaptureRequest#SCALER_CROP_REGION
ผ่าน: ภาพ YUV จะถูกครอบตัดตรงกลาง แต่ไม่ใช่ภาพ RAW
test_crop_region_raw_comp_raw_crop.jpg
test_crop_region_raw_comp_raw_full.jpg
test_crop_region_raw_comp_yuv_crop.jpg
test_crop_region_raw_yuv_full.jpg
test_crop_regions
ทดสอบว่าพื้นที่เพาะปลูกทำงานอย่างไร ถ่ายภาพเต็มและสร้างแพตช์ของ 5 ภูมิภาคที่แตกต่างกัน (มุมและกึ่งกลาง) ถ่ายภาพโดยตั้งค่าครอบตัดสำหรับ 5 ภูมิภาค เปรียบเทียบแพตช์และค่าครอบตัดรูปภาพ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CaptureRequest#SCALER_CROP_REGION
ผ่าน: รูปภาพของขอบเขตที่ครอบตัดตรงกับแพตช์ที่สอดคล้องกับรูปภาพครอบตัด
test_dng_noise_model
ตรวจสอบว่าพารามิเตอร์โมเดลดิบของ DNG ถูกต้อง โครงเรื่องแสดงให้เห็นถึงความแปรปรวนที่วัดได้ของจุดกึ่งกลางของการ์ดสีเทาในช็อตดิบที่ถ่ายในช่วงความไว และเปรียบเทียบค่าเหล่านี้กับความแปรปรวนที่คาดหวังที่ความไวแต่ละอย่างโดยโมเดลสัญญาณรบกวน DNG ในกล้อง HAL (ขึ้นอยู่กับ พารามิเตอร์ O,S ส่งคืนในออบเจ็กต์ผลลัพธ์การจับภาพ) สำหรับรายละเอียดเพิ่มเติมเกี่ยวกับแบบจำลองสัญญาณรบกวน DNG ให้ดาวน์โหลดเอกสารต่อไปนี้เกี่ยวกับ แบบจำลองสัญญาณรบกวน DNG
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
-
android.hardware.camera2.CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
-
android.hardware.camera2.CaptureResult#SENSOR_NOISE_PROFILE
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
ผ่าน: พารามิเตอร์โมเดลดิบของ DNG ถูกต้อง ค่า RGB ที่คาดหวังจะตรงกับค่า RGB จริงที่วัดได้
test_dng_noise_model_plog.png
test_ev_compensation_advanced
ทดสอบว่ามีการใช้การชดเชยค่าแสง (EV) หรือไม่ การทดสอบจะเพิ่มการรับแสงในแปดขั้นตอน และตรวจสอบความสว่างที่วัดได้เทียบกับความสว่างที่คาดหวัง ค่าที่คาดหวังจะคำนวณจากความสว่างภาพของภาพโดยไม่มีการชดเชย EV และค่าที่คาดหวังจะอิ่มตัวหากค่าที่คำนวณเกินช่วงค่าของภาพจริง การทดสอบล้มเหลวหากค่าที่คาดหวังและค่าที่วัดได้ไม่ตรงกันหรือภาพได้รับแสงมากเกินไปภายในห้าขั้นตอน
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_LOCK
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_LOCK
-
android.hardware.camera2.CaptureResult#CONTROL_AE_STATE
-
android.hardware.camera2.CaptureResult#TONEMAP_CURVE
-
android.hardware.camera2.CaptureResult#TONEMAP_MODE
ผ่าน: รูปภาพแสดงการเปิดรับแสงที่เพิ่มขึ้นโดยไม่เปิดรับแสงมากเกินไปภายในห้าขั้นตอน
test_ev_compensation_advanced_plot_means.png
test_ev_compensation_basic
ทดสอบว่ามีการชดเชย EV โดยใช้ช่วงที่สร้างด้วย CONTROL_AE_COMPENSATION_STEP
แปดเฟรมจะถูกบันทึกในแต่ละค่าการชดเชย
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AE_COMPENSATION_STEP
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_EXPOSURE_COMPENSATION
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_LOCK
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_LOCK
-
android.hardware.camera2.CaptureResult#CONTROL_AE_EXPOSURE_COMPENSATION
-
android.hardware.camera2.CaptureResult#CONTROL_AE_STATE
ผ่าน: ถ่ายภาพลูมาที่เพิ่มขึ้นด้วยการตั้งค่าการชดเชย EV ที่เพิ่มขึ้น และแปดเฟรมที่บันทึกสำหรับการตั้งค่าการชดเชย EV แต่ละรายการจะมีค่าลูม่าที่คงที่
test_ev_compensation_basic.png
ทดสอบ_แสง
ทดสอบว่าได้ค่าแสงคงที่โดยค่า ISO และเวลาเปิดรับแสงจะแตกต่างกันไป ถ่ายภาพชุดโดยเลือก ISO และเวลาเปิดรับแสงเพื่อปรับสมดุลระหว่างกัน ผลลัพธ์ควรมีความสว่างเท่ากัน แต่ในลำดับภาพควรมีนอยส์มากขึ้น ตรวจสอบว่าค่าเฉลี่ยพิกเซลตัวอย่างอยู่ใกล้กัน ตรวจสอบให้แน่ใจว่ารูปภาพไม่ได้ถูกบีบให้อยู่ที่ 0 หรือ 1 (ซึ่งจะทำให้รูปภาพดูเหมือนเส้นแบน) การทดสอบยังสามารถดำเนินการกับภาพ RAW ได้ด้วยการตั้งค่าสถานะ debug
ในไฟล์การกำหนดค่าของคุณ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
ผ่าน: รูปภาพมีความสว่างเท่ากัน แต่จะนอยส์กว่าด้วยค่า ISO ที่สูงกว่า ระนาบ RGB จะแบนราบเมื่อค่า การรับแสง ISO* คงที่เหนือพื้นที่เกนที่ทดสอบ
test_exposure_plot_means.png
![]() | ![]() | |
test_exposure_mult=1.00.jpg | test_exposure_mult=64.00.jpg |
ทดสอบ_jpeg
การทดสอบที่แปลงรูปภาพ YUV และรูปภาพ JPEG ของอุปกรณ์จะมีลักษณะเหมือนกัน การทดสอบใช้จุดศูนย์กลาง 10% ของรูปภาพและคำนวณค่า RGB และตรวจสอบว่าตรงกัน
API ที่ทดสอบแล้ว:
ผ่าน: ความแตกต่าง RGB โดยเฉลี่ยระหว่างแต่ละภาพน้อยกว่า 3%
![]() | ![]() | |
test_jpeg_fmt=jpg.jpg | test_jpeg=fmt=yuv.jpg |
test_latching
ทดสอบว่าการตั้งค่า (การรับแสงและอัตราขยาย) ล็อคบนเฟรมด้านขวาสำหรับกล้อง FULL
และ LEVEL_3
ถ่ายภาพเป็นชุดโดยใช้คำขอแบบหันหลังชนกัน โดยเปลี่ยนพารามิเตอร์คำขอจับภาพระหว่างช็อตต่างๆ ตรวจสอบว่ารูปภาพมีคุณสมบัติตามที่คาดหวัง
API ที่ทดสอบแล้ว:
ผ่าน: รูปภาพ [2, 3, 6, 8, 10, 12, 13] ได้เพิ่ม ISO หรือค่าแสง และแสดงด้วยวิธี RGB ที่สูงขึ้นใน test_latching_plot_means.png
![]() | ![]() | ![]() | |
test_latching_i=00.jpg | test_latching_i=01.jpg | test_latching_i=02.jpg | |
![]() | ![]() | ![]() | |
test_latching_i=03.jpg | test_latching_i=04.jpg | test_latching_i=05.jpg | |
![]() | ![]() | ![]() | |
test_latching_i=06.jpg | test_latching_i=07.jpg | test_latching_i=08.jpg | |
![]() | ![]() | ![]() | |
test_latching_i=09.jpg | test_latching_i=10.jpg | test_latching_i=11.jpg | |
![]() | |||
test_latching_i=12.jpg |
test_latching_plot_means.png
ทดสอบ_ความเป็นเชิงเส้น
ทดสอบว่าการประมวลผลอุปกรณ์สามารถแปลงเป็นพิกเซลเชิงเส้นได้ จับภาพต่อเนื่องกันโดยอุปกรณ์ชี้ไปที่เป้าหมายที่สม่ำเสมอ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CaptureRequest#BLACK_LEVEL_LOCK
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
ผ่าน: ค่า R, G, B จะต้องเพิ่มขึ้นเชิงเส้นโดยมีความไวเพิ่มขึ้น
test_linearity_plot_means.png
test_locked_burst
ทดสอบการล็อค 3A และการระเบิด YUV (โดยใช้การตั้งค่าอัตโนมัติ) การทดสอบนี้ได้รับการออกแบบมาให้ผ่านการทดสอบแม้ในอุปกรณ์จำนวนจำกัดที่ไม่มี MANUAL_SENSOR
หรือ PER_FRAME_CONTROLS
การทดสอบจะตรวจสอบความสอดคล้องของภาพ YUV ในขณะที่การตรวจสอบอัตราเฟรมอยู่ใน CTS
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_LOCK
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_LOCK
ผ่าน: การจับภาพดูสม่ำเสมอ
test_locked_burst_frame0.jpg
test_locked_burst_frame1.jpg
test_locked_burst_frame2.jpg
test_param_color_correction
ทดสอบว่ามีการใช้พารามิเตอร์ android.colorCorrection.*
เมื่อตั้งค่า ถ่ายภาพด้วยการแปลงที่แตกต่างกันและเพิ่มค่า และทดสอบว่าภาพเหล่านั้นดูแตกต่างกันตามนั้น การแปลงและเกนถูกเลือกเพื่อทำให้เอาต์พุตเป็นสีแดงหรือสีน้ำเงินมากขึ้น ใช้โทนแมปเชิงเส้น การทำแผนที่โทนสีเป็นเทคนิคที่ใช้ในการประมวลผลภาพเพื่อจับคู่สีชุดหนึ่งกับอีกชุดหนึ่ง เพื่อประมาณลักษณะที่ปรากฏของภาพที่มีช่วงไดนามิกสูงในตัวกลางที่มีช่วงไดนามิกที่จำกัดมากขึ้น
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_GAINS
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_MODE
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_TRANSFORM
ผ่าน: ค่า R และ B จะเพิ่มขึ้นตามการเปลี่ยนแปลง
test_param_color_correction_plot_means.png
*แกน x คือคำขอจับภาพ: 0 = เอกภาพ, 1= บูสต์สีแดง, 2= บูสต์สีน้ำเงิน
test_param_color_correction_req=0.jpg
test_param_color_correctness_req=1.jpg (เพิ่ม R)
test_param_color_correction_req=2.jpg (เพิ่ม B)
test_param_exposure_time
ทดสอบว่ามีการใช้พารามิเตอร์ android.sensor.exposureTime
หรือไม่
API ที่ทดสอบแล้ว:
ผ่าน: แต่ละช็อตจะสว่างกว่าช็อตก่อนหน้า
test_param_exposure_time_frame0.jpg
test_param_exposure_time_plot.png
test_param_flash_mode
ทดสอบว่ามีการใช้พารามิเตอร์ android.flash.mode
ตั้งค่าการเปิดรับแสงด้วยตนเองให้เป็นด้านมืด เพื่อให้ชัดเจนว่ายิงแฟลชหรือไม่ และใช้โทนแมปเชิงเส้น ตรวจสอบตรงกลางด้วยภาพย่อยเพื่อดูว่ามีการไล่ระดับสีขนาดใหญ่ที่สร้างขึ้นเพื่อตรวจสอบว่ามีการยิงแฟลชหรือไม่
API ที่ทดสอบแล้ว:
ผ่าน: กึ่งกลางของภาพย่อยมีการไล่ระดับสีขนาดใหญ่ หมายความว่ายิงแฟลช
test_param_flash_mode_1.jpg
test_param_flash_mode_1_tile.jpg
test_param_flash_mode_2.jpg
test_param_flash_mode_2_tile.jpg
test_param_noise_reduction
ทดสอบว่าพารามิเตอร์ android.noiseReduction.mode
ถูกนำไปใช้อย่างถูกต้องเมื่อตั้งค่า ถ่ายภาพด้วยกล้องที่มีแสงสลัว ใช้เกนแบบอะนาล็อกที่สูงเพื่อให้แน่ใจว่าภาพที่ถ่ายจะมีสัญญาณรบกวน ถ่ายภาพสามภาพ สำหรับปิด NR, "เร็ว" และ "คุณภาพสูง" นอกจากนี้ยังจับภาพที่มีเกนต่ำและปิด NR และใช้ความแปรปรวนของสิ่งนี้เป็นพื้นฐาน ยิ่ง SNR (อัตราส่วนสัญญาณต่อสัญญาณรบกวน) สูงเท่าไร คุณภาพของภาพก็จะยิ่งดีขึ้นเท่านั้น
API ที่ทดสอบแล้ว:
ผ่าน: SNR จะแตกต่างกันไปตามโหมดการลดเสียงรบกวนที่แตกต่างกัน และมีลักษณะการทำงานคล้ายกับกราฟด้านล่าง
test_param_noise_reduction_plot_SNRs.png
0: ปิด, 1: เร็ว, 2: HQ, 3: นาที , 4: ZSL
test_param_noise_reduction_high_gain_nr=0.jpg
test_param_noise_reduction_high_gain_nr=1.jpg
test_param_noise_reduction_high_gain_nr=2.jpg
test_param_noise_reduction_high_gain_nr=3.jpg
test_param_noise_reduction_low_gain.jpg
test_param_sensitivity
ทดสอบว่ามีการใช้พารามิเตอร์ android.sensor.sensitivity
การทดสอบจะเพิ่มความไวใน 5 ขั้นตอนโดยมีค่าแสงคงที่สำหรับแต่ละช็อต
API ที่ทดสอบแล้ว:
ผ่าน: ค่า RGB ที่กึ่งกลางจะสว่างขึ้น 10% พร้อมความไวที่เพิ่มขึ้น
test_param_sensitivity_iso=0055.jpg
test_param_sensitivity_iso=1819.jpg
test_param_sensitivity_iso=3583.jpg
test_param_sensitivity_iso=5347.jpg
test_param_sensitivity_iso=7111.jpg
test_param_sensitivity_plot.png
test_param_shading_mode
ทดสอบว่ามีการใช้พารามิเตอร์ android.shading.mode
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#SHADING_MODE
-
android.hardware.camera2.CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
-
android.hardware.camera2.CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
ผ่าน: เปลี่ยนโหมดแรเงาและแผนที่แรเงาของเลนส์ได้รับการแก้ไขตามที่คาดไว้
test_param_shading_mode_ls_maps_mode_0_loop_0.png
test_param_shading_mode_ls_maps_mode_1_loop_0.png
test_param_shading_mode_ls_maps_mode_2_loop_0.png
test_param_tonemap_mode
ทดสอบว่ามีการใช้พารามิเตอร์ android.tonemap.mode ใช้เส้นโค้งโทนแมปที่แตกต่างกันกับแต่ละช่อง R, G, B และตรวจสอบว่าภาพที่ส่งออกได้รับการแก้ไขตามที่คาดไว้ การทดสอบนี้ประกอบด้วยการทดสอบสองแบบ คือ การทดสอบ 1 และการทดสอบ 2
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraMetadata#TONEMAP_MODE_CONTRAST_MODE
-
android.hardware.camera2.CameraMetadata#TONEMAP_MODE_FAST
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
ผ่าน:
- test1: รูปภาพทั้งสองมีแผนผังโทนเชิงเส้น แต่ n=1 มีการไล่ระดับสีที่ชันกว่า ช่อง G (สีเขียว) จะสว่างกว่าสำหรับภาพ n=1
- test2: tonemap เดียวกัน แต่ความยาวต่างกัน รูปภาพก็เหมือนกัน
![]() | ![]() | |
test_param_tonemap_mode_n=0.jpg | test_param_tonemap_mode_n=1.jpg |
ทดสอบ_post_raw_sensitivity_boost
ตรวจสอบการเพิ่มความไวของโพสต์ RAW จับภาพชุดภาพ RAW และ YUV ด้วยความไวที่แตกต่างกัน โพสต์การผสมผสานการเพิ่มความไวของ RAW และตรวจสอบว่าค่าเฉลี่ยพิกเซลเอาต์พุตตรงกับการตั้งค่าคำขอหรือไม่
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_POST_RAW_SENSITIVITY_BOOST_RANGE
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
-
android.hardware.camera2.CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
ผ่าน: ภาพ RAW จะมืดลงเมื่อบูสต์เพิ่มขึ้น ในขณะที่ภาพ YUV จะมีความสว่างคงที่
test_post_raw_sensitivity_boost_raw_s=3583_boost=0100.jpg
test_post_raw_sensitivity_boost_raw_s=1792_boost=0200.jpg
test_post_raw_sensitivity_boost_raw_s=0896_boost=0400.jpg
test_post_raw_sensitivity_boost_raw_s=0448_boost=0800.jpg
test_post_raw_sensitivity_boost_raw_s=0224_boost=1600.jpg
test_post_raw_sensitivity_boost_raw_s=0112_boost=3199.jpg
test_post_raw_sensitivity_boost_raw_plot_means.png
test_post_raw_sensitivity_boost_yuv_s=0112_boost=3199.jpg
test_post_raw_sensitivity_boost_yuv_s=0448_boost=0800.jpg
test_post_raw_sensitivity_boost_yuv_s=0896_boost=0400.jpg
test_post_raw_sensitivity_boost_yuv_s=1792_boost=0200.jpg
test_post_raw_sensitivity_boost_yuv_s=3585_boost=0100.jpg
test_post_raw_sensitivity_boost_yuv_plot_means.png
test_raw_burst_sensitivity
จับภาพชุดภาพดิบโดยเพิ่มเกนและวัดสัญญาณรบกวน จับภาพแบบดิบเท่านั้นในการถ่ายภาพต่อเนื่อง
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
-
android.hardware.camera2.CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
ส่งผ่าน: แต่ละช็อตจะมีเสียงดังกว่าช็อตก่อนหน้า เนื่องจากได้รับเพิ่มขึ้น
ใช้ความแปรปรวนของเซลล์ตารางสถิติตรงกลาง
test_raw_burst_sensitivity_variance.png
test_raw_exposure
จับภาพชุดภาพดิบโดยเพิ่มเวลารับแสงและวัดค่าพิกเซล
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
ผ่าน: การเพิ่ม ISO (เกน) จะทำให้พิกเซลมีความไวต่อแสงมากขึ้น ดังนั้นโครงเรื่องจึงเคลื่อนไปทางซ้าย
test_raw_exposure_s=55.png
(10⁰ คือ 1 ms, 10¹ คือ 10 ms, 10⁻¹ คือ 0.1 ms)
test_raw_exposure_s=132.png
test_raw_exposure_s=209.png
test_raw_exposure_s=286.png
test_raw_exposure_s=363.png
test_raw_exposure_s=440.png
test_raw_sensitivity
จับภาพชุดภาพ Raw ด้วยความไวแสงที่เพิ่มขึ้น และวัดสัญญาณรบกวน (ความแปรปรวน) ที่อยู่ตรงกลาง 10% ของภาพ ทดสอบว่าแต่ละช็อตมีเสียงรบกวนมากกว่าครั้งก่อน
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_PRE_CORRECTION_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_WHITE_LEVEL
-
android.hardware.camera2.CameraCharacteristics#SENSOR_MAX_ANALOG_SENSITIVITY
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
ผ่าน: ความแปรปรวนเพิ่มขึ้นในแต่ละช็อต
test_raw_sensitivity_variance.png
test_reprocess_noise_reduction
ทดสอบว่าใช้ android.noiseReduction.mode
สำหรับการประมวลผลคำขอซ้ำ จับภาพที่ประมวลผลใหม่ด้วยกล้องที่มีแสงสลัว ใช้เกนแบบอะนาล็อกที่สูงเพื่อให้แน่ใจว่าภาพที่ถ่ายจะมีสัญญาณรบกวน จับภาพที่ประมวลผลซ้ำสามภาพ สำหรับปิด NR, "เร็ว" และ "คุณภาพสูง" จับภาพที่ประมวลผลใหม่โดยมีค่าเกนต่ำและปิด NR และใช้ค่าความแปรปรวนเป็นค่าพื้นฐาน
API ที่ทดสอบแล้ว:
ผ่าน: เร็ว >= ปิด, HQ >= เร็ว, HQ >> ปิด
พล็อต SNR ทั่วไปเทียบกับ NR_MODE
test_tonemap_sequence
ทดสอบลำดับช็อตด้วยกราฟโทนแมปที่แตกต่างกัน ถ่ายภาพแบบแมนนวล 3 ภาพด้วยโทนแมปเชิงเส้น ถ่ายภาพแบบแมนนวล 3 ภาพด้วยโทนแมปเริ่มต้น คำนวณเดลต้าระหว่างแต่ละคู่เฟรมที่ต่อเนื่องกัน
API ที่ทดสอบแล้ว:
ผ่าน: มี 3 เฟรมที่เหมือนกัน ตามด้วยชุดที่แตกต่างกัน 3 เฟรมที่เหมือนกัน
test_tonemap_sequence_i=0.jpg
test_tonemap_sequence_i=1.jpg
test_tonemap_sequence_i=2.jpg
test_tonemap_sequence_i=3.jpg
test_tonemap_sequence_i=4.jpg
test_tonemap_sequence_i=5.jpg
test_yuv_jpeg_all
ทดสอบว่าขนาดและรูปแบบที่รายงานทั้งหมดสำหรับงานจับภาพ ใช้คำขอด้วยตนเองกับ tonemap เชิงเส้นเพื่อให้ YUV และ JPEG มีลักษณะเหมือนกันเมื่อแปลงโดยโมดูล image_processing_utils
รูปภาพไม่ได้รับการบันทึกตามค่าเริ่มต้น แต่สามารถบันทึกได้โดยเปิดใช้งาน debug_mode
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
-
android.graphics.ImageFormat#JPEG
ผ่าน: ศูนย์กลางภาพทั้งหมดมีความแตกต่าง RMS สูงสุด (ค่าราก-ค่าเฉลี่ย-กำลังสองของสัญญาณ) ในภาพที่แปลง RGB ด้วย 3% ของภาพ YUV ที่มีความละเอียดสูงสุด
test_yuv_jpeg_all.png
test_yuv_plus_dng
ทดสอบว่าขนาดและรูปแบบที่รายงานสำหรับงานจับภาพ
API ที่ทดสอบแล้ว:
ผ่าน: การทดสอบเสร็จสิ้นและส่งคืนรูปภาพที่ร้องขอ
test_yuv_plus_dng.jpg
test_yuv_plus_jpeg
ทดสอบการจับเฟรมเดียวเป็นทั้งเอาต์พุต YUV และ JPEG ใช้คำขอด้วยตนเองกับ tonemap เชิงเส้นเพื่อให้ YUV และ JPEG มีลักษณะเหมือนกันเมื่อแปลงโดยโมดูล image_processing_utils
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
-
android.graphics.ImageFormat#JPEG
ผ่าน: รูปภาพ YUV และ JPEG คล้ายกันและมีความแตกต่างน้อยกว่า 1% RMS (ค่าราก-ค่าเฉลี่ย-กำลังสองของสัญญาณ)
![]() | ![]() | |
test_yuv_plus_jpg_jpg.jpg | test_yuv_plus_jpeg_yuv.jpg |
test_yuv_plus_raw
ทดสอบการถ่ายภาพเฟรมเดียวเป็นทั้งเอาต์พุต RAW/RAW10/RAW12 และ YUV หากรองรับ ใช้คำขอแบบแมนนวลกับโทนแมปเชิงเส้น ดังนั้น Raw และ YUV คาดว่าจะเหมือนกัน เปรียบเทียบค่า RGB 10% ที่อยู่ตรงกลางของภาพที่แปลงเป็น RGB บันทึก android.shading.mode
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_MODE
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_GAINS
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_TRANSFORM
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_MODE
-
android.hardware.camera2.CaptureRequest#SHADING_MODE
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
-
android.hardware.graphics.ImageFormat#RAW10
-
android.hardware.graphics.ImageFormat#RAW12
ผ่าน: ภาพ YUV และ Raw มีความคล้ายคลึงกันและมีความแตกต่างน้อยกว่า 3.5% RMS (ค่าราก-ค่าเฉลี่ย-กำลังสองของสัญญาณ)
![]() | ![]() | |
test_yuv_plus_raw_shading=1_raw.jpg | test_yuv_plus_raw_shading=1_yuv.jpg |
ฉาก2_a
scene2_a มีสามหน้าโดยมีพื้นหลังสีเทาและเสื้อผ้าที่เป็นกลาง ใบหน้าถูกเลือกให้มีโทนสีผิวที่หลากหลาย แผนภูมิต้องมีการวางแนวที่ถูกต้องเพื่อให้การตรวจจับใบหน้าทำงานได้อย่างเหมาะสมที่สุด
ฉาก2_a
ทดสอบ_อัตโนมัติ_แฟลช
ทดสอบว่าแฟลชอัตโนมัติทำงานในฉากที่มืด ตรวจสอบว่าใช้แฟลชอัตโนมัติโดยตรวจสอบว่าตรงกลางภาพมีการไล่ระดับสีขนาดใหญ่ หากต้องการเรียกใช้แฟลชอัตโนมัติ จะต้องปิดแท็บเล็ตและไฟในแท่นทดสอบ แท็บเล็ตถูกปิดโดยการทดสอบ และสามารถปิดไฟได้โดยอัตโนมัติด้วยตัวควบคุม Arduino ฉากจะต้องมืดสนิทเพื่อให้การทดสอบทำงานได้อย่างถูกต้อง ด้วยเหตุนี้ ช่องเปิดของแท็บเล็ตด้านหลังจึงต้องปิดด้วย Scene Tablet ทั้งหมด และช่องเปิดด้านหน้าต้องมีรูรับแสงปิดไว้และโทรศัพท์ DUT เพื่อกันแสงเล็ดลอดไม่ให้เข้าไปในแท่นขุดเจาะ
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_AVAILABLE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#FLASH_MODE
ผ่าน: จุดกึ่งกลางของภาพย่อยมีการไล่ระดับสีขนาดใหญ่ ซึ่งหมายความว่าจะใช้แฟลชอัตโนมัติ
test_การจัดกรอบอัตโนมัติ
ทดสอบพฤติกรรมการจัดเฟรมอัตโนมัติของอุปกรณ์กล้อง ทำการซูมขนาดใหญ่โดยไม่ให้เห็นใบหน้าใดๆ ในฉาก เปิดใช้งานโหมดการจัดกรอบอัตโนมัติโดยตั้งค่า AUTOFRAMING
ใน CaptureRequest
เป็น True
และตรวจสอบว่าใบหน้าทั้งหมดในฉากดั้งเดิมสามารถตรวจพบได้หรือไม่เมื่อสถานะมาบรรจบกัน (นั่นคือ เมื่อ AUTOFRAMING_STATE
ใน CaptureResult
ถูกตั้งค่าเป็น AUTOFRAMING_STATE_CONVERGED
)
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AUTOFRAMING_AVAILABLE
-
android.hardware.camera2.CaptureRequest#CONTROL_AUTOFRAMING
-
android.hardware.camera2.CaptureResult#CONTROL_AUTOFRAMING
-
android.hardware.camera2.CaptureResult#CONTROL_AUTOFRAMING_STATE
ผ่าน: ตรวจพบทั้งสามใบหน้า
test_display_p3
ทดสอบการจับภาพ P3 ในรูปแบบ JPEG โดยใช้ ColorSpaceProfiles
API ทดสอบว่า JPEG ที่ถ่ายมี โปรไฟล์ ICC ที่เหมาะสมในส่วนหัว และรูปภาพมีสีที่อยู่นอกขอบเขต sRGB
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.params.ColorSpaceProfiles
-
android.hardware.camera2.params.SessionConfiguration#setColorSpace
ผ่าน: JPEG มีโปรไฟล์ Display P3 ICC และสีที่อยู่นอกช่วง sRGB
ทดสอบ_ผลกระทบ
จับภาพเฟรมสำหรับเอฟเฟกต์กล้องที่รองรับและตรวจสอบว่าสร้างขึ้นอย่างถูกต้องหรือไม่ การทดสอบจะตรวจสอบเฉพาะเอฟเฟกต์ OFF
และ MONO
แต่บันทึกรูปภาพสำหรับเอฟเฟกต์ที่รองรับทั้งหมด
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
-
android.hardware.camera2.CaptureRequest#CONTROL_EFFECT_MODE
ผ่าน: จับภาพฉากโดย OFF
ฟเฟ็กต์ และภาพเอกรงค์โดยตั้งค่าเอฟเฟ็กต์เป็น MONO
test_effects_MONO.jpg
test_format_combos
ทดสอบการผสมผสานรูปแบบเอาต์พุตต่างๆ
API ที่ทดสอบแล้ว:
android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes()
android.hardware.camera2.CameraCaptureSession#captureBurst()
ผ่าน: การรวมกันทั้งหมดถูกจับได้สำเร็จ
test_jpeg_quality
ทดสอบคุณภาพการบีบอัด JPEG ของกล้อง ขั้นตอนคุณภาพ JPEG ผ่าน android.jpeg.quality
และตรวจสอบว่าตาราง Quantization เปลี่ยนแปลงอย่างถูกต้อง
API ที่ทดสอบแล้ว:
ผ่าน: เมทริกซ์การหาปริมาณจะลดลงตามการเพิ่มคุณภาพ (เมทริกซ์แสดงถึงปัจจัยการหาร)
ค่าเฉลี่ยเมทริกซ์ Luma/Chroma DQT ของกล้องหลัง Pixel 4 เทียบกับคุณภาพ JPEG
ตัวอย่างการทดสอบที่ล้มเหลว
โปรดทราบว่าสำหรับรูปภาพคุณภาพต่ำมาก (jpeg.quality < 50) จะไม่มีการบีบอัดเพิ่มขึ้นในเมทริกซ์เชิงปริมาณ
ทดสอบ_num_faces
ทดสอบการตรวจจับใบหน้า
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
ผ่าน: ค้นหาสามหน้า
test_num_faces_fd_mode_1.jpg
test_preview_min_frame_rate
ทดสอบว่าอัตราเฟรมแสดงตัวอย่างลดลงอย่างถูกต้องในฉากที่มืด เพื่อให้การทดสอบนี้ทำงานได้อย่างถูกต้อง ผู้ควบคุมจะต้องปิดไฟในแท่นทดสอบหรือปิดเองด้วยตนเอง
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.hardware.camera2.CaptureResult#CONTROL_AE_TARGET_FPS_RANGE
-
android.media.CamcorderProfile
-
android.media.MediaRecorder
ผ่าน: อัตราเฟรมแสดงตัวอย่างอยู่ที่ขั้นต่ำของช่วงอัตราเฟรมที่ร้องขอ และความแปรผันระหว่างเฟรมน้อยกว่าค่าเผื่อสัมบูรณ์ที่ตั้งไว้ในการทดสอบ
test_reprocess_uv_swap
ทดสอบว่าการประมวลผล YUV ใหม่ไม่ได้สลับระนาบ U และ V สิ่งนี้ตรวจพบได้โดยการคำนวณผลรวมของความแตกต่างสัมบูรณ์ (SAD) ระหว่างภาพที่ประมวลผลใหม่และภาพที่ไม่ได้รับการประมวลผล หากการสลับระนาบเอาต์พุต U และ V ของการจับที่ประมวลผลใหม่ส่งผลให้ SAD เพิ่มขึ้น ดังนั้นเอาต์พุตจะถือว่ามีระนาบ U และ V ที่ถูกต้อง
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraDevice#createCaptureSession
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_YUV_REPROCESSING
-
android.hardware.camera2.CaptureRequest#EDGE_MODE
-
android.hardware.camera2.CaptureResult#NOISE_REDUCTION_MODE
ผ่าน: เครื่องบิน U และ V จะไม่สลับกัน
test_reprocess_uv_swap.png
ฉาก2_b
ทดสอบ_num_faces
ทดสอบการตรวจจับใบหน้าด้วยการเพิ่มความหลากหลายของสีผิวในฉากใบหน้า
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
ผ่าน: ค้นหา 3 ใบหน้า
test_num_faces_fd_mode_1.jpg
test_yuv_jpeg_capture_sameness
จับภาพสองภาพโดยใช้รูปแบบ YUV และ JPEG ทั่วไปที่ใหญ่ที่สุดด้วยอัตราส่วนภาพเดียวกันกับรูปแบบ JPEG ที่ใหญ่ที่สุดที่มีความละเอียดไม่เกิน 1920x1440 ตั้งค่า jpeg.quality
เป็น 100 และบันทึกคำขอพื้นผิวคู่ แปลงรูปภาพทั้งสองเป็นอาร์เรย์ RGB และคำนวณความแตกต่างราก 3D ค่าเฉลี่ยกำลังสอง (RMS) ระหว่างรูปภาพทั้งสอง
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
-
android.hardware.camera2.CaptureRequest#JPEG_QUALITY
-
android.graphics.ImageFormat#JPEG
ผ่าน: รูปภาพ YUV และ JPEG คล้ายกันและมีความแตกต่างน้อยกว่า 1% RMS (ค่าราก-ค่าเฉลี่ย-กำลังสองของสัญญาณ)
ฉาก2_c
ทดสอบ_num_faces
ทดสอบการตรวจจับใบหน้าด้วยการเพิ่มความหลากหลายของสีผิวในฉากใบหน้า
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
ผ่าน: ค้นหา 3 ใบหน้า
test_num_faces_fd_mode_1.jpg
test_jpeg_capture_perf_class
ทดสอบเวลาแฝงในการจับภาพ JPEG สำหรับคลาสประสิทธิภาพ S ตามที่ระบุไว้ใน ส่วน 2.2.7.2 กล้อง ใน CDD
ผ่าน: ต้องมีเวลาแฝงในการจับภาพ JPEG ของกล้อง < 1000ms สำหรับความละเอียด 1080p ซึ่งวัดโดยการทดสอบประสิทธิภาพของกล้อง CTS ภายใต้สภาพแสง ITS (3000K) สำหรับกล้องหลักทั้งสองตัว
test_cam_launch_perf_class
ทดสอบเวลาแฝงในการเปิดกล้องสำหรับคลาสประสิทธิภาพ S ตามที่ระบุไว้ ส่วนที่ 2.2.7.2 กล้อง ใน CDD
ผ่าน: ต้องมีเวลาแฝงการเริ่มต้นของกล้อง 2 (เปิดกล้องเพื่อดูเฟรมแรก) < 600ms ซึ่งวัดโดยการทดสอบประสิทธิภาพของกล้อง CTS ภายใต้สภาพแสง ITS (3000K) สำหรับกล้องหลักทั้งสองตัว
ฉาก2_d
ทดสอบ_num_faces
ทดสอบการตรวจจับใบหน้าด้วยการเพิ่มความหลากหลายของสีผิวในฉากใบหน้า
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
ผ่าน: ค้นหา 3 ใบหน้า
ฉาก2_e
ทดสอบ_ต่อเนื่อง_รูปภาพ
เฟรมความละเอียด VGA 50 เฟรมจะถูกบันทึกพร้อมกับคำขอจับภาพก่อน โดยตั้งค่า android.control.afMode = 4 (CONTINUOUS_PICTURE).
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE
-
android.hardware.camera2.CaptureResult#CONTROL_AE_STATE
-
android.hardware.camera2.CaptureResult#CONTROL_AF_STATE
-
android.hardware.camera2.CaptureResult#CONTROL_AWB_STATE
ผ่าน: ระบบ 3A จะตัดสินเมื่อสิ้นสุดการจับภาพ 50 เฟรม
ทดสอบ_num_faces
ทดสอบการตรวจจับใบหน้าด้วยการเพิ่มความหลากหลายของสีผิวในฉากใบหน้า
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
ผ่าน: ค้นหา 3 ใบหน้า
ฉาก2_f
scene2_f มีสามหน้า พื้นหลังสีขาว และเสื้อผ้าสีขาว ใบหน้ามีโทนสีผิวที่หลากหลายและมีคอนทราสต์สูงกับพื้นหลัง
ฉาก2_f
ทดสอบ_num_faces
ทดสอบการตรวจจับใบหน้าด้วยการเพิ่มความหลากหลายของสีผิวในฉากใบหน้า
API ที่ทดสอบแล้ว:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
ผ่าน: ค้นหา 3 ใบหน้า
test_num_faces_fd_mode_1.jpg
ฉาก3
Scene3 uses the ISO12233 chart, and most tests use a chart extractor method to find the chart in the scene. For this reason, most of the saved images don't have borders like the images for scenes 1, 2 or 4, but only the chart. The chart must be in the correct orientation for the chart finder to work optimally.
test_3a_consistency
Tests for 3A consistency.
APIs tested:
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_GAINS
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_TRANSFORM
-
android.hardware.camera2.CaptureRequest#LENS_FOCUS_DISTANCE
-
android.hardware.camera2.CaptureResult#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureResult#SENSOR_SENSITIVITY
Pass: 3A converges for exposure, gain, awb (auto white balance), and fd (focus distance) three times within tolerance.
test_edge_enhancement
Tests that the android.edge.mode
parameter is applied correctly. Captures non-reprocess images for each edge mode and returns sharpness of the output image and the capture result metadata. Processes a capture request with a given edge mode, sensitivity, exposure time, focus distance, and output surface parameter.
Pass: HQ
mode (2) sharper than OFF
mode (0). FAST
mode (1) sharper than OFF
mode. HQ
mode sharper or equal to FAST
mode.
APIs tested:
Impacted camera parameters:
-
EDGE_MODE
test_edge_enhancement_edge=0.jpg
test_edge_enhancement_edge=1.jpg (fast mode)
test_edge_enhancement_edge=2.jpg (high quality mode)
test_flip_mirror
Tests if image is properly oriented as per CDD section 7.5.2 Front-Facing Camera [C-1-5] .
Mirrored, flipped, or rotated images can be identified by the diamond feature near the center.
Pass: Image isn't flipped, mirrored or rotated.
test_flip_mirror_scene_patch.jpg
test_landscape_to_portrait
Tests if the landscape to portrait override functions correctly for landscape-oriented sensors.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_ROTATE_AND_CROP_MODES
-
android.hardware.camera2.CameraCharacteristics#SENSOR_ORIENTATION
-
android.hardware.camera2.CameraCharacteristics#getCameraCharacteristics
Pass: The test is able to locate a chart with the expected rotation (0 degrees when the landscape to portrait override is disabled, 90 degrees when enabled).
test_landscape_to_portrait.png
test_lens_movement_reporting
Tests if the lens movement flag is properly reported. Captures a burst of 24 images with the first 12 frames at the optimum focus distance (as found by 3A) and the last 12 frames at the minimum focus distance. Around frame 12, the lens moves causing the sharpness to drop. The sharpness eventually stabilizes as the lens moves to the final position. The lens movement flag should be asserted in all frames where the sharpness is intermediate to sharpness in the first few frames with the lens stationary at optimum focal distance, and the final few frames where the lens is stationary in the minimum focal distance. The exact frame the lens moves isn't important: what is checked is that the movement flag is asserted when the lens is moving.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#LENS_INFO_MINIMUM_FOCUS_DISTANCE
-
android.hardware.camera2.CaptureResult#LENS_STATE
-
android.hardware.camera2.CaptureResult#LENS_FOCUS_DISTANCE
-
android.hardware.camera2.CaptureResult#SENSOR_TIMESTAMP
-
android.hardware.camera2.CaptureRequest#LENS_FOCUS_DISTANCE
Pass: Lens movement flag is True
in the frame with sharpness change.
Fail mechanisms:
-
lens_moving: True
(android.hardware.camera2.CaptureResult#LENS_STATE
= 1) intest_log.DEBUG
is asserted only in frames where sharpness isn't changing. - Frames with
lens_moving: False
(android.hardware.camera2.CaptureResult#LENS_STATE
= 0) intest_log.DEBUG
has a sharpness difference compared to the first few frames at optimum focal distance or the last few frames at minimum focus distance.
test_reprocess_edge_enhancement
Tests if supported reprocess methods for edge enhancement work properly. Processes a capture request with a given reprocess edge mode and compares different modes to capture with reprocess edge modes disabled.
APIs tested:
-
android.hardware.camera2.CaptureRequest#EDGE_MODE
-
android.hardware.camera2.CaptureRequest#REPROCESS_EFFECTIVE_EXPOSURE_FACTOR
Pass: Sharpness for the different edge modes is correct. HQ
(mode 2) is sharper than OFF
(mode 0), and improvement between different modes is similar.
test_reprocess_edge_enhancement_plot.png
scene4
Scene4 consists of a black circle on a white background inside a square.
scene4
test_aspect_ratio_and_crop
Tests if images are distorted or cropped unexpectedly in the image pipeline. Takes pictures of a circle over all formats. Verifies the circle isn't distorted, the circle doesn't move from the center of image, and the circle doesn't change size incorrectly with different aspect ratios or resolutions.
APIs tested:
-
android.hardware.camera2.CaptureResult#LENS_DISTORTION
-
android.hardware.camera2.CaptureResult#LENS_FOCAL_LENGTH
-
android.hardware.camera2.CaptureResult#LENS_INTRINSIC_CALIBRATION
Pass: Images aren't stretched, the center of images don't differ by more than 3%, and the maximum possible FoV (field of view) is preserved.
Fail mechanisms:
- The circle in the captured image is distorted by the processing pipeline.
- Lower resolution image is double cropped in the image pipeline creating different FoV between high and low resolution images.
- The circle in the captured image is cropped due to an extreme aspect ratio capture request reducing the height or width of the image.
- The circle in the captured image has a reflection in the center and doesn't appear fully filled.
test_multi_camera_alignment
Tests the camera calibration parameters related to camera positioning for multi-camera systems. Using the multi-camera physical sub-cameras, takes a picture with one of the physical cameras. Finds the circle center. Projects the circle center to the world coordinates for each camera. Compares the difference between the cameras' circle centers in world coordinates. Reprojects the world coordinate back to pixel coordinates and compares against originals as a validity check. Compares the circle sizes checking if the focal lengths of the cameras are different.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds()
-
android.hardware.camera2.CameraCharacteristics#LENS_DISTORTION
-
android.hardware.camera2.CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
-
android.hardware.camera2.CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
-
android.hardware.camera2.CameraCharacteristics#LENS_POSE_ROTATION
-
android.hardware.camera2.CameraCharacteristics#LENS_POSE_TRANSLATION
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
-
android.hardware.camera2.CaptureRequest#SCALER_CROP_REGION
-
android.hardware.camera2.CaptureRequest#DISTORTION_CORRECTION_MODE
Pass: Circle centers and sizes are as expected in projected images compared to captured images using camera calibration data and focal lengths.
Fail mechanisms:
-
LENS_INTRINSIC_CALIBRATION
,LENS_POSE_TRANSLATION
, orLENS_POSE_ROTATION
are design values and not actual calibration data. - The camera system isn't appropriate for the test setup. For example, testing a wide and an ultra-wide camera system with the RFoV test rig. For more information, see Camera ITS-in-a-box FAQ1 .
test_preview_aspect_ratio_and_crop
Similar to the test_aspect_ratio_and_crop test for still captures, this test checks the supported preview formats to ensure the preview frames aren't stretched or cropped inappropriately. Verifies that the aspect ratio of the circle doesn't change, the cropped images keep the circle in center of the frame, and the circle size doesn't change for a constant format or with different resolutions (field of view check).
APIs tested:
-
android.hardware.camera2.CaptureResult#LENS_DISTORTION
-
android.hardware.camera2.CaptureResult#LENS_FOCAL_LENGTH
-
android.hardware.camera2.CaptureResult#LENS_INTRINSIC_CALIBRATION
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.media.MediaRecorder
-
android.media.CamcorderProfile
Pass: Images aren't stretched, the center of images don't differ by more than 3%, and the maximum possible FoV (field of view) is preserved.
test_preview_stabilization_fov
Checks the supported preview sizes to ensure the FoV is cropped appropriately. The test captures two videos, one with preview stabilization ON
, and another with preview stabilization OFF
. A representative frame is selected from each video, and analyzed to ensure that the FoV changes in the two videos are within spec.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.media.MediaRecorder
-
android.media.CamcorderProfile
Pass: The circle aspect ratio remains about constant, the center location of the circle remains stable, and the size of circle changes no more that 20%.
test_video_aspect_ratio_and_crop
Takes videos of a circle inside of a square over all video formats. Extracts the key frames, and verifies the aspect ratio of the circle doesn't change, the cropped images keep the circle in center, and the circle size doesn't change for a constant format or with different resolution (field of view check).
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.hardware.camera2.CaptureResult#LENS_DISTORTION
-
android.hardware.camera2.CaptureResult#LENS_FOCAL_LENGTH
-
android.hardware.camera2.CaptureResult#LENS_INTRINSIC_CALIBRATION
-
android.media.MediaRecorder
-
android.media.CamcorderProfile
Pass: Video frames aren't stretched, the center of frames don't differ by more than 3%, and the maximum possible FoV (field of view) is preserved.
scene5
Scene5 requires a uniformly lit gray scene. This is accomplished by a diffuser placed over the camera lens. We recommend the following diffuser: www.edmundoptics.com/optics/window-diffusers/optical-diffusers/opal-diffusing-glass/46168
.
To prepare the scene, attach a diffuser in front of the camera and point the camera to a lighting source of around 2000 lux. Images captured for scene5 require diffuse lighting with no features evident. The following is a sample image:
scene5 capture
test_lens_shading_and_color_uniformity
Tests that the lens shading correction is applied appropriately, and color of a monochrome uniform scene is evenly distributed. Performs this test on a YUV frame with auto 3A. Lens shading is evaluated based on the y channel. Measures the average y value for each sample block specified, and determines pass or fail by comparing with the center y value. The color uniformity test is evaluated in r/g and b/g space.
APIs tested:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
Pass: At the specified radius of the image, the variance of r/g and b/g value must be less than 20% to pass the test.
scene6
Scene6 is a grid of small circles with a square in one corner to indicate orientation. The small circles are needed to test zoom function over a large range.
scene6
test_in_sensor_zoom
Tests the behavior of the camera in-sensor zoom feature, which produces cropped RAW images.
With the stream use case set to CROPPED_RAW
, the test takes two captures over the zoom range, a full field of view (FoV) RAW image and a cropped RAW image. The test converts the images to RGB arrays, downscales the full-sized cropped RAW image to the size reported by SCALER_RAW_CROP_REGION
, and calculates the 3D root mean square (RMS) difference between the two images.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.hardware.camera2.CameraMetadata#SCALER_AVAILABLE_STREAM_USE_CASES_CROPPED_RAW
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.hardware.camera2.CaptureResult#SCALER_RAW_CROP_REGION
Pass: The 3D root mean square (RMS) difference between the downscaled cropped RAW image and the full FoV RAW image is less than 1%.
test_zoom
Tests the camera zoom behavior. Takes captures over the zoom range and checks if the circles get bigger as the camera zooms in.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.hardware.camera2.CaptureResult#LENS_FOCAL_LENGTH
Pass: Relative size of captured circle is accurate against requested zoom ratio to ensure camera is zooming correctly.
test_zoom to find the contour of the circle closest to the center.
test_low_latency_zoom
Tests the camera low latency zoom behavior. Takes captures over the zoom range with android.control.settingsOverride = 1 (SETTINGS_OVERRIDE_ZOOM)
, and checks if the circles in the output images match the zoom ratios in the capture metadata.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_SETTINGS_OVERRIDES
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CaptureRequest#CONTROL_SETTINGS_OVERRIDE
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.hardware.camera2.CaptureResult#CONTROL_SETTINGS_OVERRIDE
Pass: Relative size of captured circle is accurate against the zoom ratio result metadata.
test_preview_video_zoom_match
Tests that while recording and zooming, video preview and video output display and record the same output. Calculates the size of the circle closest to the center at different zoom ratios and checks whether the size of the circle increases as the zoom ratio increases.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CameraCharacteristics#LENS_INFO_AVAILABLE_FOCAL_LENGTHS
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.hardware.camera2.CaptureResult#LENS_FOCAL_LENGTH
Pass: Relative size of captured circle is accurate against requested zoom ratio in video and preview.
VGA_640x480_key_frame.png (before zoom)
preview_640x480_key_frame.png (before zoom)
VGA_640x480_key_frame.png (after zoom)
preview_640x480_key_frame.png (after zoom)
scene_extensions
The scene_extensions
tests are for camera extensions and must use Camera ITS-in-a-Box , as they require precise control of the testing environment.
scene_hdr
The scene_hdr
scene consists of a portrait on the left and a low-contrast QR code on the right.
scene_hdr
test_hdr_extension
Tests the HDR extension . Takes captures with and without the extension enabled, and checks if the extension makes the QR code more detectable.
APIs tested:
-
android.hardware.camera2.CameraExtensionCharacteristics#getSupportedExtensions
-
android.hardware.camera2.CameraExtensionSession#capture
Pass: The HDR extension reduces the number of contrast changes needed to detect the QR code or reduces the gradient across the QR code.
scene_night
The scene_night
scene consists of a white circle with four smaller circles inside of it, all against a black background. The smaller circle in the top right corner is darker than the others to indicate orientation.
scene_night
test_night_extension
Tests the Night extension . Takes captures with and without the extension enabled, and checks for the following:
- The capture with the Night extension enabled takes longer.
- The capture with the Night extension enabled is brighter or has scene artifacts with an improved appearance.
APIs tested:
-
android.hardware.camera2.CameraExtensionCharacteristics#getSupportedExtensions
-
android.hardware.camera2.CameraExtensionSession#capture
Pass: Compared to a capture without the Night extension enabled, a capture with the Night extension enabled takes at least 0.5 seconds longer. The capture must be at least 10% brighter, or the gray dots in the scene must be 20 pixel values lower than the surrounding circle's center.
sensor_fusion
Sensor fusion tests require specific phone movement in front of a checkerboard pattern. For optimum results, ensure the test chart is mounted flat. Charts that aren't flat affect the rotation calculations for many of the tests. The sensor_fusion
tests can be automated with the Sensor Fusion Box .
Image of checkerboard
test_multi_camera_frame_sync
Tests that frame timestamps captured by logical camera are within 10 ms by computing angles of squares within the checkerboard to determine the timestamp.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#LOGICAL_MULTI_CAMERA_SENSOR_SYNC_TYPE
-
android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds()
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_LOGICAL_MULTI_CAMERA
-
android.hardware.camera2.params.OutputConfiguration#setPhysicalCameraId()
Pass: Angle between images from each camera doesn't change appreciably as phone is rotated.
test_preview_stabilization
Tests that stabilized preview video rotates less than gyroscope.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.media.MediaRecorder
-
android.media.CamcorderProfile
Pass: Max angle rotation over frames is less than 70% of gyroscope rotation.
The following are sample videos with and without stabilization.
Sample video with stabilization
Sample video without stabilization
test_sensor_fusion
Tests the timestamp difference between the camera and the gyroscope for AR and VR applications. Phone is rotated 90 degrees 10 times in front of the checkerboard pattern. Motion is about 2 s round trip. This test is skipped if no gyroscope is included or if the timestamp source REALTIME
parameter is not enabled.
The test_sensor_fusion
test generates a number of plots. The two most important plots for debugging are:
test_sensor_fusion_gyro_events
: Shows the gyroscope events for the phone during the test. Movement in the x and y direction implies the phone isn't securely mounted on the mounting plate, reducing the probability of the test passing. The number of cycles in the plot depends on the write speed for saving frames.test_sensor_fusion_gyro_events
test_sensor_fusion_plot_rotations
: Shows the alignment of the gyroscope and camera events. This plot must show matching movement between camera and gyroscope to +/-1 ms.test_sensor_fusion_plot_rotations
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#LENS_FACING
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_TIMESTAMP_SOURCE
-
android.hardware.camera2.CameraMetadata#SENSOR_INFO_TIMESTAMP_SOURCE_REALTIME
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
-
android.hardware.camera2.CaptureRequest#SENSOR_FRAME_DURATION
-
android.hardware.camera2.CaptureRequest#SENSOR_TIMESTAMP
-
android.hardware.camera2.CaptureResult#SENSOR_ROLLING_SHUTTER_SKEW
Pass: Camera and gyroscope timestamps' offset is less than 1 ms as per CDD section 7.3.9 High Fidelity Sensors [C-2-14] .
Fail mechanisms:
- Offset error: The camera-gyroscope offset isn't correctly calibrated to within +/-1 ms.
- Frame drops: The pipeline isn't fast enough to capture 200 frames consecutively.
- Socket errors:
adb
can't reliably connect to the DUT long enough to execute the test. - The chart isn't mounted flat. The plot
test_sensor_fusion_plot_rotations
has frames where the gyroscope and camera rotation vary considerably as the camera rotates through the parts of the chart that aren't flat. - The camera isn't mounted flat. The plot
test_sensor_fusion_gyro_events
shows movement in the X and Y planes. This failure is more common in front-facing cameras as the rear camera often has a raised bump to the rest of the phone body, creating a tilt when mounting the rear of the phone to the mounting plate.
test_video_stabilization
Tests that stabilized video rotates less than gyroscope.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.media.MediaRecorder
-
android.media.CamcorderProfile
Pass: Max angle rotation over frames is less than 60% of gyroscope rotation.
The following are sample videos with and without stabilization.
Sample video with stabilization
Sample video without stabilization
test_led_snapshot
Tests that the LED snapshots don't saturate or tint the image.
This test adds a lighting controller to the sensor fusion box to control the lights. With the lights set to OFF
, the test takes a capture with the AUTO_FLASH
mode set to ON
. During this capture, the test runs a precapture sequence with the aePrecapture
trigger set to START
, and sets the capture intent to Preview
to take the capture with flash.
Because the capture has a distinctive hotspot due to flash, the test computes the flash image mean of the entire capture and verifies whether the value is within the (68, 102) range. To check if the image is reasonably white-balanced, the test calculates the R/G and B/G ratios and verifies whether the ratios are within 0.95 and 1.05.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_AVAILABLE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#FLASH_MODE
Pass: The R/G and B/G ratios are within 0.95 and 1.05. The flash image mean is within the (68, 102) range.