LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I select a path to save the images from USB camera

Solved!
Go to solution

 

 

Hi,

I am Using USB camera for my senior project , I want to control this camera to detect a human body, using a motion sensor  and capture images.

my question is how can I select a path to save these images captured from USB camera ?

in the figure below , the program that I am using for my USB camera

 

USB camera.jpg

thanks in advance ...

0 Kudos
Message 1 of 23
(4,363 Views)

this is my VI

0 Kudos
Message 2 of 23
(4,360 Views)

Hi duaa,

 

try this function to select a path...

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 3 of 23
(4,351 Views)

This is another VI you would use to do the actual file-saving, called IMAQ Write File.

 

http://zone.ni.com/reference/en-XX/help/370281M-01/imaqvision/imaq_write_file_2/

Ravi A.
National Instruments | Applications Engineer
0 Kudos
Message 4 of 23
(4,327 Views)

Thank you very much for your help

 

now I can select a path for saving the captured images

but the problem that i can save only 1 image and when it takes another one the first is replaced and deleted, so how can i save all the pictures without any replacements ?

0 Kudos
Message 5 of 23
(4,312 Views)
0 Kudos
Message 6 of 23
(4,311 Views)

You need to change the filename path on every iteration of  yoru while loop.

0 Kudos
Message 7 of 23
(4,304 Views)

how can i do a while loop fot the path name ?

0 Kudos
Message 8 of 23
(4,287 Views)

Use string functions to build together a filename with a value that changes, such as the value coming from the i node of the loop for the iteration terminal.

 

Then build that string filename together with the folder path to provide you with a file path that changes each loop iteration.

 

0 Kudos
Message 9 of 23
(4,275 Views)

i have attached my program

i want the file name to change every time to be image1,image2,..

i dont know how to insert that loop to increment the path name

i have tried many trials and it didnt work

 

0 Kudos
Message 10 of 23
(4,262 Views)