Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    1. Home
    2. w88121446
    W
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 22
    • Best 0
    • Groups 0

    w88121446

    @w88121446

    0
    Reputation
    2
    Profile views
    22
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Email jiashangyu0124@163.com

    w88121446 Follow

    Latest posts made by w88121446

    • RE: 获取图像的测试代码,依赖opencv4.2的动态库,测试可以正常出图,用opencv4.6的库出现cap.isOpened()返回false

      @nb 您好,我遇到了类似的问题,请问一下您的解决方案就是将4.6的opencv更换成4.2的opencv吗?

      posted in Machine Vision camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm said in 移植MV-IMX265驱动程序到迅为RK3568抓图卡死:

      gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY8,width=2048,height=1544 ! autovideosink

      用您发的这个命令的话,我要把format=GRAY8改成format=NV12才能预览。

      关于GStreamer 可能没有正确配置,导致 OpenCV 无法通过 GStreamer 打开视频设备。这个事情,我就查一查GStreamer的配置问题是吧!

      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm 可以使用下面这个命令拍照,图片正常

      ./yavta -c1 -Fy81-2048x1544.raw --skip 0 -f Y8 -s 2048x1544 /dev/video0
      
      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm 我使用您发给我的命令还是不能打开caramer,再次确认了是I2C-2没有错
      8edbc1da-117c-40ac-b30b-685045e7dc65-image.png

      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm这样调用的

      python3 v4l2dev_2_opencv_show_grey.py

      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm
      我是这么写的,我的I2C用的I2C2,产品分辨率2048*1544

      import sys
      import argparse
      import subprocess
      import cv2
      
      def read_cam(width, height, fps,i2c):
          
          v4l2_cmd = f'media-ctl -d /dev/media0 --set-v4l2 \'"m00_b_mvcam {i2c}-003b":0[fmt:Y8_1X8/{width}x{height}@1/{fps} field:none]\''
          subprocess.run(v4l2_cmd, shell=True)
          
          cap = cv2.VideoCapture(f"v4l2src io-mode=dmabuf device=/dev/video0 ! video/x-raw, format=(string)GRAY8, width=(int){width}, height=(int){height} ! appsink")
          if cap.isOpened():
              cv2.namedWindow("demo", cv2.WINDOW_AUTOSIZE)
              while True:
                  ret_val, img = cap.read();
                  cv2.imshow('demo',img)
                  cv2.waitKey(1)
          else:
           print ("camera open failed");
          cv2.destroyAllWindows()
      if __name__ == '__main__':
          parser = argparse.ArgumentParser(description='Read camera video stream')
          parser.add_argument('--width', type=int, default=2048, help='width of the video stream')
          parser.add_argument('--height', type=int, default=1544, help='height of the video stream')
          parser.add_argument('--fps', type=int, default=30, help='fps of the video stream')
          parser.add_argument('--i2c', type=int, default=2, help='i2c bus number')
          args = parser.parse_args()
          read_cam(args.width, args.height, args.fps, args.i2c)
      
      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm /dev/video0确认存在的,用的下面这个PY脚本

      import sys
      import argparse
      import subprocess
      import cv2
      
      def read_cam(width, height, fps,i2c):
          
          v4l2_cmd = f'media-ctl -d /dev/media0 --set-v4l2 \'"m00_b_mvcam 2-003b":0[fmt:Y8_1X8/{width}x{height}@1/{fps} field:none]\''
          subprocess.run(v4l2_cmd, shell=True)
          
          cap = cv2.VideoCapture(f"v4l2src io-mode=dmabuf device=/dev/video0 ! video/x-raw, format=(string)GRAY8, width=(int){width}, height=(int){height} ! appsink")
          if cap.isOpened():
              cv2.namedWindow("demo", cv2.WINDOW_AUTOSIZE)
              while True:
                  ret_val, img = cap.read();
                  cv2.imshow('demo',img)
                  cv2.waitKey(1)
          else:
           print ("camera open failed");
      
          cv2.destroyAllWindows()
      if __name__ == '__main__':
          parser = argparse.ArgumentParser(description='Read camera video stream')
          parser.add_argument('--width', type=int, default=1080, help='width of the video stream')
          parser.add_argument('--height', type=int, default=1080, help='height of the video stream')
          parser.add_argument('--fps', type=int, default=30, help='fps of the video stream')
          parser.add_argument('--i2c', type=int, default=7, help='i2c bus number')
          args = parser.parse_args()
      
          read_cam(args.width, args.height, args.fps, args.i2c)
      

      报错如下
      23ca28c19180d09616cfb3508239726.jpg

      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm 我用《v4l2dev_2_opencv_show_grey.py》这个文件,报错camera open failed.
      麻烦指导一下

      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm 用C++调用OPENCV也可以预览到正常的图像把。

      posted in VEYE MIPI camera
      W
      w88121446
    • RE: 移植MV-IMX265驱动程序到迅为RK3568抓图卡死

      @veye_xumm 好的,感谢您的帮助。

      posted in VEYE MIPI camera
      W
      w88121446