Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Reading an AVI frame by Frame and displaying the frames

hello
How does one perform

Reading an AVI frame by Frame and displaying the frames

I did read the frame individually but the "data out" pin seems to have "string type" data which i cannot process.

what am i not doing right?

kindly advise if anyone knows.

thanks
Panash
0 Kudos
Message 1 of 6
(5,670 Views)

Hi Panash,

The Data Out output is the data that is associated with the image, the Image Out contains the Image that you would want to perform any processing on.  It may be helpful to look at the example Read AVI Example.  It can be found in the Example Finder (Help>>Find Examples).  This example shows an AVI being read frame by frame.  I hope this helps.

Have a great day,

GG

0 Kudos
Message 2 of 6
(5,665 Views)
Thank you gg,

got it working.... but what really is really delaying my work is that
everytime there is a problem with array/matrix/string as applied to image data.

Why is it not as simple as
reading an image ...... which would be a matrix. then we perform operations ... and see output..

This read pixelmap/write pixelmap..... image source, image data, bit depth   etc is really time consuming.
I like Labview.... its a splendid tool .Are there any good tutorials

I just may have to switch back to some thing like MATLAB...connect to camera.... but comprimise on computation time.

Would like to know the correct way to learn LabView.
Panash
0 Kudos
Message 3 of 6
(5,650 Views)

Hi Panash,

There are several ways to learn how to use LabVIEW more effectively.  The best way is to take a LabVIEW basics class.    LabVIEW basics I & II is a one week course where you learn all about LabVIEW programming techniques. 

But there are lots of resources depending on how much time you have and how you would like to learn.  Here are 13 different ways to learn how to program in LabVIEW. 

I am not quite sure if I understand your questions about reading in the image and then doing your processing.  You may want to look at some of the example programs, to see how image processing is done. 

I hope this helps,

Let me know if you have other questions.

GG

Message Edited by GiGe on 05-18-2007 04:38 PM

0 Kudos
Message 4 of 6
(5,639 Views)

I am trying to save 8 bit images to an avi using the Grab and Save to Avi.avi example. The intention is to read the saved avi (using the READ AVI example) frame by frame and convert the frames (8 bit) to a 2D array using the imagetoarray subVI.

Problem1: The "Gab and Save to avi" example is saving the images from my 8 bit camera as 32 bits.

Problem2: When use the READ AVI example, it appears that the avi in 1 above was saved as 32 bits RGB. How do i convert this to an 8 bit image that i can then convert to a 2D array?

thanking you in advance

Daxon

0 Kudos
Message 5 of 6
(5,555 Views)
Hi Daxon,

AVI files can be saved as unsigned 8 bit or as 32 bit RGB.  To see what data type your AVI was saved in you can use the Get AVI Info vi.  You can then pass that info to the Image type on your IMAQ Create vi.  If you have the wrong Image type in your AVI file make sure that when you use the IMAQ Create when writing to an AVI file that you have the Image type set to the correct type of file.  For example if you are using an 8 bit camera then for the image type make sure Grayscale (U8) is selected. 

Also if you want to change an image type you can use the IMAQ Cast Image vi. I hope this helps.

Regards,

GG


0 Kudos
Message 6 of 6
(5,529 Views)