From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Webcam video acquisition and loops

Solved!
Go to solution

Good morning,

 

I'm new in Labview and I tried to find and answer to my question browsing the forum but I couldn't. I ran the attached piece of code using IMAQdx drivers (3.4 version I guess but I'm not sure) and it works perfectly but I need to put all my code inside of the while loop, otherwise It doesn't work. What I'm trying to do is a color track program using particle filters so I need to run my webcam continuously and print particles on the output. So here's my question, can I somehow put the rest of my code outside the while loop or do I need to put eveything inside in order to print particles on the video image?

 

Thanks in advance.

0 Kudos
Message 1 of 5
(2,667 Views)
Solution
Accepted by topic author pakopon

Hello,

 

you should use a producer consumer design pattern for this. send the aquired images to the consumer loop to process them.

 

Regards,

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 2 of 5
(2,653 Views)

Hello Rodéric and thanks for your response. Do you mean like this?

 

http://www.ni.com/white-paper/3023/en

0 Kudos
Message 3 of 5
(2,648 Views)

indeed

Rodéric L
Certified LabVIEW Architect
0 Kudos
Message 4 of 5
(2,636 Views)

Hello again,

 

I made a producer-consumer that enqueues images from webcam (producer) and dequeues images in the other loop (consumer). But I cannot see the video Stream in the other loop, just I/O elements and Labview shows me an error when I dequeued. How could I rebuild the original video from the enqueued elements in the producer.

 

Thanks in advance.

0 Kudos
Message 5 of 5
(2,612 Views)