google-coral / examples-camera

Small code snippets that show how to stream camera images to a Coral device.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

opencv detect sample fails after 1 minute running with select() timeout on coral dev mini board

bogdannedelcu opened this issue · comments

Hello,

I use coral dev mini board with google coral camera model CA1.

After compiling opencv as per this recommendations #76 I managed to start opencv sample with: python3 detect.py

Window opens on X server, bounding boxes in green work well. After a while I get
[ WARN:0] global /home/mendel/OpenCV/modules/videoio/src/cap_v4l.cpp (1004) tryIoctl VIDEOIO(V4L2:/dev/video1): select() timeout.

Python exists, Window on X server is closed and any other start will result immediately in the same error message, no more Window open.

Only shutdown&poweroff and restart seems to make the camera work again.

Advices are welcome

adding a 100ms delay in the sample WaitKey seems to fix the issue.
change line 76 to: cv2.waitKey(100)