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

    树莓派CM4+imx327S MIPI x2 运行python demo如何同时打开两个摄像头

    Scheduled Pinned Locked Moved VEYE MIPI camera
    6 Posts 2 Posters 1.3k 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.
    • S Offline
      sjchen
      last edited by

      我将 capture2opencv.py 中 camera.init_camera() 添加参数0或1,即 camera.init_camera(0) 或 camera.init_camera(1),始终报错:"Invalid camera_interface "

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

        @sjchen
        你好,根据D_mipicamera.py文件,init_camera函数的参数

        class CAMERA_INTERFACE(Structure):
            _fields_ = [
                ("i2c_bus",c_int),
                ("camera_num",c_int),
                ("sda_pins",c_int * 2),
                ("scl_pins",c_int * 2),
            ]
        

        后面两个配置pin的没有用到,前面的需要都传入一下。
        参考c库接口文件的注释:

        // i2c is reserved,because we use shell script to do do param setting
        struct camera_interface {
            int i2c_bus;        // /dev/i2c-0  or /dev/i2c-1
            int camera_num;     // mipi interface num,-1 for mode B, 0,1 for mode CM the only used param in this struct
            int sda_pins[2];    // enable sda_pins[camera_num], disable sda_pins[camera_num ? 0 : 1]
            int scl_pins[2];    // enable scl_pins[camera_num], disable scl_pins[camera_num ? 0 : 1]
        
        };
        

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

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          sjchen @veye_xumm
          last edited by sjchen

          @veye_xumm 我理解要传入类似(0,0,(0,0),(0,0))这样的参数对吧,那么sda_pins和scl_pins这两个参数的具体含义是什么(注释没看懂)能否解释一下?谢谢

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

            @sjchen
            这两个是预留参数,实际底层没有用到,传0进去就可以。

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

            S 1 Reply Last reply Reply Quote 0
            • S Offline
              sjchen @veye_xumm
              last edited by

              @veye_xumm 谢谢,现在传入(0,0,(0,0),(0,0)) 和 (1,1,(1,1),(1,1)) 就可以了。

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

                @sjchen 不客气。

                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

                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