From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Processing live images with two cameras simultaneously

Solved!
Go to solution

Hi,

 

I'm using two nearly identical Basler acA1920-155um cameras to grab, process and display simultaneously. I have some UI buttons too, not all of them are working but I'll deal with them once I can get separate images from both cameras at the same time. The problem is that when I want to threshold the image at the second tab by increasing the slide, images mix up after 2 seconds

 

I'm suspecting it is to do with IMAQ creates but I've changed all of its names and even created a separate VI for the same process, namely Processing 1-2. I'm not sure what else I suppose to do... I've fiddled with different VI execution options for the SubVIs (Processing 1-2) as well...  

 

Do you have any suggestions?

 

Thanks

0 Kudos
Message 1 of 4
(2,622 Views)
Solution
Accepted by topic author daidase

I narrowed down the culprit to the VI "Thresholding - shiftregisters.vi".

 

In VI Properties > Execution, it is set to "Shared clone reentrant execution". This VI is called by both the Processing VIs. With "Shared clone" reentrancy, this means that the data stored in the shift register is shared by both Processing VIs. So sometimes the image from camera 1 will be in the shift register, sometimes the image from camera 2.

 

Change the reentrancy type to "Preallocated clone reentrant execution". Now each processing VI will have it's own version of the thresholding VI, and the images won't interfere with each other.

0 Kudos
Message 2 of 4
(2,590 Views)

Thanks for looking it through. I've tried it but no success there, unfortunately, it does the same thing again, it flickers between images with a touch of the slide. I'm just trying to organize the main VI in a different way, cause I'm not sure its the best way to do it, seems very complicated so it probably is and that's messing up with the process.

0 Kudos
Message 3 of 4
(2,564 Views)

It's actually worked in the end but I had to check "inline subVI and into calling VIs" too from execution and rearrange everything (get rid of the property nodes and references and uncheck debugging) according to it.

 

Thanks a lot!

0 Kudos
Message 4 of 4
(2,540 Views)