Python 选择BeagleBone Black上的超时错误
我正在运行Debian Wheezy:Linux beaglebone 3.8.13-bone79 1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux的BBB上测试opencv视频捕获代码,但每次运行程序时都会出现选择超时错误。现在我落后于我最后一年虹膜识别系统项目的进度。如果你想知道我为什么要看这个视频捕获代码,它是用来跟踪眼睛,然后捕获一个图像,然后进行处理以获得虹膜编码 我按照上的说明安装了opencv 3.0.0,但不得不关闭其中一个论坛上建议的ffmpeg:在获得编译错误后,但首先我从源代码编译了ffmpeg 下面是我测试的视频捕获代码Python 选择BeagleBone Black上的超时错误,python,linux,opencv,Python,Linux,Opencv,我正在运行Debian Wheezy:Linux beaglebone 3.8.13-bone79 1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux的BBB上测试opencv视频捕获代码,但每次运行程序时都会出现选择超时错误。现在我落后于我最后一年虹膜识别系统项目的进度。如果你想知道我为什么要看这个视频捕获代码,它是用来跟踪眼睛,然后捕获一个图像,然后进行处理以获得虹膜编码 我按照上的说明安装了opencv 3.0.0,但不得不关闭其中一个论
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
cv2.imshow('frame',gray)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
运行代码后,我获得了以下信息注意:只有在通过tightvnc访问的LXTerminal中运行python脚本时,框架才会打开。它无法通过ssh运行
root@beaglebone:~/Project/Testing# python Video_Streaming.py
(process:1488): Gtk-WARNING **: Locale not supported by C library.
Using the fallback 'C' locale.
Xlib: extension "RANDR" missing on display ":1".
select timeout
select timeout
select timeout
select timeout
^Cselect timeout
Traceback (most recent call last):
File "Video_Streaming.py", line 8, in <module>
ret, frame = cap.read()
KeyboardInterrupt
root@beaglebone:~/Project/Testing#
我被困住了,我需要你的帮助