VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    V4l2 capture by OpenCV doesn't work for IMX462

    Scheduled Pinned Locked Moved VEYE MIPI camera
    2 Posts 2 Posters 1.3k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B Offline
      barbanevosa
      last edited by

      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_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        veye_xumm @barbanevosa
        last edited by

        @barbanevosa

        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

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

        1 Reply Last reply Reply Quote 0

        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
        • First post
          Last post