Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Webcam Image ROI snapshoting and saving

Hey everyone,

I'm somewhat new to Labview and I've only recently gotten the Vision Development Module and the Vision Acquisition software. It's extremely new to me and I'm at a loss. I searched around and couldn't seem to find exactly what I'm looking for, or maybe I didn't understand it enough to know. I'm really just looking for something to get me started. I'm currently using my laptop and I wanted to create a VI that showed what my webcam was seeing continuously, allows the user to drag and focus on a specific area, and can take a snapshot of the user defined spot.

Ultimately I'm going to use the snapshoted image as a comparison to a later snapshoted image. I'm just looking for somewhere to get started. I've played around with some of the functions and was able to see what my webcam was seeing though I had no clue how to take a snapshot of the image of the ROI.

 

Thanks in advance for the assistance.

EDIT: I added a VI of what I'm currently working with that I found from searching around. It's doing pretty much exactly what I want, but I'm just stuck at the snapshoting of the ROI. I want to save that ROI as an image so that I can later compare it to a different image that's taken later.

0 Kudos
Message 1 of 6
(4,645 Views)

Hello,

 

if I understand correctly, this should do the trick. You just need to create a ROI property node and extract the subimage (you might need to replace some of the functions (subvi's) with your Labview version (the attachement is saved in Labview 2013 and 2010 in case you have an older version).

 

snap_BD.png

 

Your loop sleeps too little (you are using a refresh rate of 100 fps). Webcameras usually have ~25 - 30 fps, so you should generally match this refresh rate.

 

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."
Message 2 of 6
(4,622 Views)

Hey K,

 

Thanks for the reply! It was very helpful. I definitely think I can continue on and start working on comparing images now. Kudos to you!

0 Kudos
Message 3 of 6
(4,587 Views)

Proceed to perform the extraction of the pattern with a function to process images that capture the last event of the RGB image (image and extract coordinates)

 

4.png

0 Kudos
Message 5 of 6
(2,990 Views)