Ask Your Question
0

Select timeout error on BeagleBone Black

asked 2016-04-06 03:02:37 -0600

Hi,

I am testing an opencv video capture code on my BBB (running Debian Wheezy: Linux beaglebone 3.8.13-bone79 #1 SMP Tue Oct 13 20:44:55 UTC 2015 armv7l GNU/Linux) but getting a select timeout error everytime i run the program. Now i am behind schedule of my final year Iris recognition system Project. (In case you want to know why i am going through this video capture code, it is for tracking the eyes then capture an image that will be processed to obtain an IrisCode.)

I installed opencv 3.0.0 following instructions on http://www.pyimagesearch.com/2015/06/... , but had to turn off ffmpeg (suggested on one of the forums: http://stackoverflow.com/questions/31... ) after obtaining a compilation errors but firstly i had compiled ffmpeg from source.

Below is the Video_Capturing code i tested with;

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()

After running the code i am obtaining the following information (Note: The frame is only opening when i run the python script in LXTerminal accessed through tightvnc. It is failing to run through 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#

I'm stuck i need your help.

edit retag flag offensive close merge delete

Comments

1

can you try with a smaller resolution ?

also you have to check: if ret is None

berak gravatar imageberak ( 2016-04-06 03:24:20 -0600 )edit

I tried changing resolutions but there is no change (down to 320x240). How do i check if if ret is None? I'm a newbie in this area.

Tinashe gravatar imageTinashe ( 2016-04-06 05:54:37 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-04-10 06:57:32 -0600

I finally got a solution to the problem. This might help someone out there facing the same problem. Rather i would say i avoided the problem and not really solved the problem. I was able to get a video stream from the preinstalled Debian Distro. OpenCV 3.0.0 seems to have some issues. It is the one that keeps on giving the "select timeout error". I thought it was a v4l driver problem but then i had to compile v4l from source to get the latest update but still obtaining the same error.

What i don't really get is is that, is it a BBB hardware or some driver problem? Why i ask that question is that, the code can run well in an Ubuntu 14.04 PC with installed OpenCV 14.04 LTS.

I hope someone can try it and if there is a solution, i have my eyes open to see it because i would like to use some SIFT packages in OpenCV 3.0.0 on my BBB.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-04-06 03:02:37 -0600

Seen: 1,070 times

Last updated: Apr 10 '16