• Community
  • [ FFC-4p] trigger two or more cameras by an external signal

I have a FFC-4p and want to capture images triggered by an external signal. It is ok when I use a single camera, but it does not work when using two or more cameras. The configuration code is below.

dai::Pipeline pipeline;
auto camA = pipeline.create<dai::node::MonoCamera>();
auto camD = pipeline.create<dai::node::MonoCamera>();

auto xoutA = pipeline.create<dai::node::XLinkOut>();
auto xoutD = pipeline.create<dai::node::XLinkOut>();

xoutA->setStreamName("camA");
xoutD->setStreamName("camD");

camA->setBoardSocket(dai::CameraBoardSocket::CAM_A);
camA->setResolution(dai::MonoCameraProperties::SensorResolution::THE_400_P);
camA->out.link(xoutA->input);
camA->initialControl.setExternalTrigger(2,1);
camA->initialControl.setFrameSyncMode(dai::CameraControl::FrameSyncMode::INPUT);

camD->setBoardSocket(dai::CameraBoardSocket::CAM_D);
camD->setResolution(dai::MonoCameraProperties::SensorResolution::THE_400_P);
camD->out.link(xoutD->input);
camD->initialControl.setExternalTrigger(2,1);
camD->initialControl.setFrameSyncMode(dai::CameraControl::FrameSyncMode::INPUT);
  • erik replied to this.

    Thanks, erik
    Something is wired when I change the resolution from 400P to 720P. The trigger of multi-cams work at 720P but fail at 400P.
    dai:πŸ˜›ipeline pipeline;
    auto camA = pipeline.create<dai::node::MonoCamera>();
    auto xoutA = pipeline.create<dai::node::XLinkOut>();
    xoutA->setStreamName("camA");
    camA->setBoardSocket(dai::CameraBoardSocket::CAM_A);
    camA->setResolution(dai::MonoCameraProperties::SensorResolution::THE_720_P);
    camA->out.link(xoutA->input);
    camA->initialControl.setExternalTrigger(2,1);

    auto camD = pipeline.create<dai::node::MonoCamera>();
    auto xoutD = pipeline.create<dai::node::XLinkOut>();
    xoutD->setStreamName("camD");
    camD->setBoardSocket(dai::CameraBoardSocket::CAM_B);
    camD->setResolution(dai::MonoCameraProperties::SensorResolution::THE_720_P);
    camD->out.link(xoutD->input);
    camD->initialControl.setExternalTrigger(2,1);
    • erik replied to this.

      nlog2 thanks for the report, I can reproduce, we will be investigating this..

        erik
        The camera I have is OV9282 with UC760 board. If you find out, please let me know.
        There is a new problem. If I connect two cameras on B&C port, the images are perfectly synced, but timestamps are different when I connect the same cameras on A&D port. If I want to use more than three cameras, what should I do to sync them in snap mode. I follow the synchronization you mentioned, it works for me in streaming mode, but how to modify it in snap mode?

          Hi erik, does this mean that if I have four OAK-FFC-IMX378 attached to a OAK-FFC-4P then I can not sync the cameras without some extra hardware? I just ordered them with this intention. Thank you for your time!

          If you mean specifically HW syncing (SW syncing would still work), I believe that's currently the case, cc @Luxonis-Alex ^

          • i4n replied to this.
          • i4n likes this.

            For the issue with setExternalTrigger not working at THE_400_P resolution (OV9282/OV9782), we will debug and keep you posted about the findings...

            nlog2 If I connect two cameras on B&C port, the images are perfectly synced, but timestamps are different when I connect the same cameras on A&D port.

            This was using setExternalTrigger, or free running mode?
            We will need hardware sync enabled to sync any others than B+C that by default are synced, broadcast-programmed on the shared I2C bus. A way to sync is:
            .setFrameSyncMode(OUTPUT) for one OV9282/9782, and .setFrameSyncMode(INPUT) for the others. And setExternalTrigger not used.

            .setFrameSyncMode(INPUT) should work on IMX378 currently, but might need tweaked FPS, we'll need to retest and confirm settings. The sensor should also be able to output this signal, but it's not implemented yet.

              Luxonis-Alex It was using setExternalTrigger . So when I explicitly enabled hardware sync setFrameSyncMode, it conflicted with setExternalTrigger, and no image output.
              My purpose is to synchronize two or more global shutter cameras on ffc-4p with a Livox LiDAR. The external trigger signal is generated by the GNSS module at 10Hz.

              By the way, is it possible to use setExternalTrigger on OAK-D-S2 (DM9098 board), like soldering a wire to connect with an external signal?

              • erik replied to this.

                Hi nlog2 ,
                Yes it should be possible, see here on where to solder the wire.
                Thanks, Erik

                6 days later

                erik Thanks for your reply. What is the best method for software sync using 4 OAK-FFC-IMX378s?

                Is there an ETA for hardware sync using 4 OAK-FFC-IMX378s?

                Thanks for your time,
                Ian

                2 months later

                Can someone please reply? Thank you for your time!

                Note: I am trying to make a device 4 identical cameras with accurate frame sync. The output ideally would be single frame with one image with two images on top and two images on bottom. Any advice you can offer would be appreciated πŸ™‚

                X|X
                X|X

                • erik replied to this.

                  Hi i4n ,
                  I apologize for the delay - I would suggest creating Issue on depthai-core. I am not that familiar with sensors, but AFAIK the IMX378 doesn't support FSYNC trigger output, so something else would need to send triggers.
                  Best to create an issue with all relevant info (how you are connecting, what you have tried) and our FW engineers will look into it.
                  Thanks, Erik

                  • i4n likes this.