Navigation

    VEYE IMAGING Forum

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    1. Home
    2. skyhorizon
    3. Posts
    S
    • Profile
    • Following 0
    • Followers 0
    • Topics 2
    • Posts 7
    • Best 0
    • Groups 0

    Posts made by skyhorizon

    • RE: Read MV-MIPI-SC130M with openCV

      @veye_xumm 能否提供一些在python或是c/c++中可用的读取接口或程序示例,我需要一个确定可用的程序对摄像头进行功能测试,最好能兼容opencv和gstreamer

      posted in Machine Vision camera
      S
      skyhorizon
    • RE: Read MV-MIPI-SC130M with openCV

      @skyhorizon 硬件平台是RPI 4B

      posted in Machine Vision camera
      S
      skyhorizon
    • RE: Read MV-MIPI-SC130M with openCV

      @veye_xumm a6d6c694-11aa-4fac-ac25-82bb547656f6-image.png
      RPI OS 5.15.84 驱动是本地编译的5.15_all。

      v4l2-ctl -d /dev/video0 --all
      
      Driver Info:
      	Driver name      : unicam
      	Card type        : unicam
      	Bus info         : platform:fe801000.csi
      	Driver version   : 5.15.84
      	Capabilities     : 0x85a00001
      		Video Capture
      		Metadata Capture
      		Read/Write
      		Streaming
      		Extended Pix Format
      		Device Capabilities
      	Device Caps      : 0x05200001
      		Video Capture
      		Read/Write
      		Streaming
      		Extended Pix Format
      Media Driver Info:
      	Driver name      : unicam
      	Model            : unicam
      	Serial           : 
      	Bus info         : platform:fe801000.csi
      	Media version    : 5.15.84
      	Hardware revision: 0x00000000 (0)
      	Driver version   : 5.15.84
      Interface Info:
      	ID               : 0x03000005
      	Type             : V4L Video
      Entity Info:
      	ID               : 0x00000003 (3)
      	Name             : unicam-image
      	Function         : V4L2 I/O
      	Flags         : default
      	Pad 0x01000004   : 0: Sink
      	  Link 0x02000007: from remote pad 0x1000002 of entity 'mvcam 10-003b': Data, Enabled, Immutable
      Priority: 2
      Video input : 0 (Camera 0: ok)
      Format Video Capture:
      	Width/Height      : 1280/1024
      	Pixel Format      : 'GREY' (8-bit Greyscale)
      	Field             : None
      	Bytes per Line    : 1280
      	Size Image        : 1310720
      	Colorspace        : sRGB
      	Transfer Function : Default (maps to sRGB)
      	YCbCr/HSV Encoding: Default (maps to ITU-R 601)
      	Quantization      : Default (maps to Full Range)
      	Flags             : 
      Crop Capability Video Capture:
      	Bounds      : Left 0, Top 0, Width 1280, Height 1024
      	Default     : Left 0, Top 0, Width 1280, Height 1024
      	Pixel Aspect: 1/1
      Selection Video Capture: crop, Left 0, Top 0, Width 1280, Height 1024, Flags: 
      Selection Video Capture: crop_default, Left 0, Top 0, Width 1280, Height 1024, Flags: 
      Selection Video Capture: crop_bounds, Left 0, Top 0, Width 1280, Height 1024, Flags: 
      Selection Video Capture: native_size, Left 0, Top 0, Width 1280, Height 1024, Flags: 
      
      User Controls
      
                      horizontal_flip 0x00980914 (bool)   : default=0 value=0
                        vertical_flip 0x00980915 (bool)   : default=0 value=0
                         trigger_mode 0x00981901 (int)    : min=0 max=2 step=1 default=0 value=0 flags=volatile, execute-on-write
                          trigger_src 0x00981902 (int)    : min=0 max=1 step=1 default=1 value=1 flags=volatile, execute-on-write
                          soft_trgone 0x00981903 (button) : flags=write-only, execute-on-write
                           frame_rate 0x00981904 (int)    : min=0 max=22 step=1 default=22 value=22 flags=volatile, execute-on-write
      
      Camera Controls
      
               camera_sensor_rotation 0x009a0923 (int)    : min=0 max=0 step=1 default=0 value=0 flags=read-only
      
      Image Processing Controls
      
                           pixel_rate 0x009f0902 (int64)  : min=750000000 max=750000000 step=1 default=750000000 value=750000000 flags=read-only
      
      ~ $ dmesg | grep mvcam
      [    8.132715] veye_mvcam: loading out-of-tree module taints kernel.
      [    8.648215] mvcam 10-003b: camera is: MV-MIPI-SC130M
      [    8.649037] mvcam 10-003b: firmware version: 0x1260132
      [    8.657495] mvcam 10-003b: Consider updating driver mvcam to match on endpoints
      
      posted in Machine Vision camera
      S
      skyhorizon
    • Read MV-MIPI-SC130M with openCV

      我尝试使用三个v4l2_opencv_show.py示例读取相机视频流,然而均无法打开摄像头,使用的是cv2.vedioCapture()方法:

      cap = cv2.VideoCapture("v4l2src io-mode=dmabuf device=/dev/video0 ! video/x-raw, format=(string)GREY, width=(int)1280, height=(int)1024 ! appsink")
      

      SC130M支持GREY、Y10等格式,但V4L2的x-raw并不支持,我尝试使用cv2.vedioCapture(0)、缺省format参数,x-raw支持的format=GRAY8进行读取,但是结果显示

      [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (1824) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Device '/dev/video0' does not support 1:4:7:1 colorimetry
      

      我也尝试使用相机支持的GREY进行读取,但是gstreamer无法识别:

      [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (734) open OpenCV | GStreamer warning: Error opening bin: could not link v4l2src0 to appsink0, v4l2src0 can't handle caps video/x-raw, format=(string)GREY, width=(int)1280, height=(int)1024
      [ WARN:0] global ../modules/videoio/src/cap_gstreamer.cpp (501) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
      camera open failed
      
      posted in Machine Vision camera
      S
      skyhorizon
    • RE: MV-MIPI-SC130M on RPi4 Ubuntu Server 20.04 LTI(arm64)

      @veye_xumm 确认是5.4,这是Ubuntu server 20.04LTS arm64

      posted in General Discussion
      S
      skyhorizon
    • RE: MV-MIPI-SC130M on RPi4 Ubuntu Server 20.04 LTI(arm64)

      @veye_xumm 我已经尝试了在本地编译驱动程序,我在raspberrypi_v4l2/driver_source/cam_drv_src/rpi-5.x_all目录下使用5.4.0-1080-raspi内核编译通过,生成了veye_mvcam.ko文件。
      但是我找不到对应版本5.4的dts文件和编译脚本,导致无法获得dtbo文件,我查看了其他版本的三个dts文件:
      /rpi-5.10.92+/veye_mvcam-overlay.dts
      /rpi-5.10.103+/veye_mvcam-overlay.dts
      /rpi-5.15.y/veye_mvcam-overlay.dts
      但我不确定他们能否用于5.4

      posted in General Discussion
      S
      skyhorizon
    • MV-MIPI-SC130M on RPi4 Ubuntu Server 20.04 LTI(arm64)

      请问如何在Ubuntu上配置MV-MIPI-SC130摄像头的驱动?
      项目需要在树莓派4B(64位Ubuntu20.04LTI)上配置MV-MIPI-SC130摄像头的驱动,因为未找到对应预编译版本,故而在PC上尝试搭建交叉编译系统。系统版本 开发环境
      根据教程从源代码构建 rpi/zh 驱动程序,我需要在修改同路径下的KConfig和Makefile,增加对应camera驱动,由于缺乏详细说明或针对MV相机的相关示例,我不确定如何进行修改,同时我无法找到版本匹配的dts文件。想请教一下Kconfig等配置文件的修改方法以及安装适配摄像头驱动的解决方案(由于系统上已经配置了开发环境,希望尽可能避免重装系统)

      posted in General Discussion
      S
      skyhorizon