LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

parallel running of process and Roi?

Solved!
Go to solution

Hello,

i have two questions:

1. how can i run two process in parallel in labview,which one process is webcam that stream video,and the other process is image snapshot from the video   

   (i want to snapshot an image after selecting a ROI from the live camera view and to keep the camera view live).

 

 

 

2. how can i choose that ROI will be the entire image frame?

 

  

0 Kudos
Message 1 of 2
(2,122 Views)
Solution
Accepted by topic author Shal

Hello,

 

Below I've attached an example program that implements something similar.  It uses an event structure to listen when to snap and save and image while performing an IMAQdx grab.  I'm unsure if you are trying to extract the ROI, however you should be able to modify the event structure to perform processing on the image instead of saving it to file.  If you are looking to extract an ROI, I recommend you look at Extract Example.vi that ships with Vision Development module.  You can find it by going to Help»Find Examples... then navigate to Toolkits and Modules»Vision»Functions»Extract Example.vi.  It uses a Get Last Event Invoke Node to listen when an ROI is placed then passes the Image to IMAQ Extract.  For your application you could implement something similar to my attachment.  Have one loop grabbing images then place the Get Last Event Invoke Node for the image display in a parallel loop to perform the ROI extraction and post processing.  You probably wouldn't need an event structure for this.  Notice a 2nd IMAQ Create.VI is used in both examples to create a memory space to hold the image for processing/saving.

 

If you desire to programmatically set the ROI to the whole image, it may be easier to just clear the ROI using a property node and just pass the image as normal for post processing.  What ever processing you want to performwill automatically be applied to the whole image.

Regards,
Isaac S.
Applications Engineer
National Instruments
0 Kudos
Message 2 of 2
(2,067 Views)