12-04-2015 03:26 AM
Hi,
I am writing a labwindows/CVI 2012 code that drives a camera using the Imaqdx functions. I need to record a sequence of grabbed images as a movie .avi.
I don't understand how to use the imaqCreateAVI function or the imaqWriteAVIFrame function.
An example of such a labwindows/CVI program showing how to use these two functions would be very helpful. Does such examples already exist ? if yes where ? if no, could somone give me some tips ?
How can I write the images grabbed with the camera directly in the movie without saving the whole images sequence ?
Thanks for your help.
12-07-2015 05:20 AM
Hi castorpollux,
Have you seen the Grab example in CVI?
You could find it there : C:\Users\Public\Documents\National Instruments\CVI\Samples\IMAQdx\Grab
This example shows how to grab image with IMAQdx functions.
It's a good starting point to modify/adapt this project with the IMAQCreateAVI function.
Regards,
Valentin
Certified LabVIEW Architect
Certified TestStand Architect
Certified LabWindowsCVI Developer
National Instruments France
12-15-2015 09:19 AM
Hi Valentin,
I saw the Grab example program for grabbing images with a camera that you mention. th example shows how to open a session, grab a sequence of images, and display the images on the screen. But it does not show how to create an avi and record the images as successive frames in the avi.
Would you have an example program that shows how to create and record grabbed images in an avi file using the NIvision functions such as imaqCreateAVI, imaqWriteAVIFrame, imaqOpenAVI ?
In the folder : C:\Users\Public\Documents\National Instruments\CVI\Samples\, I could not find any NI Vision folder.
Regards
01-05-2016 03:16 AM
Hi Valentin,
I finally succeeded in aquiring an avi movie with labwindows CVI using the grab exemple program you recommended
C:\Users\Public\Documents\National Instruments\CVI\Samples\IMAQdx\Grab.
I simply added the three following lines :
just after the "activation of the imaq loop", I inserted
aviSession = imaqCreateAVI ("movie.avi", NULL, IMAQ_USE_DEFAULT_QUALITY, 30, 0);
in the imaq_loop, I inserted just below the line " imaqDisplayImage (image, 0, TRUE);"
imaqWriteAVIFrame (image, aviSession, NULL,0);
the variable aviSession is declared at the beginning of the program:
static AVISession aviSession
Thanks for your help.
Hope this may be helpful to someone else.
CastorPollux
01-05-2016 03:26 AM
Hi castorpollux,
Thank you for sharing your solution.
I'm sure this will help someone else.
Bonne journée,
Valentin
Certified LabVIEW Architect
Certified TestStand Architect
Certified LabWindowsCVI Developer
National Instruments France