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?
-
Hi, I am not very familiar with opencv, here is the command for your reference.
http://wiki.veye.cc/index.php/V4L2_mode_for_Raspberry_Pi#Stream_to_OpenCV
Also, I think this link below will be helpful to you.
https://qengineering.eu/install-gstreamer-1.18-on-raspberry-pi-4.html
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login