Camera测试-- ITS测试

码字不易,多谢支持

1、名词解释

     ITS是一个对Android摄像头生成的图像进行测试的框架。每个测试的一般目标是按照所需的方式配置相机并捕获一个或
更多的照片,然后检查这些照片,看看它们是否包含预期的图像数据。许多在这些测试中,将要求照相机对着一个特定的目标图或被照亮特定的强度。它的框架位于KitKat的Android源代码的pdk/apps/区域版本,但是转移到CTS验证器测试装具中(在源代码的CTS /区域下)。

2、环境准备

从http://source.android.com/compatibility/downloads.html 中下载CTS Verifier的测试包并解压

android-cts-verifier\android-cts-verifier\CameraITS\CameraITS.pdf

    1、安装adb

         sudo apt-get install adb

    2、下载android-cts-verifier

        从谷歌官网上下载,解压

        sudo apt-get install python-numpy
        sudo apt-get install python-scipy
        sudo apt-get install python-matplotlib
        sudo apt-get install python-opencv

        sudo apt install openjdk-11-jdk

    运行完上面步骤后:

      需要 source build/envsetup.sh    检查环境。可能会遇到下面的问题:

       

    参考链接:https://blog.csdn.net/zwl1584671413/article/details/80305920

可能遇到的问题

问题:E: Package 'python-scipy' has no installation candidate 等

test@test-HP-ProDesk-680-G4-MT:/usr/local$ sudo apt-get install python-scipy
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-scipy is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-scipy' has no installation candidate
vivotest@vivotest-HP-ProDesk-680-G4-MT:/usr/local$ sudo apt-get install python-matplotlib
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package python-matplotlib is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'python-matplotlib' has no installation candidate
vivotest@vivotest-HP-ProDesk-680-G4-MT:/usr/local$ sudo apt-get install python-opencv
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package python-opencv

分析:大概率你用的是python3,而不是python2。

           命令输入python3 OR python2 去查看

解决方法:sudo apt-get install python3-scipy 等命令

https://askubuntu.com/questions/1276852/e-package-python-scipy-has-no-installation-candidate-ubuntu-20-04

    3、 安装Android SDK platform tools

           android-sdk下载地址:http://tools.android-studio.org/index.php/sdk/

       配置/etc/profile
      export ANDROID_HOME=/usr/local/android-sdk/android-sdk-linux
      export PATH=${PATH}:${ANDROID_HOME}/tools
      export PATH=${PATH}:${ANDROID_HOME}/platform-tools
 

        生效 环境变量配置,命令行输入:source /etc/profile

       检查sdk安装成功:android -h

    4、手机上安装CtsVerifier.apk

    cd cts/apps/CtsVerifier
    mma -j32
    adb install -r -g <OUTPUT_PATH>/CtsVerifier.apk

    5、检查环境

         source build/envsetup.sh      

3、测试步骤

      1、六个场景

           scene 0:任意场景

            

           scene 1:灰卡

                

           scene 2:人像(白人黑人黄种人)

              

           scene 3:解析力卡

            

           scene 4:原点

           

           scene 5:镜头不透光盖住毛玻璃,对准光源

          

  2、测试准备

    (1)、把USB链接电脑端的手机固定到三脚架,放置于打开光源的测试台

    (2)、测试前相机预览测试场景,已达到文档要求。然后切换到手机测试界面,然后开始测试

  3、全测ITS

           cd ~/CameraITS/tools

           python run_all_tests.py

   全测中会有变换scene和camera的需要,根据控制台操作

4、view失败项

        1、 全测完之后,会在控制台上显示pass、fail、skip项。需要吧fail继续测试,保存所有fail项的结果到txt文档

        2、进入android-cts-verifier/CameraITS/tests/ ,测试剩余的fail项。比如 :

            python test_ev_compensation_basic camera=0

       3、统计最后的失败项,开始分析解bug。并把所有测试项整理出来

  • 5
    点赞
  • 61
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值