错误-Android-OpenCV-It seems that your device does not support camera(or it is locked)

Posted xuezhisdc

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误-Android-OpenCV-It seems that your device does not support camera(or it is locked)相关的知识,希望对你有一定的参考价值。

博客新址: http://blog.xuezhisd.top
邮箱:xuezhisd@126.com


错误

It seems that your device does not support camera(or it is locked)
  • 涉及利用OpenCV在android开发,调用摄像头时提示的错误。

问题描述

  • 根据OpenCV-Android-SDK中的样例,编写了一个自己的Android程序,但是一直提示:It seems that your device does not support camera(or it is locked)
  • 简言之,这是没有权限的问题。

解决方法

  • 解决方法很简单,直接在AndroidManifest.xml中添加以下内容即可。
<uses-permission android:name="android.permission.CAMERA"/>

<uses-feature android:name="android.hardware.camera"/>
<uses-feature android:name="android.hardware.camera.autofocus"/>
<uses-feature android:name="android.hardware.camera.front"/>
<uses-feature android:name="android.hardware.camera.front.autofocus"/>

参考

以上是关于错误-Android-OpenCV-It seems that your device does not support camera(or it is locked)的主要内容,如果未能解决你的问题,请参考以下文章