Installing OpenCV on the Rock Pi4B

Sorry, I forgot to mention. The package is conflicted with a general OpenGL ES package(for those without opengles libraries). Force installation should work.

Hi there,

I successfully built OpenCV 4.0.1 with Python3.6 bindings on the Rock Pi4B with Ubuntu server (I need Python3 for my application). However, USB web cameras can not be opened using cv2.VideoCapture(0) or cv2.VideoCapture(’/dev/videox’). The typical error message is

VIDEOIO ERROR: V4L: can't open camera by index 0

This behaviour is independent of the USB camera used.

UPDATE: I discovered the root of the problem. The python interpreter needs to run with root privileges in order to open a USB camera via /dev/videoxx.

1 Like

Does this mean installing OPenCV with debian image is not possible? I am trying to install OpenCV 4.0.1 and I am having a lot of issues. Now I can’t even see an error in the CMakeError.log