CameraITS: add aspect ratio detection and crop test
Test aspect ratio and check if images are cropped correctly under
each output size.
The test image is a black circle inside a black square. When raw
capture is available, set the height vs. width ratio of the circle
in the full-frame raw as ground truth. Then compare with images of
request combinations of different formats ("jpeg" and "yuv") and
sizes. If raw capture is unavailable, take a picture of the test
image right in front to eliminate shooting angle effect.
The height vs. width ratio for the circle should be close to 1.
Considering shooting position error, aspect ratio greater than 1.05
or smaller than 0.95 will fail the test.
Change-Id: I051890e5aa43e2ffa66e563b989223b03de1571f
diff --git a/apps/CameraITS/tools/run_all_tests.py b/apps/CameraITS/tools/run_all_tests.py
index dd12512..ec0aab7 100644
--- a/apps/CameraITS/tools/run_all_tests.py
+++ b/apps/CameraITS/tools/run_all_tests.py
@@ -43,17 +43,21 @@
"test_yuv_plus_jpeg"
],
"scene2":[],
- "scene3":[]
+ "scene3":[],
+ "scene4":[]
}
# Get all the scene0 and scene1 tests, which can be run using the same
# physical setup.
- scenes = ["scene0", "scene1", "scene2", "scene3"]
+ scenes = ["scene0", "scene1", "scene2", "scene3", "scene4"]
scene_req = {
"scene0" : None,
"scene1" : "A grey card covering at least the middle 30% of the scene",
"scene2" : "A picture containing human faces",
- "scene3" : "A chart containing sharp edges like ISO 12233"
+ "scene3" : "A chart containing sharp edges like ISO 12233",
+ "scene4" : "A specific test page of a circle covering at least the "
+ "middle 50% of the scene. See CameraITS.pdf section 2.3.4 "
+ "for more detail"
}
tests = []
for d in scenes: