Navigation

    VEYE IMAGING Forum

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

    sanlu

    @sanlu

    0
    Reputation
    1
    Profile views
    7
    Posts
    0
    Followers
    0
    Following
    Joined Last Online
    Email sanlu+veye@pkim.org

    sanlu Follow

    Latest posts made by sanlu

    • RE: IMX178 roi problem - rpi5

      @veye_xumm
      Perfect. Now is working as expected. Thanks!

      posted in Machine Vision camera
      S
      sanlu
    • RE: IMX178 roi problem - rpi5

      @veye_xumm Ok - now "mv_mipi_i2c.sh -r -f roi" show right values, but main problem exists: image not begin at 344px but 88.
      But problem exists only at "x" - I've tested image 1200x1200 offseted by 512 and "y" begins at right position

      posted in Machine Vision camera
      S
      sanlu
    • RE: IMX178 roi problem - rpi5

      @veye_xumm Results below:

      root@allsky2:~/raspberrypi_v4l2/rpi5_scripts# ./media_setting_rpi5.sh mvcam -fmt RAW10 -x 344 -y 0  -w 2400 -h 2064 -c 1
      This is a Raspberry Pi 5.
      Kernel version is 6.6.51, do not support unpacked format.
      camera name mvcam; roi_x 344; roi_y 0;width 2400; height 2064; media_fmt Y10_1X10; pixel_fmt Y10P
      CAM1 probed: media device is /dev/media1
      set CAM1 finish, plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting
      root@allsky2:~/raspberrypi_v4l2/rpi5_scripts# cd ../mv_tools_rpi/
      /root/raspberrypi_v4l2/mv_tools_rpi
      root@allsky2:~/raspberrypi_v4l2/mv_tools_rpi# ./mv_mipi_i2c.sh -r -f roi -b 4
      r roi is 0,0,2400,2064 
      
      posted in Machine Vision camera
      S
      sanlu
    • RE: IMX178 roi problem - rpi5

      @veye_xumm Results:

      # ./media_setting_rpi5.sh mvcam -fmt RAW8 -w 2400 -h 2064 -c 1
      This is a Raspberry Pi 5.
      camera name mvcam; width 2400; height 2064; media_fmt Y8_1X8; pixel_fmt GREY
      CAM1 probed: media device is /dev/media1
      set CAM1 finish, plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting
      # v4l2-ctl --set-ctrl roi_x=344 -d /dev/v4l-subdev2 
      # v4l2-ctl --set-ctrl roi_y=0 -d /dev/v4l-subdev2 
      # v4l2-ctl --set-fmt-video=width=2400,height=2064 -d /dev/video0
      # ./mv_mipi_i2c.sh -r -f roi -b 4
      r roi is 0,0,2400,2064 
      # ./mv_mipi_i2c.sh -r -f version -b 4
      version is C 01.36 and L 02.01
      
      posted in Machine Vision camera
      S
      sanlu
    • RE: IMX178 roi problem - rpi5

      @veye_xumm Your example at full resolution works fine. I don't want full resolution but width 2400px centered - it require ROI offseted by 344px, but after setting roi via mv_mipi_i2c.sh script (./mv_mipi_i2c.sh -w -f roi -p1 344 -p2 0 -p3 2400 -p4 2064 -b 4) image is offseted only 88px - offset is "modulo" 256px (i've send you images via e-mail).

      Second example: How to set all 4 param in one command while "v4l2-ctl --set-ctrl roi_x " works on device /dev/v4l-subdev2 during "v4l2-ctl --set-fmt-video" works on /dev/video0 ?

      posted in Machine Vision camera
      S
      sanlu
    • IMX178 roi problem - rpi5

      Hello,
      I can't set proper roi on rpi5 and imx178 . Command history:

      ./media_setting_rpi5.sh mvcam -fmt RAW8 -w 3088 -h 2064
      This is a Raspberry Pi 5.
      camera name mvcam; width 3088; height 2064; media_fmt Y8_1X8; pixel_fmt GREY
      CAM1 probed: media device is /dev/media2
      set CAM1 finish, plese get frame from /dev/video0 and use /dev/v4l-subdev2 for camera setting
      # v4l2-ctl --set-fmt-video=width=2600,height=2064 -d /dev/video0
      # v4l2-ctl -d /dev/video0 --set-fmt-video=width=2600,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2600x2064.raw
        VIDIOC_STREAMON returned -1 (Invalid argument)
      # v4l2-ctl -d /dev/video0 --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-2600x2064.raw
      <
      

      (data captured)

      Second example:

      # ./media_setting_rpi5.sh mvcam -fmt RAW8 -w 2600 -h 2064 -c 1
      # v4l2-ctl --set-ctrl roi_x=100 -d /dev/v4l-subdev2
      # gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! "video/x-raw,format=GRAY8,width=2600,height=2064, framerate=25/1" ! jpegenc ! filesink location=/tmp/test_roi100.jpg
      

      no matter what "number" I set in "v4l2-ctl --set-ctrl roi_x='number'"
      there is no effect on image - always roi begins at 0,0.
      Script ./mv_mipi_i2c.sh -r -f roi -b 4
      always return: r roi is 0,0,2600,2064

      Second problem is "overflow" at 256 pixels in setting roi by mv_mipi_i2c.sh. Image captured after setting roi:

       ./mv_mipi_i2c.sh -w -f roi -p1 256 -p2 0 -p3 2600 -p4 2064 -b 4
      

      Is the same when:

       ./mv_mipi_i2c.sh -w -f roi -p1 0 -p2 0 -p3 2600 -p4 2064 -b 4; 
      

      setting x-offset at maximus 248 pix works ok:
      ./mv_mipi_i2c.sh -w -f roi -p1 248 -p2 0 -p3 2600 -p4 2064 -b 4;

      posted in Machine Vision camera
      S
      sanlu
    • RE: Raspberry pi 5 6.6.51+rpt-rpi-2712

      @opti
      you have to compile it from sources

      posted in Raspberry Pi App Software
      S
      sanlu