این صفحه فهرست جامعی از تستهای مجموعه تست تصویر دوربین (ITS) را ارائه میکند که بخشی از تأییدکننده مجموعه تست سازگاری Android (CTS) است. تستهای ITS تستهای عملکردی هستند، به این معنی که کیفیت تصویر را اندازهگیری نمیکنند، اما همه عملکردهای دوربین تبلیغاتی همانطور که انتظار میرود کار میکنند. این سند به توسعهدهندگان و آزمایشکنندگان اجازه میدهد بفهمند که آزمایشهای فردی چه میکنند و چگونه خطاهای آزمایش را اشکالزدایی کنند.
دوربین ITS gates را بر اساس ویژگی های دوربین مورد نیاز، سطح 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
: گرفتن ابرداده، لرزش، ژیروسکوپ، لرزش -
scene1
: جبران نوردهی، حساسیت، مقدار نوردهی (EV)، YUV در مقابل JPEG و RAW -
scene2
: تشخیص چهره، آزمایش هایی که نیاز به صحنه های رنگی دارند -
scene3
: بهبود لبه، حرکت لنز -
scene4
: نسبت تصویر، برش، میدان دید -
scene5
: سایه زنی لنز -
scene6
: زوم -
scene7
: سوئیچ چند دوربین -
scene8
: نورسنجی خودکار (AE) و نورسنجی خودکار منطقه (AWB). -
scene9
: فشرده سازی JPEG -
scene_extensions
: پسوند دوربین -
scene_tele
: تعویض لنز تله فوتو -
scene_flash
: فلاش خودکار، حداقل نرخ فریم -
scene_video
: افت فریم -
sensor_fusion
: تنظیم زمان دوربین و ژیروسکوپ -
feature_combination
: ترکیب ویژگی ها -
scene_ip
: برابری تصویر بین برنامه پیشفرض دوربین و برنامه دوربین Jetpack (JCA)
برای توضیح هر صحنه به بخش های جداگانه مراجعه کنید.
صحنه 0
آزمایش ها به اطلاعات صحنه خاصی نیاز ندارند. اما برای تست ژیروسکوپ و لرزش گوشی باید ثابت باشد.
test_jitter
لرزش را در مهرهای زمانی دوربین اندازه گیری می کند.
API های آزمایش شده:
-
android.hardware.camera2.CaptureResult#SENSOR_TIMESTAMP
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
پاس: حداقل 30 میلیثانیه دلتا بین فریمها وجود دارد.
در شکل زیر به محدوده کوچک محور y توجه کنید. جیتر در واقع در این طرح کوچک است.
شکل 1. نمودار test_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
Pass: سطح سختافزار، rollingShutterSkew
، برچسبهای frameDuration
، timestampSource
، croppingType
، blackLevelPattern
، pixel_pitch
، میدان دید (FoV) و فاصله هایپرکانونی موجود هستند و مقادیر معتبری دارند.
test_request_capture_match
آزمایش می کند که دستگاه با بازخوانی فراداده ضبط، مقادیر نوردهی و افزایش صحیح را می نویسد.
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_events
برای دستگاههایی که پشتیبانی از همجوشی حسگر را تبلیغ میکنند، این آزمایش بررسی میکند که آیا دستگاه رویدادهای حسگر را جستجو و چاپ میکند یا خیر. سنسورهای مورد انتظار شتاب سنج، ژیروسکوپ و مغناطیس سنج هستند. این تست فقط در صورتی کار می کند که صفحه نمایش روشن باشد، یعنی دستگاه در حالت آماده به کار نیست.
API های آزمایش شده:
پاس: رویدادها برای هر سنسور دریافت می شود.
test_solid_color_test_pattern
آزمایشهایی که الگوهای تست رنگ ثابت به درستی برای بیصدا کردن دوربین ایجاد میشوند. اگر قطع دوربین پشتیبانی می شود، الگوهای تست رنگ ثابت باید پشتیبانی شوند. اگر بیصدا کردن دوربین پشتیبانی نمیشود، الگوهای تست رنگ ثابت فقط در صورتی آزمایش میشوند که قابلیت تبلیغ شده باشد.
اگر تصاویر خام پشتیبانی می شوند، تخصیص رنگ نیز آزمایش می شود. رنگ های تست شده مشکی، سفید، قرمز، آبی و سبز هستند. برای دوربین هایی که از تصاویر خام پشتیبانی نمی کنند، فقط مشکی تست شده است.
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_pattern
پارامتر android.sensor.testPatternMode
را برای گرفتن فریمها برای هر الگوی آزمایشی معتبر آزمایش میکند و بررسی میکند که فریمها برای رنگهای ثابت و نوارهای رنگی درست تولید شدهاند. این آزمون شامل مراحل زیر است:
- تصاویر را برای همه الگوهای تست پشتیبانی شده می گیرد.
- بررسی صحت الگوی تست رنگ ثابت و نوارهای رنگی را انجام می دهد.
API های آزمایش شده:
-
android.hardware.camera2.CameraCharacteristic#SENSOR_AVAILABLE_TEST_PATTERN_MODES
-
android.hardware.camera2.CaptureResult#SENSOR_TEST_PATTERN_MODE
پاس: الگوهای تست پشتیبانی شده به درستی تولید می شوند.
شکل 2. نمونه test_test_patterns.
test_tonemap_curve
تبدیل الگوی آزمایشی از خام به 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 شبیه یکدیگر هستند.
شکل 3. test_tonemap_curve مثال خام.
شکل 4. test_tonemap_curve مثال YUV.
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
پاس: مهرهای زمانی حرکت بین دو مهر زمانی تصویر هستند.
test_vibration_restriction
آزمایش می کند که آیا لرزش دستگاه مطابق انتظار عمل می کند یا خیر.
API های آزمایش شده:
-
android.hardware.Sensor
-
android.hardware.SensorEvent
-
android.hardware.Sensor#TYPE_ACCELEROMETER
-
android.os.Vibrator
-
android.hardware.camera2.CameraDevice#setCameraAudioRestriction
پاس: هنگامی که توسط API محدودیت صوتی دوربین بیصدا میشود، دستگاه نمیلرزد.
صحنه 1_1
scene1
یک نمودار خاکستری است. نمودار خاکستری باید 30 درصد از دوربین FoV مرکز را پوشش دهد. انتظار می رود نمودار خاکستری 3A (AE، AWB و AF) را به طور متوسط به چالش بکشد زیرا منطقه مرکزی هیچ ویژگی ندارد. با این حال، درخواست عکسبرداری کل صحنه را مشخص می کند که شامل ویژگی های کافی برای همگرایی 3A است.
دوربین های RFoV را می توان در دستگاه تست WFoV یا RFoV آزمایش کرد. اگر یک دوربین RFoV در دستگاه تست WFoV آزمایش شود، نمودار با 2/3 مقیاس می شود تا برخی از مرزها برای نمودار خاکستری در FoV مشخص شود تا به همگرایی 3A کمک کند. برای توضیحات دقیق تر از دستگاه های تست دوربین، دوربین ITS-in-a-a-box را ببینید.
شکل 5. نمودار صحنه1 در اندازه کامل (چپ)، نمودار مقیاس شده 2/3 (راست).
test_ae_precapture_trigger
هنگام استفاده از ماشه پیش گرفتن، دستگاه حالت AE را آزمایش می کند. پنج درخواست دستی را با AE غیرفعال می گیرد. آخرین درخواست دارای یک ماشه Precapture 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 دوربین مطابقت دارد.
شکل 6. نمونه خودکار test_auto_vs_manual.
شکل 7. مثال test_auto_vs_manual white balance.
شکل 8. مثال تبدیل تعادل رنگ سفید دستی test_auto_vs_manual.
تست_سیاه_سفید
تست هایی که دستگاه تصاویر سیاه و سفید کامل تولید می کند. دو عکس می گیرد، اولی با بهره بسیار کم و نوردهی کوتاه که منجر به یک عکس سیاه می شود و دومی با بهره بسیار زیاد و نوردهی طولانی که منجر به یک عکس سفید می شود.
API های آزمایش شده:
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
Pass: تصاویر سیاه و سفید تولید می کند. کانال های اشباع شده تصاویر سفید دارای مقادیر RGB [255، 255، 255] با حاشیه خطای کمتر از 1٪ اختلاف هستند.
شکل 9. test_black_white، مثال سیاه.
شکل 10. test_black_white، نمونه سفید.
شکل 11. test_black_white، نمودار به معنای مثال است.
test_burst_capture
تأیید می کند که کل خط لوله ضبط می تواند با سرعت ضبط در اندازه کامل و زمان CPU مطابقت داشته باشد.
API های آزمایش شده:
Pass: مجموعهای از تصاویر در اندازه کامل را میگیرد، افت فریم و روشنایی تصویر را بررسی میکند.
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 یکسان هستند.
Fail: یک افزایش یا کاهش نمودار میانگین RGB را در ابتدای هر انفجار نشان می دهد
- تحمل برای
first_API_level
<30 3٪ است - تحمل برای
first_API_level
>= 30 2٪ است
شکل 12. نمونه میانگین test_burst_sameness_manual.
شکل 13. test_burst_sameness_manual_plot_means
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 در مرکز برش داده می شوند اما تصاویر خام نه.
شکل 14. test_crop_region_raw comp raw نمونه محصول.
شکل 15. test_crop_region_raw comp raw مثال کامل.
شکل 16. نمونه برش test_crop_region_raw comp YUV.
شکل 17. نمونه کامل test_crop_region_raw YUV.
test_crop_regions
آزمایش هایی که مناطق کشت کار می کنند. یک تصویر کامل می گیرد و وصله هایی از پنج ناحیه مختلف (گوشه ها و مرکز) ایجاد می کند. با مجموعه برش برای پنج منطقه عکس می گیرد. مقادیر پچ و برش تصویر را با هم مقایسه می کند.
API های آزمایش شده:
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_ACTIVE_ARRAY_SIZE
-
android.hardware.camera2.CaptureRequest#SCALER_CROP_REGION
Pass: تصویر ناحیه برش خورده با وصله مربوط به تصویر برش مطابقت دارد.
test_ev_compensation
آزمایش هایی که نشان می دهد جبران ارزش نوردهی (EV) اعمال می شود. این آزمون شامل یک بخش مقدماتی و یک بخش پیشرفته است.
بخش اصلی آزمایش می کند که جبران EV با استفاده از محدوده ایجاد شده با CONTROL_AE_COMPENSATION_STEP
اعمال می شود. در هر مقدار جبرانی هشت فریم گرفته می شود.
بخش پیشرفته نوردهی را در هشت مرحله افزایش می دهد و روشنایی اندازه گیری شده را در مقابل روشنایی مورد انتظار بررسی می کند. مقادیر مورد انتظار از روشنایی تصویر بدون اعمال جبران EV محاسبه می شود و اگر مقادیر محاسبه شده از محدوده مقدار واقعی تصویر بیشتر شود، مقدار مورد انتظار اشباع می شود. اگر مقادیر مورد انتظار و مقادیر اندازهگیری شده مطابقت نداشته باشند یا اگر تصاویر در عرض پنج مرحله بیش از حد نوردهی کنند، آزمایش با شکست مواجه میشود.
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.CaptureResult#CONTROL_AE_STATE
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_LOCK
-
android.hardware.camera2.CaptureResult#TONEMAP_CURVE
-
android.hardware.camera2.CaptureResult#TONEMAP_MODE
پاس بخش اصلی: تصاویر افزایش نوردهی را بدون نوردهی بیش از حد در پنج مرحله نشان میدهند.
شکل 18. test_ev_compensation_basic.
پاس بخش پیشرفته: افزایش لوما را با افزایش تنظیم جبران EV ثبت می کند. هشت فریم گرفته شده برای هر تنظیم جبران EV دارای مقادیر لوما پایدار هستند.
شکل 19. test_ev_compensation_advanced_plot_means.
test_exposure_x_iso
تست هایی که نشان می دهد نوردهی ثابت به عنوان ISO و زمان نوردهی متفاوت است. مجموعهای از عکسها را میگیرد که ISO و زمان نوردهی برای متعادل کردن یکدیگر انتخاب شدهاند. نتایج باید روشنایی یکسانی داشته باشند، اما در طول توالی تصویر باید نویزتر شود. تأیید می کند که مقادیر میانگین پیکسل های نمونه به یکدیگر نزدیک هستند. تأیید می کند که تصاویر روی 0 یا 1 چسبانده نشده اند (که باعث می شود آنها مانند خطوط صاف به نظر برسند). با تنظیم پرچم debug
در فایل پیکربندی، آزمایش را می توان با تصاویر RAW نیز اجرا کرد.
API های آزمایش شده:
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
پاس: تصاویر دارای روشنایی یکسان هستند، اما با ISO بالاتر نویزتر می شوند. صفحات RGB زمانی که مقدار ISO*exposure در فضای بهره آزمایش شده ثابت باشد صاف هستند.
مکانیسم شکست: در شکل زیر، با افزایش مقادیر ضریب بهره (محور x)، مقادیر میانگین صفحه نرمال شده RGB (محور y) شروع به انحراف از مقادیر ضریب بهره کم می کند.
شکل 20. test_exposure_plot_means.
شکل 21. test_exposure_mult=1.00.
شکل 22. test_exposure_mult=64.00.
test_latching
تست هایی که تنظیمات (نور و افزایش) روی قاب سمت راست دوربین های FULL
و LEVEL_3
می چسبند. یک سری عکس با استفاده از درخواست های پشت سر هم می گیرد و پارامترهای درخواست عکس برداری را بین عکس ها تغییر می دهد. بررسی می کند که تصاویر دارای ویژگی های مورد انتظار هستند.
API های آزمایش شده:
پاس: تصاویر [2، 3، 6، 8، 10، 12، 13] ISO یا نوردهی را افزایش داده اند و با میانگین RGB بالاتر در نمودار زیر نشان داده می شوند.
شکل 23. نمودار test_latching به معنای مثال است.
شکل 24. test_latching i=00.
شکل 25. test_latching i=01.
شکل 26. test_latching i=02.
شکل 27. test_latching i=03.
شکل 28. test_latching i=04.
شکل 29. test_latching i=05.
شکل 30. test_latching i=06.
شکل 31. test_latching i=07.
شکل 32. test_latching i=08.
شکل 33. test_latching i=09.
شکل 34. test_latching i=10.
شکل 35. test_latching i=11.
شکل 36. test_latching i=12.
تست_خطی
آزمایش می کند که پردازش دستگاه را می توان به پیکسل های خطی معکوس کرد. دنباله ای از عکس ها را با دستگاه به سمت یک هدف یکنواخت می گیرد.
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 باید به صورت خطی با افزایش حساسیت افزایش یابد.
شکل 37. نمودار test_linearity به معنای مثال است.
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
پاس: عکسها یکدست به نظر میرسند.
شکل 38. test_locked_burst frame0 مثال.
شکل 39. test_locked_burst frame1 مثال.
شکل 40. نمونه test_locked_burst frame2.
صحنه 1_2
scene 1_2
از لحاظ عملکردی یک کپی یکسان از scene 1_1
است که ساختار زیرصحنه ای را برای کاهش مدت زمان طولانی scene 1
اجرا می کند.
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 با توجه به تبدیل افزایش می یابد.
شکل 41. نمودار test_param_color_correction به معنای مثال است.
در شکلهای زیر، محور x درخواستهای گرفتن است: 0 = وحدت، 1 = تقویت قرمز، و 2 = تقویت آبی.
شکل 42. test_param_color_correction req=0 مثال واحد.
شکل 43. test_param_color_correctness req=1 مثال تقویت قرمز.
شکل 44. test_param_color_correction req=2 مثال تقویت آبی.
test_param_flash_mode
آزمایش می کند که پارامتر android.flash.mode
اعمال می شود. به صورت دستی نوردهی را در سمت تاریک قرار می دهد، به طوری که مشخص است که فلاش روشن شده است یا نه، و از یک نقشه خطی استفاده می کند. مرکز را با تصویر کاشی بررسی می کند تا ببیند آیا یک گرادیان بزرگ ایجاد شده است تا بررسی کند که فلاش روشن شده است یا خیر.
API های آزمایش شده:
Pass: مرکز تصویر کاشی دارای یک گرادیان بزرگ است، به این معنی که فلاش شلیک می شود.
شکل 45. test_param_flash_mode 1 مثال.
شکل 46. test_param_flash_mode یک نمونه کاشی.
شکل 47. test_param_flash_mode 2 مثال.
شکل 48. نمونه دو کاشی test_param_flash_mode.
test_param_noise_reduction
آزمایش می کند که هنگام تنظیم پارامتر android.noiseReduction.mode
به درستی اعمال شود. با دوربین کم نور عکس می گیرد. از یک بهره آنالوگ بالا برای کمک به اطمینان از نویز بودن تصویر گرفته شده استفاده می کند. سه عکس برای NR خاموش، سریع و با کیفیت بالا می گیرد. همچنین تصویری با بهره کم و NR خاموش می گیرد و از واریانس آن به عنوان خط پایه استفاده می کند. هر چه نسبت سیگنال به نویز (SNR) بیشتر باشد، کیفیت تصویر بهتر است.
API های آزمایش شده:
Pass: SNR با حالت های مختلف کاهش نویز متفاوت است و مانند نمودار زیر رفتار می کند:
شکل 49. نمونه SNRs نمودار test_param_noise_reduction.
0: OFF، 1: FAST، 2: HQ، 3: MIN، 4: ZSL
شکل 50. test_param_noise_reduction high gain nr=0 مثال.
شکل 51. test_param_noise_reduction high gain nr=1 مثال.
شکل 52. test_param_noise_reduction high gain nr=2 مثال.
شکل 53. نمونه test_param_noise_reduction high gain nr=3.
شکل 54. test_param_noise_reduction مثال بهره پایین.
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
پاس: حالتهای سایهزنی تغییر میکنند و نقشههای سایهزنی لنز مطابق انتظار اصلاح میشوند.
شکل 55. نقشه سایه زنی لنز test_param_shading_mode، حالت 0 حلقه 0 مثال.
شکل 56. نقشه سایه زنی لنز test_param_shading_mode، حالت 1 حلقه 0 مثال.
شکل 57. نقشه سایه زنی لنز test_param_shading_mode، حالت 2 حلقه 0 مثال.
test_param_tonemap_mode
آزمایش هایی که پارامتر android.tonemap.mode
اعمال می شود. منحنی های نقشه رنگی مختلف را برای هر کانال R، G، B اعمال می کند و بررسی می کند که تصاویر خروجی مطابق انتظار اصلاح شده باشند. این آزمون از دو تست test1
و test2
تشکیل شده است.
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
: نقشه رنگی یکسان، اما طول متفاوت. تصاویر هم همینطور.
شکل 58. test_param_tonemap_mode با n=0.
شکل 59. test_param_tonemap_mode با n=1.
test_post_raw_sensitivity_boost
افزایش حساسیت خام را بررسی می کند. مجموعه ای از تصاویر خام و YUV را با حساسیت های مختلف می گیرد، ترکیب تقویت حساسیت خام را پست می کند، و بررسی می کند که آیا میانگین پیکسل خروجی با تنظیمات درخواست مطابقت دارد یا خیر.
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
پاس: با افزایش بوست، تصاویر خام تیره تر می شوند در حالی که روشنایی تصاویر YUV ثابت می ماند.
شکل 60. test_post_raw_sensitivity_boost raw s=3583 boost=0100 مثال.
شکل 61. test_post_raw_sensitivity_boost raw s=1792 boost=0200 مثال.
شکل 62. test_post_raw_sensitivity_boost raw s=0896 boost=0400 مثال.
شکل 63. test_post_raw_sensitivity_boost raw s=0448 boost=0800 مثال.
شکل 64. test_post_raw_sensitivity_boost raw s=0224 boost=1600 مثال.
شکل 65. test_post_raw_sensitivity_boost raw s=0112 boost=3199 مثال.
شکل 66. test_post_raw_sensitivity_boost نمودار خام به معنای مثال است.
شکل 67. test_post_raw_sensitivity_boost YUV s=0112 boost=3199 مثال.
شکل 68. test_post_raw_sensitivity_boost YUV s=0448 boost=0800 مثال.
شکل 69. test_post_raw_sensitivity_boost YUV s=0896 boost=0400 مثال.
شکل 70. test_post_raw_sensitivity_boost YUV s=1792 boost=0200 مثال.
شکل 71. test_post_raw_sensitivity_boost YUV s=3585 boost=0100 مثال.
شکل 72. test_post_raw_sensitivity_boost_yuv_plot_means
test_raw_exposure
مجموعه ای از تصاویر خام را با افزایش زمان نوردهی می گیرد و مقادیر پیکسل را اندازه گیری می کند.
API های آزمایش شده:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
Pass: افزایش ISO (بهره) پیکسل ها را نسبت به نور حساس تر می کند، بنابراین نمودار به سمت چپ حرکت می کند.
شکل 73. test_raw_exposure ISO=55 مثال.
10⁰ 1 ms، 101 10 ms و 10-1 0.1 ms است.
شکل 74. test_raw_exposure ISO=132 مثال.
شکل 75. test_raw_exposure ISO=209 مثال.
شکل 76. test_raw_exposure ISOs=286 مثال.
شکل 77. test_raw_exposure ISO=363 مثال.
شکل 78. test_raw_exposure ISO=440 مثال.
test_reprocess_noise_reduction
تست هایی که android.noiseReduction.mode
برای پردازش مجدد درخواست ها اعمال می شود. تصاویر پردازش شده را با دوربین کم نور می گیرد. از یک بهره آنالوگ بالا برای تأیید نویز بودن تصویر ضبط شده استفاده می کند. سه تصویر پردازش شده برای NR خاموش، سریع و با کیفیت بالا می گیرد. یک تصویر پردازش مجدد با بهره کم و NR خاموش می گیرد و از واریانس آن به عنوان خط پایه استفاده می کند.
API های آزمایش شده:
پاس: FAST >= OFF، HQ >= FAST، و HQ >> OFF.
شکل 79. نمونه نمودار SNR معمولی در مقابل حالت NR.
test_tonemap_sequence
دنبالهای از عکسها را با منحنیهای نقشه رنگی مختلف آزمایش میکند. 3 عکس دستی با نقشه رنگی خطی می گیرد. 3 عکس دستی با نقشه آهنگ پیش فرض می گیرد. دلتا را بین هر جفت فریم متوالی محاسبه می کند.
API های آزمایش شده:
پاس: سه فریم یکسان و به دنبال آن یک مجموعه متفاوت از سه فریم یکسان وجود دارد.
شکل 80. test_tonemap_sequence i=0 مثال.
شکل 81. test_tonemap_sequence i=1 مثال.
شکل 82. test_tonemap_sequence i=2 مثال.
شکل 83. test_tonemap_sequence i=3 مثال.
شکل 84. test_tonemap_sequence i=4 مثال.
شکل 85. test_tonemap_sequence i=5 مثال.
test_yuv_jpeg_all
تستهایی که تمام اندازهها و فرمتهای گزارششده برای عکسبرداری کار میکنند. از یک درخواست دستی با یک نقشه خطی استفاده می کند تا 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 هستند.
شکل 86. نمونه test_yuv_jpeg_all.
test_yuv_plus_dng
تست هایی که اندازه ها و فرمت های گزارش شده برای ثبت تصویر کار می کنند.
API های آزمایش شده:
Pass: تست تصاویر درخواستی را تکمیل و برمی گرداند.
شکل 87. نمونه test_yuv_plus_dng.
صحنه 1_3
scene 1_3
از لحاظ عملکردی یک کپی یکسان از scene 1_1
است که ساختار زیرصحنه ای را برای کاهش مدت زمان طولانی scene 1
پیاده سازی می کند.
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
پاس: ابرداده برای همه عکسبرداریها معتبر است و تنظیمات دستی در ضبط خودکار دوم به بیرون درز نمیکنند. تصحیح سایه لنز را برای عکسبرداری ترسیم می کند.
شکل 88. test_capture_result_plot_lsc_auto_ch0.
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 اندازه گیری شده مطابقت دارد.
شکل 89. test_dng_noise_model_plog.
test_jpeg
آزمایشهایی که تصاویر YUV و تصاویر JPEG دستگاه را تبدیل کردهاند یکسان به نظر میرسند. تست مرکز 10% تصویر را می گیرد و مقدار RGB را محاسبه می کند و مطابقت آنها را تأیید می کند.
API های آزمایش شده:
Pass: میانگین تفاوت RGB بین هر تصویر کمتر از 3٪ است.
شکل 90. test_jpeg_fmt=jpg.jpg.
شکل 91. test_jpeg=fmt=yuv.jpg.
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
پاس: هر شات نویزتر از شلیک قبلی است، زیرا بهره در حال افزایش است.
از واریانس سلول شبکه آمار مرکز استفاده می کند.
شکل 92. test_raw_burst_sensitivity_variance.
test_raw_sensitivity
مجموعه ای از تصاویر خام را با افزایش حساسیت می گیرد و نویز (واریانس) در مرکز 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
پاس: با هر ضربه واریانس افزایش می یابد.
شکل 93. test_raw_sensitivity_variance.
test_yuv_plus_jpeg
گرفتن یک فریم را به عنوان خروجی YUV و JPEG آزمایش می کند. از یک درخواست دستی با یک نقشه خطی استفاده می کند تا 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 (مقدار سیگنال) تفاوت دارند.
شکل 94. test_yuv_plus_jpeg با فرمت JPEG.
شکل 95. test_yuv_plus_jpeg با فرمت YUV.
test_yuv_plus_raw
در صورت پشتیبانی، گرفتن یک فریم را به صورت خام (10 بیت و 12 بیت خام) و خروجی YUV آزمایش می کند. از یک درخواست دستی با نقشه خطی استفاده می کند، بنابراین انتظار می رود خام و YUV یکسان باشند. مقادیر RGB 10% مرکز تصاویر تبدیل شده را با هم مقایسه می کند. گزارشات android.shading.mode
.
API های آزمایش شده:
-
android.hardware.camera2.CameraMetadata#REQUEST_AVAILABLE_CAPABILITIES_RAW
-
android.hardware.camera2.CaptureResult#STATISTICS_LENS_SHADING_CORRECTION_MAP
-
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 و خام مشابه هستند و کمتر از 3.5٪ RMS (مقدار ریشه میانگین مربع سیگنال) تفاوت دارند.
شکل 96. test_yuv_plus_raw_shading=1_raw.jpg.
شکل 97. test_yuv_plus_raw_shading=1_yuv.jpg.
آزمون_حساسیت_اولویت
CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
را در تنظیمات ISO مختلف آزمایش می کند تا ارتباط بین ISO بالاتر و سطوح نویز افزایش یافته را تأیید کند.
API های آزمایش شده:
-
android.hardware.camera2.CameraMetadata#CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureResult#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_PRIORITY_MODE
-
android.hardware.camera2.CaptureResult#CONTROL_AE_PRIORITY_MODE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureResult#CONTROL_AE_MODE
-
android.hardware.camera2.CameraMetadata#CONTROL_AE_MODE_ON
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AE_AVAILABLE_PRIORITY_MODES
Pass: ISO بالاتر منجر به افزایش سطح نویز می شود.
معیارهای رد شدن از آزمون
در صورت رعایت هر یک از معیارهای زیر، از آزمون test_sensitivity_priority.py
صرفنظر می شود:
- دستگاه دارای اولین سطح API (
first_api_level
) 35 یا کمتر است. - دستگاه
CONTROL_AE_PRIORITY_MODE_SENSOR_SENSITIVITY_PRIORITY
درCONTROL_AE_AVAILABLE_PRIORITY_MODES
تبلیغ نمی کند.
test_exposure_time_priority
CONTROL_AE_PRIORITY_MODE_SENSOR_EXPOSURE_TIME_PRIORITY
را در زمانهای مختلف نوردهی آزمایش میکند و روشنایی پایدار را در محدودهای که ISO میتواند جبران کند، بررسی میکند.
API های آزمایش شده:
-
android.hardware.camera2.CameraMetadata#CONTROL_AE_PRIORITY_MODE_SENSOR_EXPOSURE_TIME_PRIORITY
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureResult#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_PRIORITY_MODE
-
android.hardware.camera2.CaptureResult#CONTROL_AE_PRIORITY_MODE
-
android.hardware.camera2.CameraCharacteristics#SENSOR_INFO_SENSITIVITY_RANGE
-
android.hardware.camera2.CaptureResult#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureResult#CONTROL_AE_MODE
-
android.hardware.camera2.CameraMetadata#CONTROL_AE_MODE_ON
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AE_AVAILABLE_PRIORITY_MODES
پاس: روشنایی (در محدوده تحمل) در طول زمان نوردهی ثابت است اگر ISO در محدوده جبران آن باشد.
معیارهای رد شدن از آزمون
در صورت رعایت هر یک از معیارهای زیر، آزمون test_exposure_time_priority
نادیده گرفته میشود:
- دستگاه دارای اولین سطح API (
first_api_level
) 35 یا کمتر است. - دستگاه
CONTROL_AE_PRIORITY_MODE_SENSOR_EXPOSURE_TIME_PRIORITY
درCONTROL_AE_AVAILABLE_PRIORITY_MODES
تبلیغ نمی کند.
صحنه2_a
scene2_a
دارای سه چهره با زمینه خاکستری و لباس خنثی است. چهره ها به گونه ای انتخاب می شوند که طیف وسیعی از رنگ پوست داشته باشند. نمودار باید جهت گیری درستی داشته باشد تا تشخیص چهره به طور بهینه کار کند.
شکل 98. صحنه2_یک مثال.
test_autoframing
رفتار قاب خودکار دستگاه دوربین را آزمایش می کند. بزرگنمایی زیادی انجام می دهد به طوری که هیچ یک از چهره های صحنه قابل مشاهده نباشد، با تنظیم AUTOFRAMING
در CaptureRequest
روی True
، حالت قاب خودکار را فعال می کند، و بررسی می کند که آیا تمام چهره های صحنه اصلی در هنگام همگرا شدن وضعیت قابل AUTOFRAMING_STATE_CONVERGED
هستند (یعنی زمانی که AUTOFRAMING_STATE
در CaptureResult
تنظیم شده است.
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 حاوی نمایه نمایشگر P3 ICC و رنگهایی خارج از محدوده sRGB است.
test_effects
قاب را برای جلوه های دوربین پشتیبانی شده می گیرد و بررسی می کند که آیا آنها به درستی تولید شده اند یا خیر. این آزمایش فقط جلوههای OFF
و MONO
را بررسی میکند، اما تصاویر را برای همه جلوههای پشتیبانی شده ذخیره میکند.
API های آزمایش شده:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_AVAILABLE_EFFECTS
-
android.hardware.camera2.CaptureRequest#CONTROL_EFFECT_MODE
Pass: تصویر صحنه را با جلوههای OFF
و یک تصویر تک رنگ با جلوهها روی MONO
میگیرد.
شکل 99. test_effects_MONO.
test_exposure_keys_consistent
این تست میانگین لومای یک عکسبرداری با قابلیت AE را با یک عکس برداری غیرفعال شده با AE مقایسه می کند که به صورت دستی پارامترهای نوردهی (حساسیت، زمان نوردهی، مدت زمان فریم، افزایش حساسیت پس از خام) دریافت شده در CaptureResult
از عکسبرداری با قابلیت AE را اعمال می کند.
API های آزمایش شده:
-
android.hardware.camera2.CaptureRequest#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureRequest#SENSOR_FRAME_DURATION
-
android.hardware.camera2.CaptureRequest#CONTROL_POST_RAW_SENSITIVITY_BOOST
-
android.hardware.camera2.CaptureResult#SENSOR_SENSITIVITY
-
android.hardware.camera2.CaptureResult#SENSOR_EXPOSURE_TIME
-
android.hardware.camera2.CaptureResult#SENSOR_FRAME_DURATION
-
android.hardware.camera2.CaptureResult#CONTROL_POST_RAW_SENSITIVITY_BOOST
پاس: اختلاف نسبی لوما بین دو ضبط کمتر از 4 درصد است.
test_format_combos
ترکیب های مختلف فرمت های خروجی را آزمایش می کند.
API های آزمایش شده:
android.hardware.camera2.CameraCharacteristics#SCALER_STREAM_CONFIGURATION_MAP
android.hardware.camera2.params.StreamConfigurationMap#getOutputSizes()
android.hardware.camera2.CameraCaptureSession#captureBurst()
پاس: همه ترکیب ها با موفقیت ضبط می شوند.
test_num_faces
تشخیص چهره را آزمایش می کند.
API های آزمایش شده:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
پاس: سه چهره را پیدا می کند.
شکل 100. حالت تشخیص چهره test_num_faces 1 مثال.
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 تعویض نمی شوند.
شکل 101. نمونه test_reprocess_uv_swap.
صحنه2_ب
test_preview_num_faces
تشخیص چهره را در پیش نمایش با افزایش تنوع رنگ پوست در صحنه های صورت آزمایش می کند.
API های آزمایش شده:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pass: سه چهره با نشانههای چهره را در جعبههای محدودکننده چهره پیدا میکند.
شکل 102. حالت تشخیص چهره test_num_faces 1 مثال.
test_yuv_jpeg_capture_sameness
دو تصویر را با استفاده از بزرگترین فرمتهای رایج YUV و JPEG با نسبت ابعادی مشابه با بزرگترین فرمت JPEG با وضوح تصویر 1920x1440 میگیرد. jpeg.quality
را روی 100 تنظیم می کند و درخواست دو سطحی را می گیرد. هر دو تصویر را به آرایههای RGB تبدیل میکند و اختلاف ریشه سهبعدی میانگین مربع (RMS) بین دو تصویر را محاسبه میکند.
بهعلاوه، این آزمایش تأیید میکند که خروجیهای YUV برای همه موارد استفاده از جریان پشتیبانیشده تا حد معقولی شبیه به YUV با حالت استفاده STILL_CAPTURE
هستند.
API های آزمایش شده:
-
android.hardware.camera2.CameraCharacteristics#SCALER_AVAILABLE_STREAM_USE_CASES
-
android.hardware.camera2.CaptureRequest#JPEG_QUALITY
-
android.graphics.ImageFormat#JPEG
پاس: تصاویر YUV و JPEG برای مورد استفاده STILL_CAPTURE
کمتر از 3٪ RMS (مقدار ریشه میانگین مربع سیگنال) تفاوت دارند. YUV images for all supported use cases have less than 10% RMS difference from YUV images with the STILL_CAPTURE
use case.
scene2_c
test_num_faces
Tests face detection with increased skin tone diversity in face scenes.
APIs tested:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pass: Finds three faces.
Figure 103. test_num_faces face detection mode example.
test_jpeg_capture_perf_class
Tests JPEG capture latency for the S performance class as specified in section 2.2.7.2 Camera in the CDD.
Pass: MUST have camera2 JPEG capture latency < 1000 ms for 1080p resolution as measured by the CTS camera PerformanceTest under ITS lighting conditions (3000K) for both primary cameras.
test_camera_launch_perf_class
Tests camera launch latency for the S performance class as specified section 2.2.7.2 Camera in the CDD.
Pass: MUST have camera2 startup latency (open camera to first preview frame) < 600ms as measured by the CTS camera PerformanceTest under ITS lighting conditions (3000K) for both primary cameras.
test_default_camera_hdr
Tests that default camera capture is Ultra HDR for performance class 15 as specified in section 2.2.7.2 Camera of the CDD.
Pass: Default camera package capture MUST be Ultra HDR for a performance class 15 device.
scene2_d
test_preview_num_faces
Tests face detection in preview with increased skin tone diversity in face scenes.
APIs tested:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pass: Finds three faces with face landmarks in the face bounding boxes.
scene2_e
test_continuous_picture
50 VGA resolution frames are captured with the capture request first setting android.control.afMode = 4 (CONTINUOUS_PICTURE).
APIs tested:
-
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
Pass: 3A system settles by the end of a 50-frame capture.
test_num_faces
Tests face detection with increased skin tone diversity in face scenes.
APIs tested:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pass: Finds 3 faces.
scene2_f
scene2_f
has three faces with a white background and white clothing. The faces have a wide range of skin tones and high contrast with the background.
Figure 104. scene2_f example.
test_preview_num_faces
Tests face detection with increased skin tone diversity in face scenes.
APIs tested:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pass: Finds three faces with face landmarks in the face bounding boxes.
Figure 105. test_num_faces_fd_mode_1 example.
scene2_g
scene2_g
has three profile faces with a white background and white clothing. The faces have a wide range of skin tones and high contrast with the background.
Figure 106. scene2_g example.
test_preview_num_faces
Tests face detection with increased skin tone diversity in face scenes.
APIs tested:
-
android.hardware.camera2.CaptureResult#STATISTICS_FACES
-
android.hardware.camera2.CaptureResult#STATISTICS_FACE_DETECT_MODE
Pass: Finds three faces with face landmarks in the face bounding boxes.
Figure 107. test_preview_num_faces example.
scene3
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_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
Figure 108. test_edge_enhancement edge=0 example.
Figure 109. test_edge_enhancement edge=1 (fast mode) example.
Figure 110. test_edge_enhancement edge=2 (high quality mode) example.
test_flip_mirror
Tests if the image is properly oriented as per 7.5.2 Front-Facing Camera in the CDD.
Mirrored, flipped, or rotated images can be identified by the diamond feature near the center.
Pass: Image isn't flipped, mirrored, or rotated.
Figure 111. test_flip_mirror scene patch example.
test_imu_drift
Tests if the inertial measurement unit (IMU) has stable output for 30 seconds while the device is stationary and capturing a high-definition preview.
APIs tested:
-
android.hardware.Sensor
-
android.hardware.SensorEvent
-
android.hardware.Sensor#TYPE_GYROSCOPE
-
android.hardware.Sensor#TYPE_ROTATION_VECTOR
Pass:
- The drift of the gyroscope is less than 0.01 rad over the test time.
- The variance of the gyroscope reading is less than 1E-7 rad 2 /s 2 /Hz over the test time.
- The drift of the rotation vector is less than 0.01 rad over the test time.
- (Not yet mandated) The drift of the gyroscope is less than 1 degree per second.
Figure 112. test_imu_drift gyroscope drift example.
Figure 113. test_imu_drift rotation vector drift example.
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 locates a chart with the expected rotation (0 degrees when the landscape-to-portrait override is disabled, 90 degrees when enabled).
Figure 114. test_landscape_to_portrait example.
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 important 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.
Figure 115. test_reprocess_edge_enhancement plot example.
scene4
scene4
consists of a black circle on a white background inside a square.
Tests in scene4 can be sensitive to alignment, so starting in Android 15, you can use check_alignment.py
in the tools directory to enable a check of the DUT and chart alignment.
Figure 116. scene4 example.
test_30_60fps_preview_fov_match
Tests that 30 FPS and 60 FPS preview videos have the same FoV. The test captures two videos, one with 30 FPS and another with 60 FPS. A representative frame is selected from each video and analyzed to verify that the FoV changes in the two videos are within specifications. Tests that the circle's aspect ratio remains constant, the center of the circle remains stable, and the radius of the circle remains constant.
APIs tested:
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_TARGET_FPS_RANGE
-
android.hardware.camera2.CaptureRequest#SENSOR_FRAME_DURATION
-
android.hardware.camera2.CaptureRequest#SENSOR_EXPOSURE_TIME
-
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 aspect ratio change between 30 FPS and 60 FPS videos is no more than 7.5%
Fail mechanisms:
- The circle from the 30 FPS video is significantly different in size from the 60 FPS video.
- The circle in the captured image is distorted by the processing pipeline.
- 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_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 is preserved.
Fail mechanisms:
- The camera isn't aligned with the circle displayed on the tablet in the center of the captured scene.
- The circle in the captured image is distorted by the processing pipeline.
- The 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 subcameras, 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
, andLENS_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 FAQ Q1 .
test_preview_aspect_ratio_and_crop
Similar to the test_aspect_ratio_and_crop
test for still captures, checks the supported preview formats to verify that 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 (FoV 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 is preserved.
test_preview_stabilization_fov
Checks the supported preview sizes to help 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 verify 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 than 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 (FoV 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 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:
Figure 117. scene5 capture example.
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 red-green and blue-green 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 red-green and blue-green value must be less than 20% to pass the test.
scene6
scene6
is a grid of uniquely identifiable ArUco markers. Tests in scene6
can be sensitive to alignment, so starting in 15, you can use check_alignment.py
in the tools directory to enable a check of the DUT and chart alignment.
Figure 118. scene6 example.
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 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 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 RMS difference between the downscaled cropped raw image and the full FoV raw image is less than the threshold set in the test.
test_zoom
Tests the camera zoom behavior from the ultrawide lens to the wide lens. Takes captures over the zoom range and checks if the ArUco markers get bigger as the camera zooms in. The test also checks if the center marker's position changes predictably over each capture. The distance from the center marker's center to the image center can either change at a constant rate with respect to the zoom ratio until a physical camera switch, or it can change monotonically towards the location of the same marker after a physical camera switch. The Jetpack Camera App ( JCA ) must be installed on the device before testing.
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 ArUco marker is accurate against requested zoom ratio to verify that the camera is zooming correctly, and marker distance to the image center changes according to the criteria stated in the test description.
Figure 119. test_zoom to find the contour of the ArUco marker 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 markers in the output images match the zoom ratios in the capture metadata. The same camera capture session is used to converge 3A and take captures.
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 marker 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 marker closest to the center at different zoom ratios and checks whether the size of the marker 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 marker is accurate against requested zoom ratio in video and preview.
Figure 120. HD_1280x720_key_frame.png (before zoom).
Figure 121. preview_1280x720_key_frame.png (before zoom).
Figure 122. HD_1280x720_key_frame.png (after zoom).
Figure 123. preview_1280x720_key_frame.png (after zoom).
test_preview_zoom
Tests that the zoom ratio of each preview frame matches the corresponding capture metadata from the ultrawide lens to the wide lens. The test takes preview frames over the zoom range and finds the ArUco marker closest to the center. The test then checks if the center marker's position changes predictably over each capture. The distance from the center marker's center to the image center can either change at a constant rate with respect to the zoom ratio until a physical camera switch, or it can change monotonically towards the location of the same marker after a physical camera switch.
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: The relative size of the selected ArUco marker is accurate for the reported zoom ratio of the corresponding capture result for all of the preview frames. The relative distance of the selected marker from the center of the image is accurate for the reported zoom ratio of the corresponding capture result of all the preview frames.
Figure 124. test_preview_zoom images showing selected marker closest to the center
test_session_characteristics_zoom
Tests the zoom ratio range for all supported session configurations listed in CameraCharacteristics#INFO_SESSION_CONFIGURATION_QUERY_VERSION
. For each of those configurations, if CameraDeviceSetup#isSessionConfigurationSupported
returns true
, the test verifies that the zoom ratio range returned in CameraDeviceSetup#getSessionCharacteristics
can be reached.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#INFO_SESSION_CONFIGURATION_QUERY_VERSION
-
android.hardware.camera2.CameraDevice.CameraDeviceSetup#isSessionConfigurationSupported
-
android.hardware.camera2.CameraDevice.CameraDeviceSetup#getSessionCharacteristics
Pass: Both the minimum and maximum zoom ratios can be reached for each supported SessionConfiguration
listed in CameraCharacteristics#INFO_SESSION_CONFIGURATION_QUERY_VERSION
.
scene7
scene7
is a rectangular frame divided into four equal quadrants, each filled with a different color. In the center of the rectangle is a slanted edge chart for sharpness checks. Four ArUco markers are aligned with the four outer corners of the rectangle to assist in obtaining accurate coordinates of the main rectangle frame at varying zoom ratios.
Figure 125. scene7.
test_multi_camera_switch
This test verifies that during preview recording at varying zoom ratios, the switch between the ultrawide (UW) and wide (W) lenses results in similar RGB values.
The test uses different zoom ratios within the predefined range to perform a dynamic preview recording and identify the point at which the physical camera changes. This point marks the crossover from the UW to the W lens.
The frames captured at and before the crossover point are analyzed for auto exposure (AE), auto white balance (AWB), and autofocus (AF).
The AE check verifies that the luma change is within the expected range for both UW and W lens images. The AWB check verifies that the ratios of red-green and blue-green are within threshold values for both UW and W lens images. The AF check evaluates the sharpness estimation value based on the average gradient magnitude between UW and W lens images.
While executing this test if the Moire effect interferes with the results, use a higher resolution tablet from the list of Camera ITS approved list of tablets .
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.media.CamcorderProfile
-
android.media.MediaRecorder
Pass: For the test to pass, the AE and AWB checks must pass. The AF check results are only used for logging purposes. The following are the criteria for each check:
- AE check: The luma change (Y value) between the UW and W lens images must be less than 4% for all the color patches if the device supports both
ae_regions
andawb_regions
. If onlyae_regions
is supported then only the gray color patch values must meet the criteria. - AWB check: The difference between the red-green and blue-green values for the UW and W lens images must be less than 3% for the gray color patch and must be less than 10% for other color patches if the device supports both
ae_regions
andawb_regions
. - AF check: The image sharpness for the W lens capture must be higher than the sharpness with the UW capture.
Figure 126. Gray patch taken with UW lens.
Figure 127. Gray patch taken with W lens.
scene8
scene8
is a rectangular frame divided into four equal regions, each containing a portrait taken with a different exposure or overlaid with a different color shade (blue shade, increased exposure, decreased exposure, yellow shade). Four ArUco markers are aligned with the four outer corners of the rectangle to obtain accurate coordinates of the main rectangle frame.
Figure 128. scene8 example.
test_ae_awb_regions
Tests that the RGB and luma values differ when preview recording at different AE and AWB regions.
The test records an 8 second preview recording, performing AE and AWB metering on each quadrant for 2 seconds each. The test then extracts a frame from each region's preview recording, and uses the extracted frames to perform the following AE and AWB checks:
- AE check: Verifies that the frame metering the region with decreased exposure has an increased luma value of more than 1% than the frame metering the region with increased exposure. This verifies that images are brightened when metering a dark region.
- AWB check: Verifies that the ratio of red to blue (of the image's average RGB values) in the frame with the blue metering region is more than 2% higher than the frame with the yellow metering region. This verifies that images have a balanced RGB value when metering a yellow (warm) or blue (cool) region.
APIs tested:
-
android.hardware.camera2.CaptureRequest#CONTROL_AWB_REGIONS
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_REGIONS
-
android.hardware.camera2.CameraCharacteristics#CONTROL_MAX_REGIONS_AE
-
android.hardware.camera2.CameraCharacteristics#CONTROL_MAX_REGIONS_AWB
Pass: The AE and AWB checks both pass.
Figure 129. Frame metering dark region with increased exposure.
Figure 130. Frame metering lighter region with decreased exposure.
Fail mechanisms:
Accurate detection of all four ArUco markers is essential for this test. If the initial detection fails, the system attempts a second detection pass using a black and white version of the image. The following grayscale image represents the secondary processing step:
Figure 131. ArUco markers misalignment.
test_color_correction_mode_cct
Tests COLOR_CORRECTION_MODE
across different color temperatures and tints, verifying changes in RGB ratios against the capture scene, scene8 .
APIs tested:
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_MODE
-
android.hardware.camera2.CaptureResult#COLOR_CORRECTION_MODE
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_COLOR_TEMPERATURE
-
android.hardware.camera2.CaptureResult#COLOR_CORRECTION_COLOR_TEMPERATURE
-
android.hardware.camera2.CaptureRequest#COLOR_CORRECTION_COLOR_TINT
-
android.hardware.camera2.CaptureResult#COLOR_CORRECTION_COLOR_TINT
-
android.hardware.camera2.CameraCharacteristics#COLOR_CORRECTION_COLOR_TEMPERATURE_RANGE
-
android.hardware.camera2.CameraMetadata#COLOR_CORRECTION_MODE_CCT
-
android.hardware.camera2.CameraCharacteristics#COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
Pass: RGB ratios exhibit the anticipated increases or decreases relative to the selected color temperatures and tints.
Test skip criteria
The test_color_correction_mode_cct
test is skipped if any of the following criteria are met:
- The device has a first API level (
first_api_level
) of 35 or lower. - The device doesn't advertise
COLOR_CORRECTION_MODE_CCT
inCOLOR_CORRECTION_AVAILABLE_ABERRATION_MODES
.
scene9
scene9
consists of thousands of randomly sized and colored circles to create a scene with very low repeatability to stress JPEG compression algorithms.
Figure 132. scene9 example.
test_jpeg_high_entropy
Tests that camera JPEG compression works on scene9
with high entropy and the JPEG quality factor set to 100%. The zoom factor is increased to verify that the scene displayed on the tablet fills the camera FoV.
APIs tested:
Pass: JPEG file is compressed properly, written, and read back from disk.
test_jpeg_quality
Tests the camera JPEG compression quality. Step JPEG qualities through android.jpeg.quality
and verifies that the quantization tables change correctly.
APIs tested:
Pass: Quantization matrix decreases with quality increase. (The matrix represents the division factor.)
Figure 133. Pixel 4 rear camera luma and chroma DQT matrix averages versus JPEG quality.
Figure 134. Failed test example.
scene_video
scene_video
is a video scene consisting of four different colored circles moving back and forth at different frame rates against a white background.
Figure 135. scene_video example.
test_preview_frame_drop
Tests that the requested preview frame rate is maintained with a dynamic scene. This test runs on all cameras that are exposed to third-party apps.
APIs tested:
-
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
Pass: The preview frame rate is at the maximum of the requested frame rate range, and the average variation between consecutive frames is less than the relative tolerance set in the test.
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. Additionally, all light leakage must be controlled. This might require covering the test rig, DUT, and tablet with a drop cloth as well as eliminating light leakage from the front screen of the DUT.
scene_hdr
The scene_hdr
scene consists of a portrait on the left and a low-contrast QR code on the right.
Figure 136. scene_hdr example.
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_low_light
The scene_low_light
scene consists of a grid of squares of varying shades of gray against a black background and the grid of squares are bound by a red outline. The squares are arranged in a Hilbert curve orientation.
Figure 137. scene_low_light example.
test_night_extension
Tests the Night extension . Takes captures with the extension enabled, and performs the following:
- Detects the presence of 20 squares
- Computes the luma bounded by each square
- Computes the average luma value of the first 6 squares according to the Hilbert curve grid orientation
- Computes the difference in luma value of consecutive squares (for example, square2 - square1) up to squares 5 and 6 (square6 - square5), and finds the average of the five computed differences.
For devices running Android 16 or higher, the capture request includes a metered region corresponding to the rectangle bounding the grid of squares. This addition changes the threshold pass criteria.
APIs tested:
-
android.hardware.camera2.CameraExtensionCharacteristics#getSupportedExtensions
-
android.hardware.camera2.CameraExtensionSession#capture
Pass:
- For devices running Android 16 or higher, the average luma value of the first 6 squares must be at least 80, and the average difference in luma value of consecutive squares up to squares 5 and 6 must be at least 18.75.
- For devices running Android 15 and lower, the average luma value of the first 6 squares must be at least 85, and the average difference in luma value of consecutive squares up to squares 5 and 6 must be at least 17.
The following luminance plot shows what a passing test result looks like.
Figure 138. Low light night scene passing test example.
test_low_light_boost_extension
Tests the Low Light Boost AE mode . If Camera2 supports low light boost AE mode, then this test is performed for Camera2. If the night mode camera extension is supported and the extension supports low light boost AE mode, then this test is also performed for the night mode camera extension. This test sets the AE mode to low light boost, takes a frame from the preview, and performs the following:
- Detects the presence of 20 boxes
- Computes the luma bounded by each box
- Computes the average luma value of the first 6 squares according to the Hilbert curve grid orientation
- Computes the difference in luma value of consecutive squares (for example, square2 - square1) up to squares 5 and 6 (square6 - square5), and finds the average of the five computed differences.
For devices running Android 16 or higher, the capture request includes a metered region corresponding to the rectangle bounding the grid of squares. This addition changes the threshold pass criteria.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES
-
android.hardware.camera2.CameraMetadata#CONTROL_AE_MODE_ON_LOW_LIGHT_BOOST_BRIGHTNESS_PRIORITY
-
android.hardware.camera2.CameraExtensionCharacteristics#getSupportedExtensions
Pass:
For devices running Android 16 or higher, the average luma value of the first 6 squares must be at least 54, and the average difference in luma value of consecutive squares up to squares 5 and 6 must be at least 17.
For devices running Android 15 and lower, the average luma value of the first 6 squares must be at least 70, and the average difference in luma value of consecutive squares up to squares 5 and 6 must be at least 18.
scene_tele
A key requirement for scene_tele
tests is that the chart distance must be at least the minimum focus distance of the telephoto lens. As this minimum focus distance can differ between devices, you must configure your setup to suit the specific telephoto camera.
Figure 139. scene_tele setup based on focus distance of wide and tele camera.
For more information on test hardware setup, see Tele extension rig setup .
scene6_tele
The scene6_tele
scene consists of a grid of ArUco markers on a white background.
If scene6_tele
captures look overexposed in the modular rig , remove the front plate of the modular rig .
Disconnect the WFoV test rig from the extension and remove the phone mount.
Figure 140. Disconnect the WFoV test rig from the extension and remove the phone mount.
Figure 141. Remove the front plate.
test_zoom_tele
Tests the camera zoom behavior from the wide lens to the telephoto lens. The test is identical to test_zoom
, but tests the camera zoom behavior from the wide lens to the telephoto lens.
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 ArUco marker is accurate against requested zoom ratio to verify that the camera is zooming correctly, and marker distance to the image center changes according to the criteria listed in test_zoom
.
test_preview_zoom_tele
Tests the camera zoom behavior for preview frames from the wide lens to the telephoto lens. The test is identical to test_preview_zoom
, but tests the camera zoom behavior for preview frames from the wide lens to the telephoto lens.
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 ArUco marker is accurate against requested zoom ratio to verify that the camera is zooming correctly, and marker distance to the image center changes according to the criteria listed in test_preview_zoom .
scene7_tele
scene7_tele
is identical to scene7
, but set up for telephoto lens testing. It's a rectangular frame divided into four equal quadrants, each filled with a different color. In the center of the rectangle is a slanted edge chart for sharpness checks. Four ArUco markers are aligned with the four outer corners of the rectangle to assist in obtaining accurate coordinates of the main rectangle frame at varying zoom ratios.
test_multi_camera_switch_tele
This test verifies that during preview recording at varying zoom ratios, the switch between the wide (W) and telephoto (tele) lenses results in similar RGB values.
The test uses different zoom ratios within the predefined range to perform a dynamic preview recording and identify the point at which the physical camera changes. This point marks the crossover from the W to the tele lens.
The frames captured at and before the crossover point are analyzed for AE, AWB, and AF.
The AE check verifies that the luma change is within the expected range for both W and tele lens images. The AWB check verifies that the ratios of red-green and blue-green are within threshold values for both W and tele lens images. The AF check evaluates the sharpness estimation value based on the average gradient magnitude between W and tele lens images.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.media.CamcorderProfile
-
android.media.MediaRecorder
Pass: For the test to pass, the AE, AWB, and AF checks must all pass. The following are the criteria for each check:
- AE check: The luma change between the W and tele lens images must be less than 4%.
- AWB check: In the LAB color space, the delta C between red-green and blue-green for wide and telephoto cannot exceed 10.
- AF check: The image sharpness of the tele lens must be higher than the W lens.
scene_flash
The scene_flash
tests require a dark scene in the sensor fusion box.
test_auto_flash
Tests that auto-flash is triggered in a dark scene for rear-facing and front-facing cameras. For front-facing cameras, auto-flash uses the screen to illuminate the scene, not a physical flash unit. The test verifies that auto-flash is fired by checking that the center of the tile image is brighter with auto-flash enabled. To trigger auto-flash, the lights in the test rig must be turned off. The lights can be turned off automatically with the Arduino controller. The scene must be completely dark for the test to work correctly. The Jetpack Camera App ( JCA ) must be installed on the device before testing. Auto-flash for rear-facing cameras relies on the AE state to be triggered, but auto-flash for front-facing cameras doesn't rely on AE and is always triggered.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_AVAILABLE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_MODE
-
android.hardware.camera2.CaptureRequest#CONTROL_AE_PRECAPTURE_TRIGGER
-
android.hardware.camera2.CaptureResult#CONTROL_AE_STATE
-
android.hardware.camera2.CaptureRequest#FLASH_MODE
Pass: The center of the tile image with auto-flash enabled is brighter than the original scene image for all cameras.
test_flash_strength
Tests that flash strength control in SINGLE
mode is implemented correctly.
Verifies that if the device supports flash strength control during camera use in SINGLE
mode, the flash strength changes with different requested strength levels. Verifies that flash strength control works with different AE_MODES
. For example, if the auto-exposure mode is ON
or OFF
, the flash strength level has an effect on brightness, and if the mode is ON_AUTO_FLASH
, the flash strength level has no effect on brightness.
To conduct the test, lights in the test rig must be turned off. The lights can be turned off automatically with the Arduino controller. The scene must be completely dark for the test to work correctly.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL
-
android.hardware.camera2.CameraCharacteristics#FLASH_SINGLE_STRENGTH_DEFAULT_LEVEL
-
android.hardware.camera2.CameraCharacteristics#FLASH_SINGLE_STRENGTH_MAX_LEVEL
Pass:
When the auto-exposure mode is ON
or OFF
, the brightness of the image patches increases as the flash strength level increases from no flash to FLASH_SINGLE_STRENGTH_MAX_LEVEL
. When the auto-exposure mode is ON_AUTO_FLASH
, the difference in brightness of the image patches is within tolerance as the flash strength level increases from no flash to FLASH_SINGLE_STRENGTH_MAX_LEVEL
.
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 red-green and blue-green 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 red-green and blue-green ratios are within 0.95 and 1.05. The flash image mean is within the (68, 102) range.
test_night_mode_indicator
Tests the functionality of the night mode indicator, a feature that indicates whether the camera is operating in low light conditions and will benefit from a Night Mode Camera extension still capture. This feature is available only on devices that support Night Mode Camera extensions.
This test checks that the night mode indicator correctly reflects the lighting conditions during camera preview. The test performs the following steps:
- Initialization: The test initializes an
ItsSession
and retrieves camera properties. It also establishes a connection with the lighting controller. - Skip Conditions: The test is skipped if the device doesn't support the required API level or the night mode indicator feature.
- Camera2 Session:
- The test starts a preview capture session using a
Camera2
session. - The light is turned on and a preview frame is captured.
- The test verifies that the night mode indicator is in the
OFF
state. - The light is turned off and a preview frame is captured.
- The test verifies that the night mode indicator is in the
ON
state.
- The test starts a preview capture session using a
- Camera extension session:
- The test repeats the same procedure as for the
Camera2
session, but using aCameraExtension
session with theEXTENSION_NIGHT
extension.
- The test repeats the same procedure as for the
- Cleanup: The test closes
ItsSession
and releases the lighting controller.
APIs tested:
Pass:
- When the light is on, the night mode indicator should be in the
OFF
state. - When the light is off, the night mode indicator should be in the
ON
state. - Applies to both
Camera2
andCameraExtension
sessions.
test_preview_min_frame_rate
Tests that the preview frame rate decreases correctly in a dark scene. For this test to work correctly, the lights in the test rig must be turned off by the controller or manually by the test operator.
APIs tested:
-
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
Pass: The preview frame rate is at the minimum of the requested frame rate range, and the variation between frames is less than the absolute tolerance set in the test.
test_torch_strength
Tests that flash strength control in TORCH
mode is implemented correctly.
Verifies that if the device supports flash strength control during camera use in TORCH
mode, the torch strength changes with different requested strength levels. Verifies that flash strength control works with different AE_MODES
. For example, if the auto-exposure mode is ON
or OFF
, the flash strength level has an effect on brightness, and if the mode is ON_AUTO_FLASH
, the flash strength level has no effect on brightness. Verifies that the torch strength stays the same throughout the duration of a burst, simulating a video capture session. To conduct the test, lights in the test rig must be turned off. The lights can be turned off automatically with the Arduino controller. The scene must be completely dark for the test to work correctly.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_STRENGTH_DEFAULT_LEVEL
-
android.hardware.camera2.CameraCharacteristics#FLASH_INFO_STRENGTH_MAXIMUM_LEVEL
-
android.hardware.camera2.CameraCharacteristics#FLASH_TORCH_STRENGTH_DEFAULT_LEVEL
-
android.hardware.camera2.CameraCharacteristics#FLASH_TORCH_STRENGTH_MAX_LEVEL
Pass:
When the auto-exposure mode is ON
or OFF
, the brightness of the image burst patches increases as the flash strength level increases from no flash to FLASH_TORCH_STRENGTH_MAX_LEVEL
. When the auto-exposure mode is ON_AUTO_FLASH
, the difference in brightness of the image burst patches are within tolerance as the flash strength level increases from no flash to FLASH_TORCH_STRENGTH_MAX_LEVEL
.
sensor_fusion
Sensor fusion tests require specific phone movement in front of a checkerboard pattern and ArUco markers. For optimum results, verify that the test chart is mounted flat. Charts that aren't flat affect the rotation calculations for many of the tests. The chart must fill the back of the sensor fusion box by printing at 17x17 in. (43x43 cm). The sensor_fusion
tests can be automated with the Sensor Fusion Box .
Figure 142. Sensor fusion chart.
Figure 143. Sensor fusion chart that fills the back of the sensor fusion box.
test_lens_intrinsic_calibration
Tests that the optical center of the lens intrinsic changes when the lens moves due to optical image stabilization (OIS). If lens intrinsic samples are supported, tests that the optical center of the lens intrinsic samples changes when the lens moves due to OIS.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#LENS_INTRINSIC_CALIBRATION
-
android.media.MediaRecorder
-
android.media.CamcorderProfile
Pass: The optical center of the lens intrinsic changes by 1 pixel or more. If lens intrinsic samples are supported, the optical centers of the lens intrinsic samples change by 1 pixel or more.
The following figure is an example test_lens_intrinsic_calibration
plot showing changes of principal points in pixels for each frame:
Figure 144. Example of test_lens_intrinsic_calibration plot showing changes of principal points in pixels for each frame.
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: The angle between images from each camera doesn't change appreciably as the phone is rotated.
test_preview_distortion
Tests that distortion is corrected throughout each preview frame taken at various zoom levels. For each preview frame, the test calculates ideal points based on camera intrinsics and extrinsics.
In the example image, ideal points are shown in green; actual points are shown in red. The distortion error is calculated based on the RMS pixel distance between the actual points and ideal points. The green and red highlights on the image are used to visually detect the area of distortion error.
Figure 145. Image of checkerboard with ideal points as green and actual points as red.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#CONTROL_ZOOM_RATIO_RANGE
-
android.hardware.camera2.CaptureRequest#CONTROL_ZOOM_RATIO
-
android.hardware.camera2.CameraCharacteristics#getPhysicalCameraIds()
-
android.media.CamcorderProfile
-
android.media.MediaRecorder
Pass: The normalized distortion error of each preview frame is less than the threshold set in the test.
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: Maximum angle rotation over frames is less than 70% of gyroscope rotation.
The following are sample videos with and without stabilization:
Figure 146. Sample video with stabilization.
Figure 147. Sample video without stabilization.
test_sensor_fusion
Tests the timestamp difference between the camera and the gyroscope for AR and VR applications. The 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 isn't 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.Figure 148. test_sensor_fusion gyroscope events example.
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.Figure 149. test_sensor_fusion plot rotations example.
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 7.3.9 High Fidelity Sensors in the CDD.
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: Maximum angle rotation over frames is less than 60% of gyroscope rotation.
The following are sample videos with and without stabilization.
Figure 150. Sample video with stabilization.
Figure 151. Sample video without stabilization.
test_video_stabilization_jca
Tests that stabilized video captured using the JCA rotates less than the gyroscope. The JCA must be installed on the device before testing.
APIs tested:
-
android.hardware.camera2.CameraCharacteristics#SCALAR_AVAILABLE_CAPABILITIES_STREAM_USE_CASES
-
android.media.CamcorderProfile
-
android.media.MediaRecorder
Pass: The maximum angle rotation over frames extracted from video captured using the JCA is less than 70% of gyroscope rotation.
feature_combination
The feature_combination
tests verify that features work correctly when multiple camera features are enabled at the same time. These tests use the same checkerboard image that is used in the sensor fusion scene .
test_feature_combination
Tests all combinations of different stream combinations, video stabilization mode, target FPS range, 10-bit HDR video, and Ultra HDR that are supported by the camera device.
For Android 16 and higher, the test runs all combinations of supported features, and logs the results into a proto file. Failure assertions are called only for combinations of features for which isSessionConfigurationSupported
returns True
.
APIs tested:
-
android.hardware.camera2.CameraDevice.CameraDeviceSetup#isSessionConfigurationSupported
-
android.hardware.camera2.CameraDevice.CameraDeviceSetup#createCaptureRequest
Pass: For each supported feature combination:
- The preview stream is stabilized if preview stabilization is on.
- The preview frame rate falls within the configured
AE_TARGET_FPS_RANGE
. - The recorded preview stream's color space matches what's set.
- The Ultra HDR capture has a valid gain map.
scene_ip
In Android 16 and higher, scene scene_ip
enables image parity checks between the default camera app and the Jetpack camera app (JCA) to identify major differences between captured images. The JCA replicates social media app captures and provides a baseline image that that social media apps then process and refine.
Hardware setup requirements
The following hardware setup is required for scene_ip
tests:
- Tests are executed in the Gen2 camera ITS-in-a-box .
- The lighting and servo controllers that are part of the Gen2 rig are used to control the test environment
- A test feature chart is placed inside the Gen2 rig.
Figure 152. Gen2chart_sample example.
Test skip criteria
The scene_ip
tests are skipped if any of the following criteria are met:
- The device has a first API level (
first_api_level
) of 35 or lower. - The device isn't a phone device with front and rear primary camera devices (for example, a tablet or TV).
test_default_jca_ip
Takes captures of the test feature chart under controlled lighting conditions using the default camera app and the JCA and performs the following checks:
FoV: Checks that the default camera app and JCA captures have the same FoV. This check uses the center QR Code feature extracted from the captures chart image.
Brightness: Checks that the brightness difference measured between the default camera app and JCA doesn't exceed 10. This check uses the dynamic range patch for brightness measurement.
White balance: Checks that the white balance difference between the default camera app and JCA doesn't exceed 4. This check uses the dynamic range patch for brightness measurement.
Basic section pass: Test passes the FoV, brightness, and white balance checks. In Android 16, this test isn't mandated ( NOT_YET_MANDATED
).