Toybrick

标题: 通过opencv是否可以调取1126的摄像头 [打印本页]

作者: yaqi825    时间: 2021-9-28 10:47
标题: 通过opencv是否可以调取1126的摄像头
通过opencv官方提供的opencv_python-4.0.1.24-cp37-cp37m-linux_armv7l.whl是否可以调取1126D的摄像头的mipi摄像头,cv2.VideoCapture(0)返回空,很奇怪,是这个cv2不支持v4l2的框架,怎么才能读上摄像头的图像数据?

作者: jefferyzhang    时间: 2021-9-28 12:16
要自己写代码的,怎么可能opencv能直接用,那3A控制、对焦难道cv还能自动处理了不成?
你想通过cv来获取,就要自己改cv代码,把rk的mipi摄像头控制写进去
作者: yaqi825    时间: 2021-9-28 12:50
jefferyzhang 发表于 2021-9-28 12:16
要自己写代码的,怎么可能opencv能直接用,那3A控制、对焦难道cv还能自动处理了不成?
你想通过cv来获取, ...

还有个问题,我按照        TB-RV1126Ds开发板rknn教程 来一步步来,最后到
7 测试demo:
python demo:
python3 /vendor/etc/model/test.py

C demo:
run_rv1109_rv1126.sh

执行这两个后得到的数据是:

toybrick@debian10:/vendor/etc/model$ python3 /vendor/etc/model/test.py
--> list devices:
*************************
None devices connected.
*************************
done
--> query support target platform
**************************************************
Target platforms filled in RKNN model:         ['RV1109']
Target platforms supported by this RKNN model: ['RV1109', 'RK1109', 'RV1126', 'RK1126']
**************************************************
done
--> Load RKNN model
done
--> Init runtime environment
librknn_runtime version 1.7.0 (0bef7b3 build: 2021-08-18 19:55:01 base: 1131)
[     1] Failed to open device: No such file or directory, Try again...
[     2] Failed to open device: No such file or directory, Try again...
[     3] Failed to open device: No such file or directory, Try again...
[     4] Failed to open device: No such file or directory, Try again...
[     5] _OpenDevice(1091): FATAL: Failed to open device, errno=No such file or directory.
toybrick@debian10:/vendor/etc/model$ run_rv1109_rv1126.sh
librknn_runtime version 1.7.0 (0bef7b3 build: 2021-08-18 19:55:01 base: 1131)
[     1] Failed to open device: No such file or directory, Try again...
[     2] Failed to open device: No such file or directory, Try again...
[     3] Failed to open device: No such file or directory, Try again...
[     4] Failed to open device: No such file or directory, Try again...
[     5] _OpenDevice(1091): FATAL: Failed to open device, errno=No such file or directory.
toybrick@debian10:/vendor/etc/model$ sudo run_rv1109_rv1126.sh
librknn_runtime version 1.7.0 (0bef7b3 build: 2021-08-18 19:55:01 base: 1131)
[     1] Failed to open device: No such file or directory, Try again...
[     2] Failed to open device: No such file or directory, Try again...
[     3] Failed to open device: No such file or directory, Try again...
[     4] Failed to open device: No such file or directory, Try again...
[     5] _OpenDevice(1091): FATAL: Failed to open device, errno=No such file or directory.

这个是怎么回事?是我什么地方配置不对?为此我专门刷了一下最近的固件,还是这样,该从那里解决这个问题
作者: ws666    时间: 2021-9-28 18:03
jefferyzhang 发表于 2021-9-28 12:16
要自己写代码的,怎么可能opencv能直接用,那3A控制、对焦难道cv还能自动处理了不成?
你想通过cv来获取, ...

元老你好,我想问一下,用c写的rkmedia_vi_vo_test.c代码,是要用SDK/buildroot目录下的工具编译吗?有没有C编译的教程啊,我想在ubuntu上编译,在rv1126上跑,谢谢。
作者: jefferyzhang    时间: 2021-9-29 10:30
yaqi825 发表于 2021-9-28 12:50
还有个问题,我按照        TB-RV1126Ds开发板rknn教程 来一步步来,最后到
7 测试demo:
python demo:

target检查下,看下文档,本机运行target跟被动模式写法是不一样的
作者: jefferyzhang    时间: 2021-9-29 10:31
ws666 发表于 2021-9-28 18:03
元老你好,我想问一下,用c写的rkmedia_vi_vo_test.c代码,是要用SDK/buildroot目录下的工具编译吗?有没 ...

不会折腾交叉编译环境你就直接在1126上编译啊,我们Toybrick提供的就是debian10系统,直接就可以当pc用
作者: 傲氣雄鷹    时间: 2021-11-2 17:25
ws666 发表于 2021-9-28 18:03
元老你好,我想问一下,用c写的rkmedia_vi_vo_test.c代码,是要用SDK/buildroot目录下的工具编译吗?有没 ...

要用sdk 自帶的編譯器




欢迎光临 Toybrick (https://t.rock-chips.com/) Powered by Discuz! X3.3