Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

How to process images from AVI file

I am trying to process all images from a .avi file. I want to get the greyscale version of the color images of avi, increase contract, and threshold it. I wanna do this based on the Read AVI Example, but it seems not work on it. What is the problem?

 

My vi is in the attachment.

 

Thanks,

 

Bill

0 Kudos
Message 1 of 5
(3,259 Views)

Step 1:  Probe all the error wires and see where the first error occurs and what it says.  That will help a lot.

 

My guess is that the first time through the loop works, but you are typecasting a color image to a grayscale.  The second time through the loop, you are trying to load a color image from the avi into the grayscale image and it fails.

 

I would create a second grayscale image and use it as the dest image in the typecast operation.  This way your color image will stay color.

 

FYI, this looks like a good time to use a for loop with a conditional stop.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 2 of 5
(3,255 Views)

I still have questions why it fails at the second time I load a color image. I tried the probe at different image output. It seems only the contract enhance works. The threshold is not working.

 

You mean you connect the image dest of cast operation to the image output of the 'avi read'? It seems not work. If possible, can you change on my vi and send my email? maxin853@gmail.com I am a beginner of labview.

 

Thanks a lot,

 

Bill

0 Kudos
Message 3 of 5
(3,246 Views)
Take a look at the attached.  It seems to work with the example avis.  You need to create image references for the other steps if you want to view each step.
Randall Pursley
0 Kudos
Message 4 of 5
(3,245 Views)

The threshold wasn't working because by default it replaces all pixels within the range by the default value (1). 

 

You need to set the Keep/Replace input to FALSE and the Replace Value to zero to blank out everything else.

Message Edited by rpursley8 on 07-02-2009 01:58 PM
Randall Pursley
0 Kudos
Message 5 of 5
(3,244 Views)