V4l2 capture by OpenCV doesn't work for IMX462
I use VEYE-MIPI-IMX462 with RPI 3B+ (bullsye, 5.10.92-v7+). Kernel module veyecam2m is installed. V4l2 preview by VLC player and GStreamer works fine.
When I tried to read from Python script by OpenCV with cv.VideoCapture() no frames captured (cv.VideoCapture.isOpened() returns False). I've tried to downgrade the kernel to v5.10.17 and use previous veye327 module but this hasn't solved the problem.
import cv2 as cv cap = cv.VideoCapture(0) print(cap.isOpened()) while cv.waitKey(10) != 27: ret, img = cap.read() cv.imshow("video", img) cap.release() cv.destroyAllWindows()
How to capture video by OpenCV and v4l2 for IMX462? And why it works fine with VLC and doesn't work with Python + OpenCV?
veye_xumm last edited by
Hi, I am not very familiar with opencv, here is the command for your reference.
Also, I think this link below will be helpful to you.