Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Problems using AVI read/write example

I would like to test some vision processing software I wrote by reading an AVI file rather than a live stream. I found the "AVI read/write example" mentioned on this forum and it sounds like exactly what i need, but I cannot get it to read my avi files. When I run the example read VI, it says "An exception occured with the external code called by a call library node". Doing further testing, I found one AVI on my computer that would work, all others crash the VI. Another odd behavior is that the "avi init read" subvi will return the wrong frame rate for some AVIs. I have tried both compressed and uncompressed AVIs all in RGB format. I have also tried different frame rates and encoding options for my AVI file with no luck. I am just a stud
ent, so buying software is not an option for me.

Has anyone had problems reading AVIs with this? Are there AVI encoding options that will make this VI work?
0 Kudos
Message 1 of 5
(4,071 Views)
I believe the AVI Read/Write example has been on the web for a while. However, last summer NI released a new version of its Vision Development software (version 7) that contains full support for reading and writing AVI files. I'll bet you'll have more luck with that. Let me know if you have any questions about it.

Kyle V
0 Kudos
Message 2 of 5
(4,071 Views)
Actually, the AVI support is part of IMAQ, not the Vision toolkit. You can download IMAQ from the NI website. You want version 2.6. The AVI tools will work with LabVIEW 6 and up.

Bruce
Bruce Ammons
Ammons Engineering
0 Kudos
Message 3 of 5
(4,071 Views)
Hello,
I think the avi functions that you get are VFW based, it can not read
any format of compression codec. But it should be able to read
uncompressed AVI files. But anyway, if you can't get IMAQ-vision 7.0
avi functions to try (I don't have, I don't know how it works), you
can always get my IVision to try out. In IVision, there are two groups
of avi functions. One is called "AVI functions", they are VFW based,
so not always work for all kind compressed avi files, but I have
another group called "Media files", the functions there work for all
format compressed AVI files, including mpeg, asf, avi... you can
access the frame image by using a callback vi (example included), seek
the media position, change play rate, etc.
Go to get a download at:
http://www.hytekautomatio
n.com/Products/IVision.html
Irene
excube wrote in message news:<50650000000800000028B00000-1068850981000@exchange.ni.com>...
> I would like to test some vision processing software I wrote by
> reading an AVI file rather than a live stream. I found the "AVI
> read/write example" mentioned on this forum and it sounds like exactly
> what i need, but I cannot get it to read my avi files. When I run the
> example read VI, it says "An exception occured with the external code
> called by a call library node". Doing further testing, I found one AVI
> on my computer that would work, all others crash the VI. Another odd
> behavior is that the "avi init read" subvi will return the wrong frame
> rate for some AVIs. I have tried both compressed and uncompressed AVIs
> all in RGB format. I have also tried different frame rates and
> encoding options for my AVI file with no luck. I am just a student, so
> buying software is not an option for me.
>
> Has anyone had problems reading AVIs
with this? Are there AVI encoding
> options that will make this VI work?
0 Kudos
Message 4 of 5
(4,071 Views)
Okay, here's the skinny as I understand it. The NI-IMAQ driver on the ni.com website allows you to write uncompressed AVI files to disk. However, if you want to compress the AVI file or read AVI files into LabVIEW, then you need the Vision 7 Development Module for LabVIEW.
0 Kudos
Message 5 of 5
(4,071 Views)