MATLAB Answers

How can I acquire images from multiple GigE cameras using Image Acquisition Toolbox and Parallel Computing Toolbox?

38 views (last 30 days)
I have two or more GigE Vision cameras and I want to acquire images/video from them by using Parallel Computing Toolbox with one worker per camera.
Is there some example code that shows this approach?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Aug 2019
Please find attached example code on how to acquire from two cameras with spmd (Parallel Computing Toolbox) and videoinput (Image Acquisition Toolbox).
Refer to the attached examples: * “example_videoinput_spmd_logtomemory.m” * “example_videoinput_spmd_logtodisk.m”
The acquisition from each camera takes place in separate worker by using spmd blocks. When detecting the connected cameras, labBarrier ensures that the camera detection code is called by only one worker at a time.

  1 Comment

Francesco Ciriello
Francesco Ciriello on 22 Feb 2019
Thank you for the scripts.
While they work fine if I modify them for each individual camera, I am having trouble running both cameras at the same time. I get an error at the videoinput function:
"Error using vid_AQ_2cam_JAI_Mono_Parallel_memory (line 17)
Error detected on worker 2.
Caused by:
Error using videoinput (line 393)
The image acquisition device did not provide any video sources. Video sources are
required."
Do you have any suggestions on why this might be? I have attached my own script for reference.

Sign in to comment.

More Answers (0)

Sign in to answer this question.

Tags

No tags entered yet.