02-14-2013 06:00 AM
Helo,
I'm acquiring a .avi video from a webcam and I'd like to save a frame of this video whenever I press an 'acquire button'. I'd like also to save the acquired frame in separate files (for example, frame 1 in image1.png file, frame 2 in image2.png file and so on).
Any suggestion?
Thanks!
Solved! Go to Solution.
02-14-2013
07:17 AM
- last edited on
04-25-2025
06:56 PM
by
Content Cleaner
Elena,
do you have NI Vision Acquisition?
Norbert
02-14-2013 08:21 AM
yes I do
02-14-2013
08:28 AM
- last edited on
04-25-2025
06:56 PM
by
Content Cleaner
Then verify that you have access to the Vision Development Module. This gives you specific functions for AVI.
I think this should provide you with all requested functions.
Norbert
02-14-2013 08:32 AM
this is the first attempt (see attachment) , but I don't know how to 'grab' the frame, this confiuration gave error while running when I press the 'acquire' button
02-14-2013 08:48 AM
Never worked with the assistant (blue expressVI) so i am not sure what the source of error could be in specific.
The basic functions you require are in the AVI palette as well as in the IMAQ or IMAQdx palette, depending on the camera you are using. Both supply a "grab" function.
Norbert
02-14-2013 08:55 AM
The express take the images from the webcam, that is it. I try the 'grab' but it says that 'NI-IMAQ: The passed in interface or session is invalid' .. how can I pass it correctly?
02-14-2013 09:00 AM
Hm, working with screenshots on code is rather difficult. It seems to me that you are using an additional "Grab Acquire" which is definetly not correct if the express VI already returns a proper image from the camera......
Norbert
02-14-2013 10:29 AM
Now I can see the frame when I acquired it but I can't save it 'File access denied' .. any idea ? (see attachment)
02-15-2013 01:56 AM
Well, your filepath constant for the IMAQ Write File 2 function contains an invalid path since it does not point to any file on disk. A file path to disk is always absolut, so it has to contain e.g. a file letter (like "C:\").
Another thing you have to consider is that you are going to use the same file for all images, simply overwriting previous ones. I doubt that this is the feature you are looking for....
Norbert