VEYE IMAGING Forum
    • Categories
    • Tags
    • Recent
    • Popular
    • Users
    • WIKI
    • veye.cc
    • Register
    • Login

    3588修改行对齐

    Scheduled Pinned Locked Moved VEYE MIPI camera
    12 Posts 2 Posters 3.2k Views 1 Watching
    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 Offline
      lin @veye_xumm
      last edited by

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

      veye_xummV 1 Reply Last reply Reply Quote 0
      • veye_xummV Offline
        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
        

        Questions will be answered as soon as possible, please be patient.
        如果你使用中文,请直接用中文提问。
        May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

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

          @veye_xumm还是有黑边呀?

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

            @lin 文件大小是多少?

            Questions will be answered as soon as possible, please be patient.
            如果你使用中文,请直接用中文提问。
            May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

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

              @veye_xumm 2.34M

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

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

                Questions will be answered as soon as possible, please be patient.
                如果你使用中文,请直接用中文提问。
                May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

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

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

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

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

                    Questions will be answered as soon as possible, please be patient.
                    如果你使用中文,请直接用中文提问。
                    May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

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

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

                      Questions will be answered as soon as possible, please be patient.
                      如果你使用中文,请直接用中文提问。
                      May the force be with YOU. (This is the translation of the mysterious Chinese symbol above.)

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

                        @veye_xumm 好的,谢谢

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • First post
                          Last post