Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

USB webcam - controlling Real Time video with simultaneous capture some images from the video

Hi, It's my first experience with labview and I need some help… 

 

I have to save images coming from an event captured by a USB video camera at a user defined sample rate while simultaneously the camera shows the "live video" of the event. The idea is... tune the quality of the video (contrast, gain, exposure, etc.) and with those parameters save some images... also, the stored image is the result of a ROI Mask over the pictures captured by the video.

 

I have already made a simple program using Labview 2011 and the Vision Acquisition/Assitant toolkit to store the images captured by the video cam (after I applied a ROI mask) at a sample rate defined by the user, for a timespan defined also by the user... but my display instead of showing the Live cam video, only shows the last image saved (the one with the ROI mask).

 

I suspect the problem is the way I wrote the WHILE LOOP, because I'm using a time clock which pauses all the elements within the loop, but I need this "wait clock" to save the images at a fixed sample time :s

 

Can anyone help me?? The only thing left to do is display the Live Video... but I can't figure out how to solve this… any ideas?? please... :s

0 Kudos
Message 1 of 4
(5,446 Views)

Hello,

 

have you tried the solution that was recommended in the last post (wiring a new imaq reference to the Image Dst):

 

http://forums.ni.com/t5/Machine-Vision/labview-webcam-video-acquistion/td-p/1056355

 

By opening a new thread - I meant that for any future problems you encounter 🙂 This would then be easier for the people here to help you more quickly and efficiently.

 

Best regards,

K


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 2 of 4
(5,441 Views)

Hi,

 

Yes... I tried that option but there are two inconvenients: there is no real time video, and the saved image doesn't keep the initial input parameters (gain, exposure, white balance, etc...) 

 

The only thing new... is that the display of each saved cropped image fills 100% of the display area. Before the last correction suggested (http://forums.ni.com/t5/Machine-Vision/labview-webcam-video-acquistion/td-p/1056355) the displayed image only had filled a certain portion of the whole display area).

 

I want to display the real time video but the only thing I get is the last saved image :s

 

Thanks again,

0 Kudos
Message 3 of 4
(5,433 Views)

Hello,

 

honestly I am not a big fan of express vi's, so I cannot help there.

 

But if it helps, I attached a program that shows a live image from the camera, masks it and saves the masked image.

If you want to control the loop rate (and see the actual loop rate), search the Machine Vision board - it has been discussed not so long ago (it's still in my memory, so it can't be that long :)).

 

If you want to control attributes of your camera, you can use the property node. See this link:

 

http://digital.ni.com/public.nsf/allkb/E50864BB41B54D1E8625730100535E88

 

I suggest maybe using a event structure to update your camera attributes only when you change them (not writing them every iteration if there is no need for it).

 

The attached program is saved for LV2010.

 

Best regards,

K

 

P.S.: If you have problem with the image indicators, just replace them.

 


https://decibel.ni.com/content/blogs/kl3m3n



"Kudos: Users may give one another Kudos on the forums for posts that they found particularly helpful or insightful."
0 Kudos
Message 4 of 4
(5,418 Views)