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

    jetson nano 2GB无法识别相机 MV-MIPI-IMX264M

    Scheduled Pinned Locked Moved Jetson App Software
    39 Posts 2 Posters 21.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.
    • H Offline
      hmj @veye_xumm
      last edited by hmj

      @veye_xumm
      关于ROI, 有几个问题请教一下
      1:X,Y,W,H中的W应该多少字节对齐合适? 全画面下文档建议是64x, X的起始位置应为多少字节对其合适?参考代码中是8
      2:ROI重配置是否需要对/dev/video0设备关闭重新打开?
      3:ROI的设置有2部分重叠, I2C那边有设置参数, V4L2也有设置参数.是否要重配置
      如果我需一起哦截取的位置是 [256,256, 512,512] 那么V4L2那边的具体参数该怎么配置,从0,0开始(应为I2C已经配过了), 还是(256,256)开始?

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

        @hmj

        1. [y] [height] 的步长为 4,[width] 的步长为 8。

          实际上在jetson平台上,建议width的步长为64.这样方便jetson主板收到数据之后对齐操作,也方便你应用层处理。

        @hmj said in jetson nano 2GB无法识别相机 MV-MIPI-IMX264M:

        2:ROI重配置是否需要对/dev/video0设备关闭重新打开?

        不需要。

        @hmj said in jetson nano 2GB无法识别相机 MV-MIPI-IMX264M:

        3:ROI的设置有2部分重叠, I2C那边有设置参数, V4L2也有设置参数.是否要重配置

        不需要重复设置。
        如果你打开/dev/video0之前对camera做一系列配置,可以用脚本对摄像头进行一系列配置。然后打开/dev/video0,v4l2接口会得到新配置的参数。
        另一个方法,也更简单一些。对于v4l2接口支持的参数,就直接用v4l2接口配置。不支持的用脚本配置即可。

        @hmj said in jetson nano 2GB无法识别相机 MV-MIPI-IMX264M:

        如果我需一起哦截取的位置是 [256,256, 512,512] 那么V4L2那边的具体参数该怎么配置,从0,0开始(应为I2C已经配过了), 还是(256,256)开始?

        不管用什么配置方法,都正确传递[256,256, 512,512] 参数进去应该就可以的。

        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.)

        H 1 Reply Last reply Reply Quote 0
        • H Offline
          hmj @veye_xumm
          last edited by hmj

          @veye_xumm

          假设jetson上电后得预配置时[0,0,2432,2048],正在正常按节奏取图,
          这时UI 给了一个[128, 16, 1024, 256] 这么一个需求,
          如何配置驱动,才能让用户无感无缝切换图片.
          (配置时候,可以接受暂时停流, 不接受重启上层应用或重启jetson设备)

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

            @hmj 你在你的程序里面,调用stop stream(VIDIOC_STREAMOFF),然后配置roi,然后重新start stream(VIDIOC_STREAMON)。

            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.)

            H 1 Reply Last reply Reply Quote 0
            • H Offline
              hmj @veye_xumm
              last edited by

              @veye_xumm
              也就是说,在nano平台, 关于roi这组参数,可以忽略i2c层面配置,只有v4l那边配置就可以了?
              这么做是真实硬件ROI, 会带来FPS得提升吧?

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

                @hmj
                I2c脚本和v4l2接口,本质上都是通过i2c配置了camera的寄存器。所以只需要v4l做了,就无需使用脚本配置。
                是的,降低roi中的图像高度,会提升MAXFPS,你可以通过脚本获取当前配置下的max fps,然后配置fps到范围内的值。

                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.)

                H 1 Reply Last reply Reply Quote 0
                • H Offline
                  hmj @veye_xumm
                  last edited by hmj

                  @veye_xumm
                  我现在又遇到一个问题,如果我把相机曝光设置为10000(2432*2048), 查询GET_FPS,帧率大约为38.84,那么帧周期为27902, 在此基础上用硬触发(周期为28000的脉冲,其中高电平维持10000,站空比为5:7)去拍, 比如发送10个脉冲, 那么只能收到5图,如果把触发周期改成34000以上, 那么10图都能接受到.

                  我现在需要保证相机尽量快速取图,哪边还需要再配置才能获地高速?

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

                    @hmj 按照https://wiki.veye.cc/index.php/Mv_mipi_camera_manual/zh part2.4.3的描述,你的诉求应该是没有问题的。
                    你先参考这个链接,升级一下固件:https://wiki.veye.cc/index.php/Mvcam_firmware_update_manual
                    然后再做一下测试试试。

                    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.)

                    H 1 Reply Last reply Reply Quote 0
                    • H Offline
                      hmj @veye_xumm
                      last edited by

                      @veye_xumm

                      ./mv_mipi_i2c.sh -r -f version
                      version is C 01.34 and L 02.00
                      貌似已经是最新固件,与网站上6月5日是同一版, 无需再升级

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

                        @hmj https://wiki.veye.cc/index.php/Mv_mipi_i2c.sh_user_guide
                        参考这个页面,把trigger相关的参数读出来一下,发给我看看。
                        trgnum
                        trginterval
                        trgdelay
                        trgedge
                        trgfilter_enable
                        trgfilter_time
                        trgexp_delay
                        trgcount

                        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.)

                        H 1 Reply Last reply Reply Quote 0
                        • H Offline
                          hmj @veye_xumm
                          last edited by

                          @veye_xumm said in jetson nano 2GB无法识别相机 MV-MIPI-IMX264M:

                          trgcount

                          pt@dpt-desktop:./mv_mipi_i2c.sh -r -f version
                          version is C 01.34 and L 02.00
                          dpt@dpt-desktop: ./mv_mipi_i2c.sh -r -f trgnum
                          r trigger num is 1
                          dpt@dpt-desktop: ./mv_mipi_i2c.sh -r -f trginterval
                          r trginterval is 0
                          dpt@dpt-desktop:./mv_mipi_i2c.sh -r -f trgdelay
                          r trgdelay is 0
                          dpt@dpt-desktop:./mv_mipi_i2c.sh -r -f trgedge
                          r trg edge is 0
                          dpt@dpt-desktop: ./mv_mipi_i2c.sh -r -f trgfilter_enable
                          r trgfilter enable is 0
                          dpt@dpt-desktop: ./mv_mipi_i2c.sh -r -f trgfilter_time
                          r trgfilter time is 1 us
                          dpt@dpt-desktop:./mv_mipi_i2c.sh -r -f trgexp_delay
                          r trigger exposure delay is 0 us
                          dpt@dpt-desktop:./mv_mipi_i2c.sh -r -f trgcount
                          r trigger count 156, trigger lost 0

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

                            @hmj 你现在读取一下fps和maxfps,分别是多少?

                            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.)

                            H 2 Replies Last reply Reply Quote 0
                            • H Offline
                              hmj @veye_xumm
                              last edited by

                              @veye_xumm
                              ./mv_mipi_i2c.sh -r -f maxfps
                              r maxfps @ current setting is 35.84 fps
                              ./mv_mipi_i2c.sh -r -f fps
                              r fps is 30.00 fps

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

                                @hmj
                                这是问题所在了。
                                虽然是触发模式,但是实际生效的帧率还是fps这个参数,maxfps永远只是最大能力的一个提示而已。
                                那么你之前

                                @hmj said in jetson nano 2GB无法识别相机 MV-MIPI-IMX264M:

                                查询GET_FPS,帧率大约为38.84,那么帧周期为27902,

                                这个地方的帧周期计算,应该使用fps来算。 这个fps不仅影响着camera真正的运作时序,也影响着最大可设的曝光时间。
                                建议你:

                                ./mv_mipi_i2c.sh -w -f fps -p1 40 -b [bus]
                                ./mv_mipi_i2c.sh -r -f fps -b [bus]
                                

                                这样,就把相机设置到了当前roi下最大帧率。
                                应该就没问题了。

                                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.)

                                H 1 Reply Last reply Reply Quote 0
                                • H Offline
                                  hmj @veye_xumm
                                  last edited by

                                  @veye_xumm
                                  感谢,问题解决~

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

                                    @hmj 不客气

                                    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
                                    • H Offline
                                      hmj @veye_xumm
                                      last edited by

                                      @veye_xumm
                                      我们现在基本测试已经通过,现在有个棘手的问题,由于jetson nano的mipi驱动在kernel image中,我目前的做法是直接替换官方的.

                                      我们目前项目中添加了许多其他功能, 因此修改了内核的许多地方.所以为了替换之前的老相机,必须拿到你们kenrel源码和DTS, 再整合进我们目前的内核中,才能无缝完成项目的迁移.

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

                                        @hmj 请参考下面这个链接
                                        https://wiki.veye.cc/index.php/VEYE_CS_Camera_source_for_Jetson/zh

                                        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.)

                                        H 1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          hmj @veye_xumm
                                          last edited by

                                          @veye_xumm
                                          相机有没有调节对比度的api, 我们目前发现图片在拍黑白图案(相机标定)时候,图片质量没有国外相机明显.

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

                                            @hmj 您可以通过调节gamma,或者自定义lut曲线达到这种高对比度效果。

                                            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.)

                                            H 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