在BeagleBone黑色选择超时错误(Select timeout error on Beagle

2019-09-27 06:12发布

我在我的BBB(运行Debian喘息:Linux的beaglebone 3.8.13-bone79#1 SMP星期二10月13日二十时44分55秒UTC 2015年armv7l GNU / Linux的)测试的OpenCV的视频捕捉代码,但得到一个选择超时错误,每次我跑该程序。 现在,我是背着我最后一年的虹膜识别系统项目的进度。 (如果你想知道我为什么要通过这个视频捕捉代码,它是用于跟踪眼睛然后捕获将被处理,以获得IrisCode的图像。)

我安装的OpenCV 3.0.0以下的说明http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/#comment-393561 ,但过了关的ffmpeg(在论坛上的一个建议: OpenCV的3.0.0做出的有关ffmpeg错误 )获得编译错误之后,但首先,我编写了从源代码的ffmpeg。

下面是i相测试的Video_Capturing代码;

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#

我坚持我需要你的帮助。

文章来源: Select timeout error on BeagleBone Black