I try to open the MIPI camera using opencv on VIM3: $python3 mipi-camera.py, but I always get this error:
[ WARN:0] global …/modules/videoio/src/cap_v4l.cpp (887) open VIDEOIO(V4L2:/dev/video0): can’t open camera by index
I followed the example and we can use v4l2_test and guvcview to open the camera. I see this solution in our community: $sudo apt remove opencv3, $pip3 uninstall opencv-python, $sudo apt update, $sudo apt install libopencv-dev python3-opencv. But it doesn’t work.
Do you have any information about OpenCV support for the mipi camera? @Frank@numbqq
Thanks for your reply @Frank.
I reconfigured a new VIM3 board following your steps and it works.
But after installing ksnn, the error of " can’t open camera by index" reproduced, because ksnn requires opencv-python==4.6.0.66 and it install it automatically. And I can’t find the same version opencv 4.2.0 in pip. How I can use the MIPI camera with KSNN ?
And here are the versions of opencv-python in python:
Could not find a version that satisfies the requirement opencv-python==4.2.0 (from versions: 3.4.0.14, 3.4.10.37, 3.4.11.39, 3.4.11.41, 3.4.11.43, 3.4.11.45, 3.4.13.47, 3.4.14.53, 3.4.15.55, 3.4.16.57, 3.4.16.59, 3.4.17.61, 3.4.17.63, 3.4.18.65, 4.3.0.38, 4.4.0.40, 4.4.0.42, 4.4.0.44, 4.4.0.46, 4.5.1.48, 4.5.2.54, 4.5.3.56, 4.5.4.58, 4.5.4.60, 4.5.5.62, 4.5.5.64, 4.6.0.66)