Navigation

    VEYE IMAGING Forum

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

    SOLVED IMX307pickmode设为1

    CS MIPI camera
    2
    7
    767
    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
      lyj last edited by

      IMX307,pickmode设为1,使用pickone触发读取图片,每隔20s读取一张,会出现读取一段时间后无法读取,而且pickone触发后读取的图片也不实时

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

        @lyj
        pickone的机制就是在mipi输出的地方做了一个开关。
        你可否把你的程序发过来,我们试一下。

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

          @veye_xumm
          import cv2
          import os
          import time

          def gstreamer_pipeline(self, video_idx, capture_width=1280, capture_height=720):
          ret1 = 'v4l2src device=/dev/video{} ! '.format(video_idx)
          ret2 = 'video/x-raw, width=(int){}, height=(int){}, '.format(capture_width, capture_height)
          ret3 = 'format=(string)UYVY ! '
          ret4 = 'nvvidconv ! '
          ret5 = 'video/x-raw(memory:NVMM), '
          ret6 = 'format=(string)I420 ! '
          ret7 = 'nvvidconv ! '
          ret8 = 'video/x-raw, '
          ret9 = 'format=(string)BGRx ! '
          ret10 = 'videoconvert ! '
          ret11 = 'video/x-raw, format=(string)BGR ! appsink'
          print(ret1 + ret2 + ret3 + ret4 + ret5 + ret6 + ret7 + ret8 + ret9 + ret10 + ret11)
          return ret1 + ret2 + ret3 + ret4 + ret5 + ret6 + ret7 + ret8 + ret9 + ret10 + ret11

          if name == 'main':
          cap = cv2.VideoCapture(gstreamer_pipeline(0), cv2.CAP_GSTREAMER)
          password = '此处为sudo密码'
          ret = os.system(
          "echo {} | sudo -S ./shell/cs_mipi_i2c.sh -w -b {} -f pickmode -p1 1".format(password, 9))
          print(ret)
          while True:
          time.sleep(10)
          ret = os.system(
          "echo {} | sudo -S ./shell/cs_mipi_i2c.sh -w -b {} -f pickone".format(password, 9))
          print('%%%', ret)
          ret_val, img = cap.read()
          print(ret_val)
          if ret_val is True:
          cv2.imshow('12', img)
          cv2.waitKey(0)

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

            @veye_xumm 以上是我的代码,麻烦帮忙看一下,我这边等你的回复。这个的问题也是,取到的图不是当下的,是几分钟前的

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

              @lyj 这个参考一下另一个问题上给你的回复。

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

                @veye_xumm 哥,我们认真思考了一下,咱的pickmode写的是:pickmode是一个特殊的功能,一旦开启,sensor正常工作,但是模组将不输出图像,只有收到pickone指令,输出一张。如果是这种情况,就算板卡有缓存,pickone设为1的那一下才输出一张图,存下来的也应该是当下的图像啊

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

                  @lyj 我说的板卡有缓存,指的是你的主板,不是camera。

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