Navigation

    VEYE IMAGING Forum

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

    UNSOLVED 3588修改行对齐

    VEYE MIPI camera
    2
    12
    1135
    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.
    • L
      lin @veye_xumm last edited by

      @veye_xumm 为什么用python预览图像就没有黑边,自己采集保存出来图像就有黑边了,我的图像分辨率为1920*1200,v4l2-ctl -all查看bytes per line 参数是2048,有办法去掉黑边吗?

      veye_xumm 1 Reply Last reply Reply Quote 0
      • veye_xumm
        veye_xumm @lin last edited by

        @lin
        试试下面这个脚本

        export WIDTH=1920
        
        export HEIGHT=1200
        
        export FPS=60
        
        v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl roi_x=0
        
        v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl roi_y=0
        
        media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam 7-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'
        
        v4l2-ctl -d /dev/video0 --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=1 --stream-to=y8-${WIDTH}x${HEIGHT}.raw
        
        L 1 Reply Last reply Reply Quote 0
        • L
          lin @veye_xumm last edited by

          @veye_xumm还是有黑边呀?

          veye_xumm 1 Reply Last reply Reply Quote 0
          • veye_xumm
            veye_xumm @lin last edited by

            @lin 文件大小是多少?

            L 1 Reply Last reply Reply Quote 0
            • L
              lin @veye_xumm last edited by

              @veye_xumm 2.34M

              veye_xumm 1 Reply Last reply Reply Quote 0
              • veye_xumm
                veye_xumm @lin last edited by

                @lin 你可以看看具体的大小,精确到字节。 1920*1200=2304000bytes

                L 1 Reply Last reply Reply Quote 0
                • L
                  lin @veye_xumm last edited by

                  @veye_xumm 2457600字节,我算过1200行,每行是2048

                  veye_xumm 2 Replies Last reply Reply Quote 0
                  • veye_xumm
                    veye_xumm @lin last edited by

                    @lin 确实有这个现象。回头我研究一下是怎么回事。

                    1 Reply Last reply Reply Quote 0
                    • veye_xumm
                      veye_xumm @lin last edited by

                      @lin 我理解这个Bytes per Line是rkcif驱动里面,自动根据camera的分辨率计算的,没有留v4l-ctl进行配置的接口。如果要改动,需要修改一下rockchip的rkcif源码。rk这么做的目的应该是出于整个系统一些硬件模块操作的方便性。
                      暂时建议你保留这个状况,你的程序处理的时候忽略掉多余的部分。

                      L 1 Reply Last reply Reply Quote 0
                      • L
                        lin @veye_xumm last edited by

                        @veye_xumm 好的,谢谢

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