Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc

    V4l2 capture by OpenCV doesn't work for IMX462

    VEYE MIPI camera
    2
    2
    356
    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
      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_xumm 1 Reply Last reply Reply Quote 0
      • veye_xumm
        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post