Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to input video files into IMAQ VIs

I have existing mp2 video files (which I could easily convert to other formats) that I would like to input into IMAQ 6.0 VIs to analyze, one frame at a time. Is there a way to grab frames from a video file (without grabbing hardware) to analyze with IMAQ?
0 Kudos
Message 1 of 2
(3,066 Views)
There is an example posted on Developer Zone that will allow you to read back and analyze individual frames from an AVI file (search for IMAQ AVI Read Write Example). If you can convert your MPEG files into AVI files, you should have no problem analyzing the images using IMAQ Vision.

Bear in mind that the MPEG file formats use lossy compression - that is information present within the original images will be lost as part of the MPEG compression process. This may affect the quality of the images that you will be analyzing with IMAQ Vision.

NI has never directly supported the analysis of "movie" files for this reason (the use of compression in the file generation process). The IMAQ Vision software tools are generally targetted towards "machine vision applicati
ons" i.e. where the camera is connected directly to a frame grabber and then processed in software. That being said, I've used this example previously and it should prove a good starting point for your work.
Message 2 of 2
(3,066 Views)