How to acquire images by turns using multi cameras?

  • 捕获.JPG

    As shown, I use a sync operator to syncronize two cameras' acquisition and use case to switch acquisition between them. But when I downloaded the bitstream to VQ4 board, the module2 buffer got overflow very soon and finally timeout poped up. So where is the problem?

  • Dear Silverfly,

    I think the approach you just made is not that good for solving your problem. Sync will expect 2 sources that could be balanced somehow. So what is happening here if you got a unbalanced setting (one camera is sending while the other one is quiet) you will run into a stuck situation at the sync since one input is on hold and therefor blocks all other inputs.

    The rest ist just that the camera buffer fills up and you are stuck.

    I would suggest you do the following change:


    Keep in mind to set the SourceSelector.InfiniteSource = Enabled (for the buffer this setting need to be disabled than).

    I hope that helped you solving your problem.

    Best regards,


  • I tried your design but it still did not solve my problem. This time Cam1 can acquire images but Cam2 still can't get any picture. Whether I change the Source Selector online or stop acquisition and change it offline, the MicroDisplay just can not display the Cam2's image even can not start Cam2's acquisition. Because this design only have one DMA, so the MicroDisplay just have one display window and can only start Cam1's acquisition. I wonder if this is why Cam2 can not work.

  • Dear Silverfly

    as you are using a GigEVision camera the camera explicitly needs to be started. microDisplay will do that for you when you click the Play button. However it will start camera 0 with DMA 0. Camera 1 with DMA 1. Etc. As you only have a single DMA camera 1 (you call it camera 2) will not be started by microDisplay.

    Solution: Open the GenICam explorer and connect with the second camera. Search for parameter StartAcquisition and click Execute. This shall start the second camera and you can acquire the images with microDisplay.

    You won't have that type of problem when you integrate the frame grabber with the API using the SDK as you need the code to start the cameras anyway. If you are using a 3rd party interface like Halcon you need to check it.



    Johannes Trein
    Teamleader Applications and Development
    SiliconSoftware GmbH

  • Sorry for late reply! Although I didn't find parameter StartAcquisition in GenICam explorer, I successfully used the SDK to solve this type of problem as Johannes says. Thank both of you very much!

    Furthermore, if I don't want to waste resources to implement switch logic in FPGA, I use a physical SWITCH to link two cameras with VQ4 board. I wonder if there is any API to select one of cameras to acquire images.

  • Hello Silverfly,

    if you use a physical switch you can use the functions described HERE to get connected with one camera only. Best you use the MAC. So to switch between the cameras you need to disconnect and reconnect. I personally never tried it but it should work. Let us know if you have problems.


    Johannes Trein
    Teamleader Applications and Development
    SiliconSoftware GmbH