? ? ? ? ? ? Camera ITS測(cè)試
一、手機(jī)端設(shè)置:
將 CtsVerifier.apk 安裝到設(shè)備上, 連接上linux主機(jī)。
二、主機(jī)端設(shè)置:
基礎(chǔ):CTS測(cè)試運(yùn)行環(huán)境
然后,主機(jī)安裝python2.7,及numpy/scipy/matplotlib/opencv 棧和 python 成像庫(kù)。按照下面的命令依次安裝:
sudo apt--get install python--numpy
sudo apt--get install python--scipy
sudo apt--get install python--matplotlib
sudo apt--get install python--opencv
安裝完成后,檢查環(huán)境是否配置成功:. build/envsetup.sh
如下圖,環(huán)境配置成功

三、物理設(shè)置:
1、測(cè)試場(chǎng)景:
ITS測(cè)試共有以下6個(gè)場(chǎng)景:
●Scene 0: No requirements. The camera camera be pointing at anything (including being face down on the desk, or using the same setup as scene 1).
場(chǎng)景 0?: 無(wú)要求。相機(jī)攝像頭指向任何東西 (包括臉朝下, 或使用與場(chǎng)景1相同的設(shè)置)。
●Scene 1: The camera is on a tripod pointing at a static scene containing a grey card and white background, under a constant (stable) relatively bright illumination source. This is the scene that is described above for the CTS Verifier physical setup.
場(chǎng)景 1?: 相機(jī)位于三腳架上, 指向一個(gè)靜態(tài)場(chǎng)景, 其中包含灰色卡和白色背景, 在恒定 (穩(wěn)定) 相對(duì)明亮的光照源下。這是 CTS 驗(yàn)證程序物理設(shè)置上面描述的場(chǎng)景。

鏡頭視野中,灰卡大致放在中間,周圍為白色背景。
●Scene 2: This is the scene for testing face detection. The camera is on a tripod pointing at a static picture containing 3 human faces, under a constant (stable) relatively bright illumination source.
場(chǎng)景 2?: 這是測(cè)試人臉檢測(cè)的場(chǎng)景。相機(jī)位于三腳架上, 指向一張包含3人臉的靜態(tài)圖片, 在恒定 (穩(wěn)定) 相對(duì)明亮的照明光源下。

鏡頭視野中,照片放在中間,基本占據(jù)所有視野(周圍可以有一點(diǎn)白色背景)。
●Scene 3: This is the scene for testing image sharpness. The camera is on a tripod pointing at a static picture containing some edges, such as a printed ISO 12233 chart. The scene should be under a constant (stable) relatively bright illumination source.
場(chǎng)景 3?: 這是測(cè)試圖像清晰度的場(chǎng)景。相機(jī)位于三腳架上, 指向包含某些邊緣的靜態(tài)圖片, 如打印的 ISO 12233 圖表。現(xiàn)場(chǎng)應(yīng)在一個(gè)恒定 (穩(wěn)定) 相對(duì)明亮的照明源。

鏡頭視野中,ISO 12233圖表放在中間,基本占據(jù)所有視野(周圍可以有一點(diǎn)白色背景)。
●Scene 4: This is the scene for testing aspect ratio. The camera is on a tripod pointing at a static test page containing a black circle and a square box. The scene should be under a constant (stable) relatively bright illumination source.
場(chǎng)景 4?: 這是測(cè)試縱橫比的場(chǎng)景。相機(jī)位于三腳架上, 指向一個(gè)靜態(tài)測(cè)試頁(yè), 其中包含一個(gè)黑色圓圈和一個(gè)方塊?,F(xiàn)場(chǎng)應(yīng)在一個(gè)恒定 (穩(wěn)定) 相對(duì)明亮的照明源。

鏡頭視野中,圖紙放在中間,基本占據(jù)所有視野(周圍可以有一點(diǎn)白色背景)。
●Scene 5: This is the scene for testing lens shading and color uniformity. A diffuser is placed in front of the camera. The camera is on a tripod pointing at a constant (stable) relatively bright illumination source
場(chǎng)景 5?: 這是測(cè)試鏡頭著色和顏色均勻性的場(chǎng)景。在攝像機(jī)前放置一個(gè)擴(kuò)散器。相機(jī)位于三腳架上,指向恒定的 (穩(wěn)定) 相對(duì)地明亮的照明源。
我們這邊就用的一張白色餐巾紙代替了擴(kuò)散器,將鏡頭對(duì)著光源,用餐巾紙擋住鏡頭即可。下圖為官方文檔,使用擴(kuò)散器擋住鏡頭的示意圖。

●Scene Infinity: This scene is to test infinite focus mode. The camera is on a tall tripod pointing at a large printed ISO 12233 chart. The chart should be printed at 126x80cm and mounted. The camera needs to be the hyperfocal distance away from the chart ~3-5m, depending upon the lens. The scene should be under a constant, relatively bright illumination source. The ISO12233.pdf file is included for printing.
場(chǎng)景無(wú)窮: 此場(chǎng)景是測(cè)試無(wú)限焦點(diǎn)模式。相機(jī)是在一個(gè)高大的三腳架指向一個(gè)大型印刷 ISO 12233 圖表。圖表的要打印在126x80cm 和安裝。照相機(jī)需要是 hyperfocal 距離從圖表 35 m, 取決于透鏡?,F(xiàn)場(chǎng)應(yīng)在一個(gè)恒定的, 相對(duì)明亮的照明源。ISO12233 文件包括用于打印。
該場(chǎng)景要求較高,目前我們這邊的項(xiàng)目還沒(méi)有測(cè)過(guò),有的項(xiàng)目這個(gè)場(chǎng)景開(kāi)始測(cè)試后,會(huì)自動(dòng)跳過(guò)。
四、測(cè)試步驟:
進(jìn)入CameraITS目錄:cd android-cts-verifier/CameraITS/
檢查環(huán)境:主機(jī)端?. build/envsetup.sh
手機(jī)端 打開(kāi)CtsVerifier.apk,點(diǎn)開(kāi)Camera測(cè)試中的CameraITS測(cè)試(每次運(yùn)行測(cè)試命令是,手機(jī)選必須進(jìn)入這個(gè)界面)

測(cè)試Camera 0,Scene 0:環(huán)境無(wú)要求,運(yùn)行命令測(cè)試 ? ? ?python tools/run_all_tests.py camera=0 scenes=0
等待測(cè)試結(jié)束,手機(jī)端Camera:0,scene0 這一項(xiàng)變成綠色,及通過(guò),可以測(cè)試下面的測(cè)試項(xiàng)。
測(cè)試Camera 0,Scene 1:物理環(huán)境如上文要求,運(yùn)行命令測(cè)試 ?python tools/run_all_tests.py camera=0 scenes=1
等待測(cè)試結(jié)束,手機(jī)端Camera:0,scene1 這一項(xiàng)變成綠色,及通過(guò),可以測(cè)試下面的測(cè)試項(xiàng)。
以此類推,測(cè)試完所有相機(jī)的所有場(chǎng)景,測(cè)試界面的綠色圓形按鈕及高亮,可以點(diǎn)擊pass。
ps:Scene 1的測(cè)試時(shí)間會(huì)稍微久一點(diǎn),大概十幾分鐘,請(qǐng)耐心等待,主機(jī)端可以看到測(cè)試進(jìn)程。