Esta página proporciona una lista completa de las pruebas realizadas en Camera Image Test Suite (ITS), que forma parte del Verificador de Android Compatibility Test Suite (CTS). Las pruebas ITS son pruebas funcionales, lo que significa que no miden la calidad de la imagen, sino que todas las funciones de la cámara anunciadas funcionan como se esperaba. Este documento permite a los desarrolladores y evaluadores comprender qué hacen las pruebas individuales y cómo depurar las fallas de las pruebas.
La cámara ITS realiza pruebas según las propiedades requeridas de la cámara, el nivel de API y el nivel de clase de rendimiento multimedia (MPC). Para el nivel de API, ITS utiliza ro.product.first_api_level
para controlar las pruebas agregadas en un nivel de API específico que prueban experiencias de usuario negativas para la funcionalidad en niveles de API inferiores. ITS utiliza ro.vendor.api_level
para realizar pruebas de funciones agregadas en un nivel de API específico que requieren nueva capacidad de hardware. Si se define ro.odm.build.media_performance_class
para un dispositivo, ITS requiere que se ejecuten pruebas específicas según el nivel de MPC.
Las pruebas se agrupan por escena de la siguiente manera:
- scene0 : Captura de metadatos, jitter, giroscopio, vibración
- escena1 : exposición, sensibilidad, compensación EV, YUV frente a JPEG/RAW
- escena2 : Detección de rostros, pruebas que requieren escenas en color u oscuridad total
- Escena 3 : mejora de bordes, movimiento de lente.
- escena4 : Relación de aspecto, recorte, campo de visión
- escena 5 : sombreado de lentes
- Escena 6 : Zoom
- scene_extensions : extensiones de cámara
- sensor_fusion : compensación de sincronización de cámara/giroscopio
Consulte las secciones individuales para obtener una descripción de cada escena.
escena0
Las pruebas de Scene0 no requieren información de escena específica. Sin embargo, el teléfono debe estar estacionario para realizar pruebas de giroscopio y vibración.
prueba_burst_capture
Verifica que todo el proceso de captura pueda mantenerse al día con la velocidad de captura de tamaño completo y el tiempo de CPU.
API probadas:
Pasar: captura una ráfaga de imágenes en tamaño completo y la cámara es lo suficientemente rápida como para evitar el tiempo de espera.
test_capture_result_dump
Prueba que se devuelve un resultado de captura de una captura manual y luego lo vuelca.
API probadas:
Pasar: completa la captura y vuelca los resultados de la captura.
prueba_gyro_bias
Prueba si el giroscopio tiene una salida estable cuando el dispositivo está estacionario. Los datos se representan como un promedio de 20 puntos de datos.
API probadas:
Pasa: el delta de la lectura del giroscopio es inferior a 0,01 con el tiempo.
test_gyro_bias_plot.png
prueba_jitter
Mide la fluctuación en las marcas de tiempo de la cámara.
API probadas:
-
android.hardware.camera2.CaptureResult#SENSOR_TIMESTAMP
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
Pasa: hay al menos un delta de 30 ms entre fotogramas.
test_jitter_plot.png (Tenga en cuenta el pequeño rango del eje y. En realidad, la fluctuación es pequeña en este gráfico).
prueba_metadatos
Prueba la validez de las entradas de metadatos. Mira los resultados de la captura y las características de la cámara de los objetos. Esta prueba utiliza valores de exposición y ganancia auto_capture_request
porque el contenido de la imagen no es importante.
API probadas:
-
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
Pasar: nivel de hardware, rollingShutterSkew
, etiquetas frameDuration
, timestampSource
, croppingType
, blackLevelPattern
, pixel_pitch
, FoV y distancia hiperfocal están presentes y tienen valores válidos.
test_param_sensitivity_burst
Prueba que el parámetro android.sensor.sensitivity
se aplica correctamente en ráfaga. Inspecciona únicamente los metadatos de salida.
API probadas:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
Pasa: Los datos de salida tienen una tolerancia de error inferior al 0,2%.
prueba_lectura_escritura
Prueba que el dispositivo escribe los valores correctos de exposición y ganancia leyendo los metadatos de captura.
API probadas:
-
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
Pasar: los valores de lectura y escritura coinciden en todas las tomas.
eventos_sensor_prueba
Prueba que el dispositivo consulta e imprime eventos de sensores para dispositivos que anuncian soporte de fusión de sensores. Los sensores esperados son acelerómetro, giroscopio y magnetómetro. Esta prueba sólo funciona si la pantalla está encendida, es decir, el dispositivo no está en modo de espera.
API probadas:
Pasar: Se reciben eventos para cada sensor.
prueba_color_sólido_patrón_prueba
Prueba que los patrones de prueba de colores sólidos se generen correctamente para silenciar la cámara. Si se admite el silenciamiento de la cámara, se deben admitir patrones de prueba de colores sólidos. Si no se admite el silenciamiento de la cámara, los patrones de prueba de colores sólidos solo se prueban si se anuncia la capacidad.
Si se admiten imágenes RAW, también se prueba la asignación de color. Los colores probados son negro, blanco, rojo, azul y verde. Para las cámaras que no admiten imágenes RAW, solo se prueba el negro.
API probadas:
-
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
Pasa: Los patrones de prueba sólidos admitidos tienen el color correcto y hay poca variación en la imagen.
prueba_test_pattern
Prueba el parámetro android.sensor.testPatternMode
para capturar fotogramas para cada patrón de prueba válido y comprueba que los fotogramas se generen correctamente para colores sólidos y barras de colores. Esta prueba incluye los siguientes pasos:
- Captura imágenes para todos los patrones de prueba compatibles.
- Realiza una comprobación sencilla de la corrección de patrones de prueba de colores sólidos y barras de colores.
API probadas:
-
android.hardware.camera2.CameraCharacteristic#SENSOR_AVAILABLE_TEST_PATTERN_MODES
-
android.hardware.camera2.CaptureResult#SENSOR_TEST_PATTERN_MODE
Pasa: los patrones de prueba admitidos se generan correctamente.
test_test_patterns_2.jpg
test_tonemap_curve
Prueba la conversión del patrón de prueba de RAW a YUV con mapa de tonos lineal. Esta prueba requiere android.sensor.testPatternMode = 2
(COLOR_BARS) para generar un patrón de imagen perfecto para la conversión de mapas de tonos. Garantiza que la canalización tenga salidas de color adecuadas con un mapa de tonos lineal y una entrada de imagen ideal (se basa en test_test_patterns
).
API probadas:
-
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
Pasar: El YUV y el RAW se parecen entre sí.
test_tonemap_curve_raw_2.jpg
test_tonemap_curve_yuv_2.jpg
prueba_marca_hora_unificada
Prueba si los eventos de imagen y sensor de movimiento están en el mismo dominio de tiempo.
API probadas:
-
android.hardware.camera2.CaptureResult#SENSOR_TIMESTAMP
-
android.hardware.Sensor
-
android.hardware.SensorEvent
-
android.hardware.Sensor#TYPE_ACCELEROMETER
-
android.hardware.Sensor#TYPE_GYROSCOPE
Pasar: las marcas de tiempo de movimiento se encuentran entre las dos marcas de tiempo de la imagen.
prueba_vibración_restricción
Prueba si la vibración del dispositivo funciona como se esperaba.
API probadas:
-
android.hardware.Sensor
-
android.hardware.SensorEvent
-
android.hardware.Sensor#TYPE_ACCELEROMETER
-
android.os.Vibrator
-
android.hardware.camera2.CameraDevice#setCameraAudioRestriction
Pasar: el dispositivo no vibra cuando lo silencia la API de restricción de audio de la cámara.
escena 1
escena1 es un gráfico gris. El gráfico gris debe cubrir el 30% central del campo de visión de la cámara. Se espera que el gráfico gris desafíe moderadamente el 3A (exposición automática, balance de blancos automático, enfoque automático) ya que la región central no tiene características. Sin embargo, la solicitud de captura especifica la escena completa que incluye características suficientes para que 3A converja.
Las cámaras RFoV se pueden probar en el WFoV o en el banco de pruebas RFoV. Si se prueba una cámara RFoV en el equipo de prueba WFoV, el gráfico se escala en ⅔ para garantizar algunos límites para el gráfico gris en el FoV para ayudar a que 3A converja. Para obtener descripciones más detalladas de los equipos de prueba de cámaras, consulte Camera ITS-in-a-box .
Escena 1: gráfico de tamaño completo (izquierda). Gráfico escalado ⅔ (derecha).
prueba_3a
Prueba la convergencia de 3A con un objetivo moderadamente desafiante.
API probadas:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
Pasa: 3A converge y los valores de 3A devueltos son válidos.
prueba_ae_af
Prueba los algoritmos de exposición automática (AE) y enfoque automático (AF) 3A individualmente.
API probadas:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AF_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_MODE
Pasa: 3A converge y los valores de 3A devueltos son legales.
test_ae_precapture_trigger
Prueba la máquina de estado AE cuando se utiliza el disparador de precaptura. Captura cinco solicitudes manuales con AE desactivada. La última solicitud tiene un activador de captura previa de AE, que debe ignorarse porque AE está deshabilitada.
API probadas:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
-
android.hardware.camera2.CaptureResult#CONTROL_AE_STATE
Pasa: AE converge.
prueba_auto_vs_manual
Las pruebas que capturaron tomas automáticas y manuales tienen el mismo aspecto.
API probadas:
-
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
Pasa: Las ganancias y transformaciones del balance de blancos manual reportadas en cada resultado de captura coinciden con la estimate
del balance de blancos automático del algoritmo 3A de la cámara.
test_auto_vs_manual_auto.jpg
test_auto_vs_manual_wb.jpg
test_auto_vs_manual_manual_wb_tm.jpg
prueba_negro_blanco
Prueba que el dispositivo produce imágenes completamente en blanco y negro. Realiza dos capturas, la primera con una ganancia extremadamente baja y una exposición corta, lo que da como resultado una fotografía en negro, y la segunda con una ganancia extremadamente alta y una exposición larga, lo que da como resultado una fotografía en blanco.
API probadas:
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
Pasar: Produce imágenes en blanco y negro. Los canales saturados de imágenes blancas tienen valores RGB de [255, 255, 255] con un margen de error de menos del 1% de diferencia.
prueba_negro_blanco_negro.jpg | prueba_negro_blanco_blanco.jpg |
test_black_white_plot_means.png
test_burst_sameness_manual
Toma 5 ráfagas de 50 imágenes con configuración de captura manual y comprueba que todas sean idénticas. Esta prueba se puede utilizar para identificar si hay fotogramas esporádicos que se procesan de forma diferente o tienen artefactos.
API probadas:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_MANUAL_SENSOR
-
android.hardware.camera2.CameraMetadata#SYNC_MAX_LATENCY_PER_FRAME_CONTROL
Pasa: Las imágenes son idénticas visualmente y en valores RGB.
Fallo: muestra un pico o una caída del gráfico de promedio RGB al comienzo de cada ráfaga.
- La tolerancia es del 3 % para
first_API_level
< 30 - La tolerancia es del 2% para
first_API_level
>= 30
test_burst_sameness_manual_mean.jpg
test_burst_sameness_manual_plot_means.png
resultado_captura_prueba
Prueba que los datos válidos regresan en los objetos CaptureResult
. Realiza una captura automática, manual y automática.
API probadas:
-
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
Pasar: los metadatos son válidos para todas las capturas y la configuración manual no se filtra en la segunda captura automática. Traza la corrección del sombreado de la lente para las capturas.
test_capture_result_plot_lsc_auto_ch0.png
prueba_crop_region_raw
Prueba que las transmisiones RAW no se pueden recortar.
API probadas:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CaptureResult#SCALER_CROP_REGION
-
android.hardware.camera2.CaptureRequest#SCALER_CROP_REGION
Pasar: las imágenes YUV se recortan en el centro, pero no las imágenes 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
Pruebas que funcionan las regiones de cultivo. Toma una imagen completa y crea parches de 5 regiones diferentes (esquinas y centro). Toma imágenes con recorte establecido para las 5 regiones. Compara los valores del parche y de la imagen recortada.
API probadas:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CaptureRequest#SCALER_CROP_REGION
Pasar: la imagen de la región recortada coincide con el parche que corresponde a la imagen recortada.
test_dng_noise_model
Verifica que los parámetros del modelo sin formato DNG sean correctos. El gráfico representa la varianza medida de un parche central de la tarjeta gris en tomas sin procesar capturadas en un rango de sensibilidades y compara estos valores con la varianza esperada en cada sensibilidad por el modelo de ruido DNG en la cámara HAL (basado en el Parámetros O,S devueltos en los objetos de resultado de la captura). Para obtener más detalles sobre el modelo de ruido DNG, descargue el siguiente documento sobre el modelo de ruido DNG .
API probadas:
-
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
Pasa: Los parámetros del modelo sin formato DNG son correctos. Los valores RGB esperados coinciden con los valores RGB reales medidos.
test_dng_noise_model_plog.png
test_ev_compensación_avanzada
Prueba que se aplica la compensación del valor de exposición (EV). La prueba aumenta la exposición en ocho pasos y verifica el brillo medido versus el brillo esperado. Los valores esperados se calculan a partir del brillo de la imagen sin aplicar compensación EV y el valor esperado se saturará si los valores calculados exceden el rango de valores de la imagen real. La prueba falla si los valores esperados y los valores medidos no coinciden o las imágenes se sobreexponen en cinco pasos.
API probadas:
-
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
Pasar: Las imágenes muestran una exposición creciente sin sobreexponer en cinco pasos.
test_ev_compensation_advanced_plot_means.png
test_ev_compensación_basic
Prueba que la compensación EV se aplica utilizando un rango creado con CONTROL_AE_COMPENSATION_STEP
. Se capturan ocho cuadros en cada valor de compensación.
API probadas:
-
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
Pasa: captura el aumento de luma con una mayor configuración de compensación EV, y los ocho fotogramas capturados para cada configuración de compensación EV tienen valores de luma estables.
test_ev_compensación_basic.png
exposición_prueba
Prueba que se logra una exposición constante ya que ISO y el tiempo de exposición varían. Toma una serie de fotografías en las que se elige ISO y tiempo de exposición para equilibrarse entre sí. Los resultados deberían tener el mismo brillo, pero a lo largo de la secuencia la imagen debería volverse más ruidosa. Verifica que los valores medios de los píxeles de muestra estén cerca entre sí. Garantiza que las imágenes no estén fijadas en 0 o 1 (lo que las haría parecer líneas planas). La prueba también se puede ejecutar con imágenes RAW configurando el indicador debug
en su archivo de configuración.
API probadas:
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
Pasa: las imágenes tienen el mismo brillo, pero se vuelven más ruidosas con un ISO más alto. Los planos RGB son planos cuando el valor de exposición ISO* es constante en el espacio de ganancia probado.
test_exposure_plot_means.png
test_exposure_mult=1.00.jpg | test_exposure_mult=64.00.jpg |
prueba_jpeg
Las pruebas que convirtieron imágenes YUV e imágenes JPEG del dispositivo tienen el mismo aspecto. La prueba toma el 10% central de la imagen, calcula el valor RGB y verifica que coincidan.
API probadas:
Pasa: La diferencia RGB promedio entre cada imagen es inferior al 3%.
test_jpeg_fmt=jpg.jpg | test_jpeg=fmt=yuv.jpg |
prueba_enganche
Prueba que los ajustes (exposición y ganancia) se fijan en el fotograma correcto para las cámaras FULL
y LEVEL_3
. Realiza una serie de tomas utilizando solicitudes consecutivas, variando los parámetros de solicitud de captura entre tomas. Comprueba que las imágenes tienen las propiedades esperadas.
API probadas:
Pasa: Las imágenes [2, 3, 6, 8, 10, 12, 13] tienen ISO o exposición aumentada y aparecen con medios RGB más altos en 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
prueba_linealidad
Prueba que el procesamiento del dispositivo se puede invertir a píxeles lineales. Captura una secuencia de disparos con el dispositivo apuntando a un objetivo uniforme.
API probadas:
-
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
Pasa: los valores R, G, B deben aumentar linealmente con una mayor sensibilidad.
test_linearity_plot_means.png
prueba_bloqueada_burst
Prueba el bloqueo 3A y la ráfaga YUV (usando la configuración automática). Esta prueba está diseñada para pasar incluso en dispositivos limitados que no tienen MANUAL_SENSOR
o PER_FRAME_CONTROLS
. La prueba verifica la coherencia de la imagen YUV mientras la verificación de la velocidad de fotogramas se realiza en CTS.
API probadas:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_LOCK
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_LOCK
Pasa: Las capturas parecen consistentes.
test_locked_burst_frame0.jpg
test_locked_burst_frame1.jpg
test_locked_burst_frame2.jpg
prueba_param_color_corrección
Prueba que los parámetros android.colorCorrection.*
se aplican cuando se configuran. Toma fotografías con diferentes valores de transformación y ganancia, y prueba que se vean correspondientemente diferentes. La transformación y las ganancias se eligen para que la salida sea cada vez más roja o azul. Utiliza un mapa de tonos lineal. El mapeo de tonos es una técnica utilizada en el procesamiento de imágenes para asignar un conjunto de colores a otro para aproximar la apariencia de imágenes de alto rango dinámico en un medio que tiene un rango dinámico más limitado.
API probadas:
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_GAINS
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_MODE
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_TRANSFORM
Pasa: los valores R y B aumentan según la transformación.
test_param_color_correction_plot_means.png
*El eje x son las solicitudes de captura: 0 = unidad, 1 = refuerzo rojo, 2 = refuerzo azul
test_param_color_correction_req=0.jpg
test_param_color_correctness_req=1.jpg (aumento R)
test_param_color_correction_req=2.jpg (aumento B)
test_param_exposure_time
Prueba que se aplica el parámetro android.sensor.exposureTime
.
API probadas:
Pasar: Cada toma es más brillante que la toma anterior.
test_param_exposure_time_frame0.jpg
test_param_exposure_time_plot.png
test_param_flash_mode
Prueba que se aplica el parámetro android.flash.mode
. Establece manualmente la exposición para que esté en el lado oscuro, de modo que sea obvio si el flash se disparó o no, y utiliza un mapa de tonos lineal. Comprueba el centro con la imagen del mosaico para ver si se ha creado un gradiente grande para verificar si se disparó el flash.
API probadas:
Pasar: El centro de la imagen del mosaico tiene un gran gradiente, lo que significa que el flash se disparó.
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_reducción_de_ruido
Prueba que el parámetro android.noiseReduction.mode
se aplica correctamente cuando está configurado. Captura imágenes con la cámara poco iluminada. Utiliza una alta ganancia analógica para garantizar que la imagen capturada tenga ruido. Captura tres imágenes, para NR desactivado, "rápido" y "alta calidad". También captura una imagen con baja ganancia y NR desactivada, y utiliza la variación de esto como base. Cuanto mayor sea la SNR (relación señal-ruido), mejor será la calidad de la imagen.
API probadas:
Pasa: La SNR varía con los diferentes modos de reducción de ruido y se comporta de manera similar al gráfico siguiente.
test_param_noise_reduction_plot_SNRs.png
0: APAGADO, 1: RÁPIDO, 2: HQ, 3: MIN, 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_sensibilidad
Prueba que se aplica el parámetro android.sensor.sensitivity
. La prueba aumenta la sensibilidad en 5 pasos con exposición fija para cada disparo.
API probadas:
Pasa: RGB significa que el 10% central se vuelve más brillante con mayor sensibilidad.
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
Prueba que se aplica el parámetro android.shading.mode
.
API probadas:
-
android.hardware.camera2.CaptureRequest#SHADING_MODE
-
android.hardware.camera2.CaptureRequest#STATISTICS_LENS_SHADING_MAP_MODE
-
android.hardware.camera2.CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
Pasar: los modos de sombreado se cambian y los mapas de sombreado de la lente se modifican como se esperaba.
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
Prueba que se aplica el parámetro android.tonemap.mode. Aplica diferentes curvas de mapa de tonos a cada canal R, G, B y verifica que las imágenes de salida se modifiquen como se esperaba. Esta prueba consta de dos pruebas, prueba1 y prueba2.
API probadas:
-
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
Aprobar:
- prueba1: Ambas imágenes tienen un mapa de tonos lineal, pero n=1 tiene un gradiente más pronunciado. El canal G (verde) es más brillante para la imagen n=1.
- prueba2: Mismo mapa de tonos, pero diferente longitud. Las imágenes son las mismas.
test_param_tonemap_mode_n=0.jpg | test_param_tonemap_mode_n=1.jpg |
test_post_raw_sensitivity_boost
Comprueba el aumento de sensibilidad posterior a RAW. Captura un conjunto de imágenes RAW y YUV con diferente sensibilidad, publica una combinación de aumento de sensibilidad RAW y comprueba si la media de píxeles de salida coincide con la configuración solicitada.
API probadas:
-
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
Pasar: las imágenes RAW se vuelven más oscuras a medida que aumenta el aumento, mientras que las imágenes YUV mantienen el brillo constante
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_sensibilidad
Captura un conjunto de imágenes sin procesar con ganancias crecientes y mide el ruido. Captura solo sin formato, en una ráfaga.
API probadas:
-
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
Pase: Cada disparo es más ruidoso que el anterior, ya que la ganancia va aumentando.
Utiliza la variación de la celda central de la cuadrícula de estadísticas.
test_raw_burst_sensitivity_variance.png
prueba_raw_exposición
Captura un conjunto de imágenes sin procesar con un tiempo de exposición cada vez mayor y mide los valores de píxeles.
API probadas:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
Pasa: aumentar el ISO (ganancia) hace que los píxeles sean más sensibles a la luz, por lo que la trama se mueve hacia la izquierda.
test_raw_exposure_s=55.png
(10⁰ es 1 ms, 10¹ es 10 ms, 10⁻¹ es 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
prueba_raw_sensibilidad
Captura un conjunto de imágenes sin procesar con sensibilidades crecientes y mide el ruido (variación) en el 10% central de la imagen. Prueba que cada disparo sea más ruidoso que el anterior.
API probadas:
-
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
Pase: la variación aumenta con cada disparo.
test_raw_sensitivity_variance.png
prueba_reproceso_reducción_de_ruido
Prueba que android.noiseReduction.mode
se aplica para reprocesar solicitudes. Captura imágenes reprocesadas con la cámara poco iluminada. Utiliza una alta ganancia analógica para garantizar que la imagen capturada tenga ruido. Captura tres imágenes reprocesadas, con NR desactivado, "rápida" y "alta calidad". Captura una imagen reprocesada con baja ganancia y NR desactivada, y utiliza la variación de esto como base.
API probadas:
Pasar: RÁPIDO >= APAGADO, HQ >= RÁPIDO, HQ >> APAGADO
Trazado típico de SNR vs NR_MODE
prueba_tonemap_sequence
Prueba una secuencia de tomas con diferentes curvas de mapa de tonos. Captura 3 tomas manuales con un mapa de tonos lineal. Captura 3 tomas manuales con mapa de tonos predeterminado. Calcula el delta entre cada par de cuadros consecutivos.
API probadas:
Pasar: Hay 3 fotogramas idénticos seguidos de un conjunto diferente de 3 fotogramas idénticos.
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
Prueba que todos los tamaños y formatos informados para la captura de imágenes funcionan. Utiliza una solicitud manual con un mapa de tonos lineal para que YUV y JPEG tengan el mismo aspecto cuando se convierten mediante el módulo image_processing_utils
. Las imágenes no se guardan de forma predeterminada, pero se pueden guardar habilitando debug_mode
.
API probadas:
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
-
android.graphics.ImageFormat#JPEG
Pasa: Todos los centros de imágenes tienen una diferencia máxima de RMS (valor cuadrático medio de una señal) en imágenes convertidas en RGB con un 3 % de la imagen YUV de mayor resolución.
test_yuv_jpeg_all.png
prueba_yuv_plus_dng
Prueba que los tamaños y formatos informados para la captura de imágenes funcionan.
API probadas:
Pasa: la prueba completa y devuelve las imágenes solicitadas.
test_yuv_plus_dng.jpg
test_yuv_plus_jpeg
Prueba la captura de un solo cuadro como salida YUV y JPEG. Utiliza una solicitud manual con un mapa de tonos lineal para que YUV y JPEG tengan el mismo aspecto cuando se convierten mediante el módulo image_processing_utils
.
API probadas:
-
android.hardware.camera2.CaptureRequest#TONEMAP_CURVE
-
android.hardware.camera2.CaptureRequest#TONEMAP_MODE
-
android.graphics.ImageFormat#JPEG
Pasa: las imágenes YUV y JPEG son similares y tienen menos del 1% de diferencia RMS (valor cuadrático medio de una señal).
test_yuv_plus_jpg_jpg.jpg | test_yuv_plus_jpeg_yuv.jpg |
prueba_yuv_plus_raw
Prueba la captura de un solo cuadro como salidas RAW/RAW10/RAW12 y YUV, si es compatible. Utiliza una solicitud manual con un mapa de tonos lineal, por lo que se espera que raw y YUV sean iguales. Compara los valores RGB centrales del 10% de las imágenes convertidas RGB. Registra android.shading.mode
.
API probadas:
-
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
Pasa: las imágenes YUV y sin formato son similares y tienen menos del 3,5 % de diferencia RMS (valor cuadrático medio de una señal).
test_yuv_plus_raw_shading=1_raw.jpg | test_yuv_plus_raw_shading=1_yuv.jpg |
escena2_a
scene2_a tiene tres caras con fondo gris y ropa neutra. Los rostros se eligen para tener una amplia gama de tonos de piel. El gráfico debe tener la orientación correcta para que la detección de rostros funcione de manera óptima.
escena2_a
prueba_auto_flash
Prueba que el flash automático se activa en una escena oscura. Verifica que se active el flash automático comprobando que el centro de la imagen del mosaico tenga un gradiente grande. Para activar el flash automático, la tableta y las luces del equipo de prueba deben estar apagadas. La prueba apaga la tableta y las luces se pueden apagar automáticamente con el controlador Arduino. La escena debe estar completamente oscura para que la prueba funcione correctamente. Como tal, la abertura trasera de la tableta debe estar completamente cubierta por la tableta de escena, y la abertura frontal debe estar cubierta por una abertura y el teléfono DUT para bloquear la entrada de luz parásita al equipo.
API probadas:
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_AVAILABLE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#FLASH_MODE
Pasar: El centro de la imagen del mosaico tiene un gradiente grande, lo que significa que se disparó el flash automático.
prueba_autoframing
Prueba el comportamiento de encuadre automático del dispositivo de la cámara. Realiza un zoom grande de modo que ninguno de los rostros de la escena sea visible, habilita el modo de encuadre automático configurando AUTOFRAMING
en CaptureRequest
en True
y verifica si todos los rostros en la escena original se pueden detectar cuando el estado converge (es decir, cuando AUTOFRAMING_STATE
en CaptureResult
está configurado en AUTOFRAMING_STATE_CONVERGED
).
API probadas:
-
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
Pasar: Se detectan las tres caras.
prueba_display_p3
Pruebas Muestra la captura P3 en JPEG utilizando la API ColorSpaceProfiles
. Comprueba que el JPEG capturado tenga un perfil ICC apropiado en su encabezado y que la imagen contenga colores fuera de la gama sRGB.
API probadas:
-
android.hardware.camera2.params.ColorSpaceProfiles
-
android.hardware.camera2.params.SessionConfiguration#setColorSpace
Pasa: El JPEG contiene un perfil Display P3 ICC y colores fuera de la gama sRGB.
efectos_prueba
Captura fotogramas para los efectos de cámara compatibles y comprueba si se generan correctamente. La prueba solo verifica los efectos OFF
y MONO
, pero guarda imágenes para todos los efectos admitidos.
API probadas:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
-
android.hardware.camera2.CaptureRequest#CONTROL_EFFECT_MODE
Pasar: Captura la imagen de la escena con los efectos OFF
y una imagen monocromática con los efectos configurados en MONO
.
prueba_efectos_MONO.jpg
test_format_combos
Prueba diferentes combinaciones de formatos de salida.
API probadas:
android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes()
android.hardware.camera2.CameraCaptureSession#captureBurst()
Pase: Todas las combinaciones se capturan con éxito.
test_jpeg_calidad
Prueba la calidad de compresión JPEG de la cámara. Mejora las cualidades JPEG a través de android.jpeg.quality
y garantiza que las tablas de cuantificación cambien correctamente.
API probadas:
Pasa: La matriz de cuantificación disminuye con el aumento de la calidad. (La matriz representa el factor de división).
Promedios de matriz DQT luma/croma de la cámara trasera del Pixel 4 frente a la calidad JPEG
Ejemplo de prueba fallida
Tenga en cuenta que para imágenes de muy baja calidad (jpeg.quality < 50), no hay ningún aumento en la compresión en la matriz de cuantificación.
test_num_caras
Prueba la detección de rostros.
API probadas:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pase: Encuentra tres caras.
test_num_faces_fd_mode_1.jpg
test_preview_min_frame_rate
Prueba que la velocidad de fotogramas de la vista previa disminuye correctamente en una escena oscura. Para que esta prueba funcione correctamente, el controlador o el operador de prueba deben apagar las luces del equipo de prueba manualmente.
API probadas:
-
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
Pasa: la velocidad de fotogramas de la vista previa está en el mínimo del rango de velocidad de fotogramas solicitado y la variación entre fotogramas es menor que la tolerancia absoluta establecida en la prueba.
prueba_reproceso_uv_swap
Prueba que el reprocesamiento YUV no intercambia los planos U y V. Esto se detecta calculando la suma de diferencias absolutas (SAD) entre la imagen reprocesada y una captura no reprocesada. Si el intercambio de los planos U y V de salida de la captura reprocesada da como resultado un aumento de SAD, entonces se supone que la salida tiene los planos U y V correctos.
API probadas:
-
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
Pase: Los aviones U y V no se intercambian.
prueba_reproceso_uv_swap.png
escena2_b
test_num_caras
Prueba la detección de rostros con una mayor diversidad de tonos de piel en escenas de rostros.
API probadas:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pase: Encuentra 3 caras.
test_num_faces_fd_mode_1.jpg
test_yuv_jpeg_capture_sameness
Captura dos imágenes utilizando los formatos YUV y JPEG comunes más grandes con la misma relación de aspecto que el formato JPEG más grande sin exceder una resolución de 1920x1440. Establece jpeg.quality
en 100 y captura una solicitud de superficie dual. Convierte ambas imágenes a matrices RGB y calcula la diferencia cuadrática media (RMS) 3D entre las dos imágenes.
API probadas:
-
android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
-
android.hardware.camera2.CaptureRequest#JPEG_QUALITY
-
android.graphics.ImageFormat#JPEG
Pasa: las imágenes YUV y JPEG son similares y tienen menos del 1% de diferencia RMS (valor cuadrático medio de una señal).
escena2_c
test_num_caras
Prueba la detección de rostros con una mayor diversidad de tonos de piel en escenas de rostros.
API probadas:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pase: Encuentra 3 caras.
test_num_faces_fd_mode_1.jpg
test_jpeg_capture_perf_class
Prueba la latencia de captura JPEG para la clase de rendimiento S como se especifica en la sección 2.2.7.2 Cámara en el CDD.
Aprobado: DEBE tener una latencia de captura JPEG de la cámara 2 < 1000 ms para una resolución de 1080p según lo medido por la prueba de rendimiento de la cámara CTS en condiciones de iluminación ITS (3000 K) para ambas cámaras principales.
test_camera_launch_perf_class
Prueba la latencia de inicio de la cámara para la clase de rendimiento S como se especifica en la sección 2.2.7.2 Cámara en el CDD.
Aprobado: DEBE tener una latencia de inicio de la cámara 2 (cámara abierta al primer fotograma de vista previa) <600 ms, según lo medido por la prueba de rendimiento de la cámara CTS en condiciones de iluminación ITS (3000 K) para ambas cámaras principales.
escena2_d
test_num_caras
Prueba la detección de rostros con una mayor diversidad de tonos de piel en escenas de rostros.
API probadas:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pase: Encuentra 3 caras.
escena2_e
imagen_continua_prueba
Se capturan 50 fotogramas con resolución VGA con la solicitud de captura configurando primero android.control.afMode = 4 (CONTINUOUS_PICTURE).
API probadas:
-
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
Pase: el sistema 3A se estabiliza al final de una captura de 50 fotogramas.
test_num_caras
Prueba la detección de rostros con una mayor diversidad de tonos de piel en escenas de rostros.
API probadas:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pase: Encuentra 3 caras.
escena2_f
scene2_f tiene tres caras con fondo blanco y ropa blanca. Los rostros tienen una amplia gama de tonos de piel y alto contraste con el fondo.
escena2_f
test_num_caras
Prueba la detección de rostros con una mayor diversidad de tonos de piel en escenas de rostros.
API probadas:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pase: Encuentra 3 caras.
test_num_faces_fd_mode_1.jpg
escena3
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.